How can one calculate the values to place in PR2 and select the proper pre and post scale for timer2 when setting for a PWM output?
Seems a bit confusing to me how to set a 12f617 chip to output pwm on GP2 pin.
Thanks
Printable View
How can one calculate the values to place in PR2 and select the proper pre and post scale for timer2 when setting for a PWM output?
Seems a bit confusing to me how to set a 12f617 chip to output pwm on GP2 pin.
Thanks
does this help see post #2
https://www.picbasic.co.uk/forum/sho...red-HPWM-setup
Yes it does. Thanks,
Ioannis
Anyone interested here is a tool in Excel to calculate the PR2 register and the CCP register value.
If any of these two values are greater than 255 and 1023, the cell turns yellow with red bold font.
As usual, remove .txt from the file name to make it open with Excel.
Ioannis
Attachment 9472