From: hackbard Date: Sun, 17 May 2009 20:25:40 +0000 (+0200) Subject: new schematic X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=28f8496b45653e6db6fb3d3863f546a4b1a8b042;p=my-code%2Fatmel.git new schematic --- 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