]> hackdaworld.org Git - my-code/atmel.git/commitdiff
fixed state machine
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Wed, 16 Feb 2011 15:33:28 +0000 (16:33 +0100)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Wed, 16 Feb 2011 15:33:28 +0000 (16:33 +0100)
monolyzer/main.asm

index e17e9a774854952e6b91c82d7a78dbffd87ff472..d1cdf77131fab153a7f977d1a708edad24f4f1ce 100644 (file)
@@ -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
@@ -224,7 +224,7 @@ INT0_RUN:
        brne EXIT_IR
 
        ; exit sampling
-       ldi state,0
+       ldi state,2
 
 EXIT_IR:
 
@@ -236,7 +236,7 @@ EXIT_IR:
 T1_OVF_IR:
 
        ; exit sampling
-       ldi state,0
+       ldi state,2
 
        reti