I have miscalculated speed that an interrupt should be occurring.
Hardware is a PIC16F690. Using internal oscillator but I also have a 32.768 khz crystal for the interrupt. Timer1 has a 16 bit register. When the register overflows there is an interrupt. I preload the register with 0xFC00 = 1111 1100 0000 0000. Therefore there should be an overflow (and interrupt) after 0100 0000 0000 = 2^10 = 1024 ticks from the crystal. Right? It seems like there should be 32768 / 1024 = 32 overflows (interrupts) per second, but in fact there are around 320 per second. Where is my miscalculation? I have been over and over the math, but I cannot find the error.
Hardware is a PIC16F690. Using internal oscillator but I also have a 32.768 khz crystal for the interrupt. Timer1 has a 16 bit register. When the register overflows there is an interrupt. I preload the register with 0xFC00 = 1111 1100 0000 0000. Therefore there should be an overflow (and interrupt) after 0100 0000 0000 = 2^10 = 1024 ticks from the crystal. Right? It seems like there should be 32768 / 1024 = 32 overflows (interrupts) per second, but in fact there are around 320 per second. Where is my miscalculation? I have been over and over the math, but I cannot find the error.