X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fatmel.git;a=blobdiff_plain;f=monolyzer%2Fport.asm;fp=monolyzer%2Fport.asm;h=d3ea5244828d24c24969b0bfc22539f4ae3263a7;hp=2e816113c66cffb2d5cc3d5880a87dcfdfeab0b4;hb=1117f788c441bc3d8caf90e5fb883e11696e1757;hpb=96c049990876625353c38ab10fd8bf0e698b3973 diff --git a/monolyzer/port.asm b/monolyzer/port.asm index 2e81611..d3ea524 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,37 @@ 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: + + ; trigger interrupt on falling and rising edge + in tmp1,MCUCR + cbr tmp1,(1<