X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fatmel.git;a=blobdiff_plain;f=monolyzer%2Fport.asm;fp=monolyzer%2Fport.asm;h=2e816113c66cffb2d5cc3d5880a87dcfdfeab0b4;hp=0000000000000000000000000000000000000000;hb=41d981471644f11151e4f1691c4a29c44fb12410;hpb=32e3f51bc0f4248019379fe784d38c7fb770f952 diff --git a/monolyzer/port.asm b/monolyzer/port.asm new file mode 100644 index 0000000..2e81611 --- /dev/null +++ b/monolyzer/port.asm @@ -0,0 +1,26 @@ +; port functions + +PORT_INIT: + + ; port b 0-7 -> input (useless, default) + ldi tmp1,0x00 + out DDRB,tmp1 + + ; switch pull-up off for inputs (useless, default) + ldi tmp1,0x00 + out PORTB,tmp1 + + ; port d pin 6 -> output + sbi DDRD,6 + + ; 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 +