Variable Frequency PWM

Status
Not open for further replies.

HighTechPower

Member level 5
Joined
Jul 10, 2020
Messages
91
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
703
Hi. I want to design a circuitry that produces two types of PWM outputs using any 8 bit PIC microcontroller i.e. one PWM will be of fixed frequency type which is very easy to implement. The 2nd PWM is of variable frequency type whose frequency will be reduced linearly at our will for some fixed range of frequencies. Any idea how to implement this 2nd type? I don't need detailed coding just verbal understanding.
 

Hi,

Maybe as "fixed ON time, flexible OFF time". Resulting in a PWM period time of "t_on + t_off".
Basically this is a counter with variable TOP value and fixed COMPARE value.
Usually the microcontroller datasheets explain how to setup the PWM periferal for:
* a dedicated PWM period time and
* a dedicated ON time.

--> read the datasheet

Klaus
 

The pic approach very doable, depending on overall requirements and other project needs.

One approach using a single chip would be -




This has advantage of onchip DDS derived clock, eg. linearity. Also if you needed a PWM > 16 bits,
say 24 or 32, thats relatively easy to do creating onchip a custom component, either with
Verilog or schematic capture of a logic design from its general purpose logic fabric. Or more
channels.....Right hand window shows resources used/left in chip for other tasks.


Regards, Dana.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…