80196 assembly code for PWM generationgreenspun.com : LUSENET : PID Controller Tuning : One Thread
I wanted to generate 5 PWM signal with varying duration and period. Can you give me an idea about it. Alleast can you send me the code for generating a single/multiple PWM signal.
-- Boby Varghese (email@example.com), December 21, 2003
in 80196 we have A\D converter using this we may generate PWM output
-- r.madhavan (firstname.lastname@example.org), March 29, 2004.
I wanted to generate 3 PWM signal with varying duration and period. Can you give me an idea about it. Alleast can you send me the code for generating a single/multiple PWM signal.
-- Koben (email@example.com), May 19, 2004.
You can set one timer to give an interupt at each 1ms( or any other time you want which will be your resolution). In your timer interupt subroutine, you should be reducing the value of temporary-duration and temporary-period variables for each PWM signal. You set pin high whenever temp-duration is not reached zero. Once it reach zero, you set pin low and you go on checking the temp-period values to become zero. Once temp-period value also become zero, you set the pin and reload duration and period values to the temporary variables. Repeat it for more channels. (This idea is based on a program i have written in 8051 and i don't know whether it will match for 80196. I hope there will be some other simpler methods available in 80196)
-- Boby Varghese (firstname.lastname@example.org), May 19, 2004.
on 80196 there is a feature called HSI/HSO. it has HSI,HSOI pins on it. these are best for PWM applications. read the manual about 80196 it is 27006102.pdf from intel. (i think this manual is now not available on net) in that read about HSI/HSO in perticular. u will understand how it is useful for PWM. moreover for multiple pwms 80196, HSO is the only option. refer other doucments that describle hso of 80196.
-- Bhaskar Reddy N (email@example.com), May 20, 2004.