X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=monolyzer%2Fmain.asm;h=b41f3b3af57ad4c516ddf0ac94c0996e898fb137;hb=ee4ac434cbf4224bad8d485bfed88dd7d97b4df5;hp=e17e9a774854952e6b91c82d7a78dbffd87ff472;hpb=e9e711fa8f239e1ce03993cc2502a2d8df48cd9d;p=my-code%2Fatmel.git diff --git a/monolyzer/main.asm b/monolyzer/main.asm index e17e9a7..b41f3b3 100644 --- a/monolyzer/main.asm +++ b/monolyzer/main.asm @@ -125,9 +125,9 @@ MAIN: 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 @@ -163,17 +163,19 @@ TRANSFER: 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 @@ -223,8 +225,12 @@ INT0_RUN: 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: @@ -235,8 +241,12 @@ 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