]> www.hackdaworld.org Git - my-code/atmel.git/blobdiff - monolyzer/port.asm
final version (before xmas)
[my-code/atmel.git] / monolyzer / port.asm
index d3ea5244828d24c24969b0bfc22539f4ae3263a7..85c57e1d63963a504e436ba5828de2bca52bc2d5 100644 (file)
@@ -6,7 +6,7 @@ PORT_INIT:
        cbi DDRD,2
 
        ; switch pull-up off (useless, default)
-       cbi DDRD,2
+       cbi PORTD,2
 
        ; port d pin 6 -> output
        sbi DDRD,6
@@ -19,8 +19,27 @@ PORT_INIT:
 
        ret
 
+INT0_IR_CONF_R:
+
+       ; trigger interrupt on rising edge
+       in tmp1,MCUCR
+       sbr tmp1,(1<<ISC01)
+       sbr tmp1,(1<<ISC00)
+       out MCUCR,tmp1
+
+       ret
+
+INT0_IR_CONF_F:
+
+       ; trigger interrupt on rising edge
+       in tmp1,MCUCR
+       sbr tmp1,(1<<ISC01)
+       cbr tmp1,(1<<ISC00)
+       out MCUCR,tmp1
+
+       ret
 
-INT0_IR_CONF:
+INT0_IR_CONF_FR:
 
        ; trigger interrupt on falling and rising edge
        in tmp1,MCUCR