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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/15/02 14:23
Read: times


 
#18691 - RE: SFR ?? Bill Au
Hi Billy

Say, since you already have 8051 ICs at ur disposal and it is to be used as a dedicated motor drive... you might as well use the timers and SFRs :) to implement your own PWM routine.

In fact u have 2 timers and 32 I/O lines (assuming its a flash programmable 89cxx). You can use one timer to generate the PWM signal and the other to measure the feedback signal.

Its very easy to change the duty cycle , once u have fixed the frequency. Say the freq is F, so the Time period is T = 1/F

SO let this T = Ton + Toff
Once u have Ton and Toff, all u gotta do to change the duty cycle is to increase one and decrease the other by equal amounts...
i.e. to inc Duty Cycle,
Ton = Ton + Delta
Toff = Toff - Delta
Thing is to keep the total of Ton and Toff constant.And there you have your PWM drive
Since it will be interrupt-based, it can be a real-time thing.

it can be a nice, challenging, do-able project I think. But of course that maybe coz I prefer to make FULL use of all available resources rather than go for ready-made solutions :D

kundi

List of 20 messages in thread
TopicAuthorDate
PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly c            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly c            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly c            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly c            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: PWM DC Motor Control,Any Assembly code?            01/01/70 00:00      
RE: SFR ?? Bill Au            01/01/70 00:00      
RE: SFR ?? Bill Au            01/01/70 00:00      
RE: SFR ?? Bill Au            01/01/70 00:00      
RE: SFR ?? Bill Au            01/01/70 00:00      
RE: SFR ?? Bill Au            01/01/70 00:00      
Thanks for all people 's help            01/01/70 00:00      

Back to Subject List