Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/16/01 10:19
Read: times


 
#8254 - RE: reg generation of PWM is concerned
Hi
It's very simple.
I will explain you my system parameters for generating PWM
Oscillator frequency = 10 MHz
PWM frequency = 2.5 KHz
one memory location for changing duty cycle say location x
take any bit addressable area bit as a flag. Initially flag = 0
Program any timer in mode 2 (8 bit auto reload mode)
Now run the time. when timer overflows go to its ISR. In that now load THx register with value 255- x and make flag = 1 and o/p signal = ON
when next time timer overflows, load THx with value x, flag = 0 and o/p signal = OFF.
Repeating this will give you required PWM signal. By simply changing value of x you can very your duty cycle.
In my case I was able to get duty cycle variation from 10% to 90%

Rakesh


List of 4 messages in thread
TopicAuthorDate
reg generation of PWM is concerned            01/01/70 00:00      
RE: reg generation of PWM is concerned            01/01/70 00:00      
RE: reg generation of PWM is concerned            01/01/70 00:00      
RE: reg generation of PWM is concerned            01/01/70 00:00      

Back to Subject List