Erik van Gerven
Member
Hi all,
I am building a stroboscope,dwell and tachometer using a Picaxe 18M2. This is a tool for adjusting the ignition timing on classic motorbikes (or cars if you like them more )
It has a power LED (RGB LED) fed by a FET transistor.
There are 4 buttons (menu,-,+,OK) and 1 8 digit starburst LCD display.
I programmed the intterrupt on for the menu-button so it's easy to jump from the running procedure back to the menu. In the menu itself, I don't need the interrupt.
So far so good... evrything works fine , but...
The setint finally causes a subroutine call
Since I need the interrupt to jump to the menu program label and never do a retrun, after 4 jumps the stack is full and the program 'crashes'
The only options I see is to abandon the setint idea and poll the menu button frequently
or
put the new 'reset' command after the interrupt labeland restart the whole picaxe.
I am looking for a more subtile solution ín between
Is there a way to flush the subroutine stack (by doing some poke command or something)?
I am building a stroboscope,dwell and tachometer using a Picaxe 18M2. This is a tool for adjusting the ignition timing on classic motorbikes (or cars if you like them more )
It has a power LED (RGB LED) fed by a FET transistor.
There are 4 buttons (menu,-,+,OK) and 1 8 digit starburst LCD display.
I programmed the intterrupt on for the menu-button so it's easy to jump from the running procedure back to the menu. In the menu itself, I don't need the interrupt.
So far so good... evrything works fine , but...
The setint finally causes a subroutine call
Since I need the interrupt to jump to the menu program label and never do a retrun, after 4 jumps the stack is full and the program 'crashes'
The only options I see is to abandon the setint idea and poll the menu button frequently
or
put the new 'reset' command after the interrupt labeland restart the whole picaxe.
I am looking for a more subtile solution ín between
Is there a way to flush the subroutine stack (by doing some poke command or something)?