I would like to pump PWM pulses out CCP1 that have a frequency of one every 20 msec (50 per second) and a pulse width that I can (by changing the code) vary from 1 msec to 2 msec. Am I correct in guessing that the frequency of the pulses is dictated by the PAUSE command. One pulse per loop through mainloop:
CCP1 PWM @ 50 Hz ??? ... just read your Datasheet first !!!
NOW ... triggering the CCP1 module ( in compare mode ) @ 50 Hz ( from a timer ) looks much better ...
might be the PULSOUT could also do the trick for a CPU " locking time " of 2 ms ... if possible.
Now, a good program flow allows many, many things for R/C systems without using interrupts or peripherals ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks