I have a little app I am writing where I need to be able to change the Pre-Scaler of the interrupt from the interrupt routine, but am unsure if it is possible. Can someone just check my logic here :
Setup Interrupt (I am using TMR0) with 1:1 prescaler and required Pre-load to give me my required interrupt time.
Enable interrupts
When interrupt fires
disable interrupt
set new prescaler value
do what I need to do during the interrupt
enable interrupts
return from Interrupt
I don't need to change the Pre-load value, just the Prescaler value.
I was looking to do this with Instant Interrupts, but am unsure if I am barking up the wrong tree and just wanted a bit of guidance.
With Thanks,
Bill.
Bookmarks