Hi Guys
I have a midrange pic using timer1 interrupt on overflow to count 100 Hz cycles.
The example I have seen in asm jumps to interrupt on overflow, disables timer1,
loads a new value to start counting from again into timer1 high and low bytes, and then restarts the timer again.
I guess the instruction time it takes to jump to ISR and reload the value is factored into the value that
is reloaded into timer1.
My question is to do with syncing the signal produced by the chip with another signal not generated by the circuit.
I want to align them in or out of phase by either adding to the constant value loaded to timer1 just enough to shift it in phase before going back to the normal value again.
Is there any consequence of incrementing or decrementing one of the timer1 bytes while it’s counting?
That way I figure would be the easiest way to add or subtract one instruction cycle beat, even if it took more
cycle time to do it.
The only other way I can think of that seem overcomplicated in hardware would be to find a way to pull down individual clock pulses driving the pic’s clock input.
Cheers, Art.
I have a midrange pic using timer1 interrupt on overflow to count 100 Hz cycles.
The example I have seen in asm jumps to interrupt on overflow, disables timer1,
loads a new value to start counting from again into timer1 high and low bytes, and then restarts the timer again.
I guess the instruction time it takes to jump to ISR and reload the value is factored into the value that
is reloaded into timer1.
My question is to do with syncing the signal produced by the chip with another signal not generated by the circuit.
I want to align them in or out of phase by either adding to the constant value loaded to timer1 just enough to shift it in phase before going back to the normal value again.
Is there any consequence of incrementing or decrementing one of the timer1 bytes while it’s counting?
That way I figure would be the easiest way to add or subtract one instruction cycle beat, even if it took more
cycle time to do it.
The only other way I can think of that seem overcomplicated in hardware would be to find a way to pull down individual clock pulses driving the pic’s clock input.
Cheers, Art.