I'm using a pic16f628 as a frequency divider as part of a pll.
I want a division ratio of 99.
I have configured tmr1 to take pulses from rb6 and in synchronous mode (no choice in the latter).
The I have configured the ccp module to create a special event when theres a match between ccpr1 and tmr1, and causes tmr1 to reset and sets ccpr1if interrupt flag, my software at this point doesnt use interrupts it polls the ccpr1if bit (its not doing anything else and it runs at 20mc's so its not missing pulses).
To get a division ratio of 99 I have to load tmr1 with 98, in fact any ratio I want I have to subtract one from.
Maybe its too late at night for me to suss this, why is it happening?,
I want a division ratio of 99.
I have configured tmr1 to take pulses from rb6 and in synchronous mode (no choice in the latter).
The I have configured the ccp module to create a special event when theres a match between ccpr1 and tmr1, and causes tmr1 to reset and sets ccpr1if interrupt flag, my software at this point doesnt use interrupts it polls the ccpr1if bit (its not doing anything else and it runs at 20mc's so its not missing pulses).
To get a division ratio of 99 I have to load tmr1 with 98, in fact any ratio I want I have to subtract one from.
Maybe its too late at night for me to suss this, why is it happening?,