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
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
Last edited by Ioannis; - 28th September 2023 at 16:26.
does this help see post #2
https://www.picbasic.co.uk/forum/sho...red-HPWM-setup
Warning I'm not a teacher
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
PWM Calculations.xlsx.txt
Bookmarks