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
TRANSFER_LOOP:
+ ; check amount of sent data
+ cp tmp1,count
+ breq IDLE
+
; transmit storage
ld uart_rxtx,Z+
rcall UART_TX
+ ld uart_rxtx,Z+
+ rcall UART_TX
; count sent data
add tmp1,one
- ; check amount of sent data
- cp tmp1,count
- breq IDLE
-
rjmp TRANSFER_LOOP
; include subroutines
cpi count,55
brne EXIT_IR
+ ; indicate end of 'c'apacity
+ ldi uart_rxtx,0x63
+ rcall UART_TX
+
; exit sampling
- ldi state,0
+ ldi state,2
EXIT_IR:
T1_OVF_IR:
+ ; indicate 'o'verflow end
+ ldi uart_rxtx,0x6f
+ rcall UART_TX
+
; exit sampling
- ldi state,0
+ ldi state,2
reti