X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=monolyzer%2Fport.asm;h=42c08fa912e3d2c09f6a52259d145465fffd96a0;hb=e9e711fa8f239e1ce03993cc2502a2d8df48cd9d;hp=2e816113c66cffb2d5cc3d5880a87dcfdfeab0b4;hpb=41d981471644f11151e4f1691c4a29c44fb12410;p=my-code%2Fatmel.git diff --git a/monolyzer/port.asm b/monolyzer/port.asm index 2e81611..42c08fa 100644 --- a/monolyzer/port.asm +++ b/monolyzer/port.asm @@ -2,13 +2,11 @@ PORT_INIT: - ; port b 0-7 -> input (useless, default) - ldi tmp1,0x00 - out DDRB,tmp1 + ; port d 2 -> input (useless, default) + cbi DDRD,2 - ; switch pull-up off for inputs (useless, default) - ldi tmp1,0x00 - out PORTB,tmp1 + ; switch pull-up off (useless, default) + cbi DDRD,2 ; port d pin 6 -> output sbi DDRD,6 @@ -16,11 +14,47 @@ PORT_INIT: ; port d pin 6 -> high cbi PORTD,6 - ; port d 2 -> output (debug 1) - sbi DDRD,2 - ; port d 3 -> output (debug 2) sbi DDRD,3 ret + +INT0_IR_CONF_INIT: + + ; trigger interrupt on rising edge + in tmp1,MCUCR + sbr tmp1,(1<