]> hackdaworld.org Git - my-code/atmel.git/commitdiff
new schematic
authorhackbard <hackbard@tx2.hackdaworld.org>
Sun, 17 May 2009 20:25:40 +0000 (22:25 +0200)
committerhackbard <hackbard@tx2.hackdaworld.org>
Sun, 17 May 2009 20:25:40 +0000 (22:25 +0200)
led_plex/main.asm
led_plex/port.asm

index 31300559e1d78b1c10e2b64144d6879e6f4ac7e3..32f1e7dd753146f76ed82136d081c1884cb2fd92 100644 (file)
@@ -80,7 +80,7 @@ RESET:
 INIT:
 
        ; gio port init
 INIT:
 
        ; gio port init
-       rcall GIO_PORT_INIT
+       rcall PORT_INIT
 
        ; timer init
        rcall TIMER_INIT
 
        ; timer init
        rcall TIMER_INIT
index aeb40f1670d7d45916e36adba3c6b0362c573a7d..715a40280ae80e435a594a24402685748a5ea3fb 100644 (file)
@@ -1,14 +1,21 @@
 ; port functions
 
 ; 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
 
        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
 
 
        ret