i have a trouble with pwm output.
please give me example to set it.
(i want to have a frequency between 0-2000 hz
by adc pin 2. I mean when I give input to pin 2
then I have pwm frequency at pin 16 value 0-2000 hz)
thanks a lot.
Mon Nov 15 2010, 00:28:09
(no subject)(by Max)
Hi,
The PWM output frequency is a fixed value (ex; 2000Hz) only the pulse width is variable (or duty cycle)... NOT THE FREQUENCY
0% = ______________________________
10% = _________-_________-_________-
50% = _____-----_____-----_____-----
90% = _---------_---------_---------
100 = ------------------------------
So PWM is not the instruction you are looking for... you may try to use a super short cycle time and turn ON and OFF a coil on every cycle and try to reach your target of 2000Hz
Hi , the 16f877 have 2 PWM channel , but on LD i'm not able to set the other one , just work on pin 16 CCP2 , is that the only possibility or i'm doing something wrong ???
Let me know please
Thank Bernie