I am using the internal osc. That is 4MHz. The funny thing to the whole is that I thought since I have to put 16f648a in MCStudio that would have changed this little delema that I have with the port, but I guess wrong.
I will have to try that and see if it works. It should because I have seen this setup before.
For the code below, what is the meaning to all of this. I do not get the PR2 = 49 making this 40k for the PWM period. What is the calculation and also this must be based to xtal size.
'register setup (this is for a 16F684, so it may need to be modified slightly for your chip)
PR2 = 49 'PWM Period 40K=49
CCPR1L = 10 'PWM Duty Cycle
T2CON = 4 'Timer2 = ON; Prescale = 1:1
CCP1CON = 0 'PWM module off
Bookmarks