gio port init
authorhackbard <hackbard@tx2.hackdaworld.org>
Wed, 13 May 2009 22:31:57 +0000 (00:31 +0200)
committerhackbard <hackbard@tx2.hackdaworld.org>
Wed, 13 May 2009 22:31:57 +0000 (00:31 +0200)
led_plex/main.asm
led_plex/port.asm [new file with mode: 0644]

index cfa8c2e..3130055 100644 (file)
@@ -31,10 +31,10 @@ reti
 reti
 
 ; T1 OVF1
-rjmp T1_OVF1
+rjmp T1_OVF
 
 ; T0 OVF0
-rjmp T0_OVF0
+rjmp T0_OVF
 
 ; UART RX
 rjmp UART_RX
@@ -79,8 +79,8 @@ reti
 RESET:
 INIT:
 
-       ; port init
-       rcall PORT_INIT
+       ; gio port init
+       rcall GIO_PORT_INIT
 
        ; timer init
        rcall TIMER_INIT
@@ -118,10 +118,10 @@ MAIN:
 ; interrupt routines
 ;
 
-T1_OVF1:
+T1_OVF:
        reti
 
-T0_OVF0:
+T0_OVF:
        reti
 
 UART_RX:
diff --git a/led_plex/port.asm b/led_plex/port.asm
new file mode 100644 (file)
index 0000000..aeb40f1
--- /dev/null
@@ -0,0 +1,14 @@
+; port functions
+
+GIO_PORT_INIT:
+
+       ; port b 0-2 -> output
+       ldi tmp1,0x06
+       out DDRB,tmp1
+
+       ; zero outputs
+       ldi tmp1,0x00
+       out PORTB,tmp1
+
+       ret
+