| Posted: 04:29pm 20 May 2026 |
Copy link to clipboard |
 Print this post |
|
If you have a target sub (mysub in this case) set-up to be triggered by an interrupt
SETPIN pin, INTH, mysub
do
'main code loop pause 10 loop
sub mysub 'this is called when the pin goes high . . . 'do stuff . . . end sub
But then you want to directly call the same sub:
SETPIN pin, INTH, mysub
do
'main code loop pause 10 SETPIN pin, OFF, mysub 'switch off the interrupt mysub 'call the sub SETPIN pin, INTH, mysub 'reinstate the interrupt
loop
sub mysub 'this is called when the pin goes high or directly . . . 'do stuff . . . end sub
|