The title says it.
The manual says it has to be done in the interrupt sub. But is there a way around doing it somewhere else in the program?
My reason being. Is that I don't what the interrupt to be continuously triggered, until an input state of its pin changes within the program.
Then I would re-enable the interrupt.
example :
The manual says it has to be done in the interrupt sub. But is there a way around doing it somewhere else in the program?
My reason being. Is that I don't what the interrupt to be continuously triggered, until an input state of its pin changes within the program.
Then I would re-enable the interrupt.
example :
Code:
setint %00000000, %000000010 ;interrupt low C.1
start:
do
if pinc.1 = 1 then ;re-enable interrupt when the state changes on the pin the interrupt is looking at
setint %00000000, %000000010 ;do stuff....until called again
endif
loop
interrupt:
low b.1 ;turn off stuff
return