We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am doing a project in 8051 mc in which I have to generate atleast 5 PWM signals with varying period and duration. Is it possible? What is the logic to be used. Is anyone having the assembly code in 8051 or in C language for this? If so please send it to me at epey2p158@nitc.ac.in thanks in advance.
one PWM signal to get it on p1.0 using the timer0 scrap your controller and use one that has a PCA (P89C51Rx2, A(T)89C51Rx2 P89C66x, xxx51Fx etc.) There is no way you will get 5 PWMs reliably without using a derivative with a PCA. Erik
"There is no way you will get 5 PWMs reliably without using a derivative with a PCA." Nah. I'm sure Graham's software method would work perfectly reliably - just not very fast! ;-)
Nah. I'm sure Graham's software method would work perfectly reliably - just not very fast Ok, OK agreed; however if a scheme is concocted where one timer drives 5 PWM's - and try to go fast - I have no doubt that setup will stumble frequently. Erik
ONCE MORE 1) Throw your uC out and get one with a PCA. 2) Look at the PCA cookbook 3) smile and be happy. Erik