SAMPLE:
- ; sample as long as there is storage capacity
- sbrs state,0
- rjmp SAMPLE
+ ; sample as long as there is storage capacity and signal
+ cpi state,2
+ brne SAMPLE
; disable interrupts
rcall INT0_IR_DISABLE
brne EXIT_IR
; exit sampling
- ldi state,0
+ ldi state,2
EXIT_IR:
T1_OVF_IR:
; exit sampling
- ldi state,0
+ ldi state,2
reti