So we set up a timer to trigger an interrupt every time it overflows. However, I could not get OpenTimer1(), ReadTimer1(), etc. to work, so we had to manually set up the timer.
My question is, how do I get the timer to overflow faster? Right now it overflows 3 or 4 times per loop.
You need to store a new value in TMR1H and TMR1L each time you service the interrupt. That value counts up every tick until it overflows and triggers the interrupt again. To make it happen faster, use a larger number to start with.
0x85ED is 34825 decimal, giving 31251 ticks until it overflows at 65536. At 800 ns per tick, that’s 25 milliseconds. If you want to drop that to 5 milliseconds, you need 6250 ticks. Store 59286 in the timer, 0xE796.