From 28f8496b45653e6db6fb3d3863f546a4b1a8b042 Mon Sep 17 00:00:00 2001 From: hackbard Date: Sun, 17 May 2009 22:25:40 +0200 Subject: [PATCH] new schematic --- led_plex/main.asm | 2 +- led_plex/port.asm | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/led_plex/main.asm b/led_plex/main.asm index 3130055..32f1e7d 100644 --- a/led_plex/main.asm +++ b/led_plex/main.asm @@ -80,7 +80,7 @@ RESET: INIT: ; gio port init - rcall GIO_PORT_INIT + rcall PORT_INIT ; timer init rcall TIMER_INIT diff --git a/led_plex/port.asm b/led_plex/port.asm index aeb40f1..715a402 100644 --- a/led_plex/port.asm +++ b/led_plex/port.asm @@ -1,14 +1,21 @@ ; port functions -GIO_PORT_INIT: +PORT_INIT: - ; port b 0-2 -> output - ldi tmp1,0x06 + ; port b 0-3 -> output + ldi tmp1,0x0f out DDRB,tmp1 - ; zero outputs - ldi tmp1,0x00 - out PORTB,tmp1 + ; g, rck, sck -> low / scl -> high + cbi PORTB,(1<<0)|(1<<1)|(1<<2) + sbi PORTB,(1<<3) + + ; port d 6 -> output + ldi tmp1,(1<<6) + out DDRD,tmp1 + + ; ser -> low + cbi PORTD,(1<<6) ret -- 2.20.1