From df18c58bb7a380fd036a88b23282eeb19a1c42a5 Mon Sep 17 00:00:00 2001 From: hackbard Date: Thu, 14 May 2009 00:31:57 +0200 Subject: [PATCH] gio port init --- led_plex/main.asm | 12 ++++++------ led_plex/port.asm | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 led_plex/port.asm diff --git a/led_plex/main.asm b/led_plex/main.asm index cfa8c2e..3130055 100644 --- a/led_plex/main.asm +++ b/led_plex/main.asm @@ -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 index 0000000..aeb40f1 --- /dev/null +++ b/led_plex/port.asm @@ -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 + -- 2.20.1