projects
/
my-code
/
atmel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
all leds on (multiplexed!)
[my-code/atmel.git]
/
led_plex
/
main.asm
diff --git
a/led_plex/main.asm
b/led_plex/main.asm
index
ef66821
..
8a03d53
100644
(file)
--- a/
led_plex/main.asm
+++ b/
led_plex/main.asm
@@
-1,5
+1,7
@@
; main file of led_plex project
;
; main file of led_plex project
;
+; schematics: http://hackdaworld.org/download/led_plex/led_plex.png
+;
; author: hackbard@hackdaworld.org
;
; author: hackbard@hackdaworld.org
;
@@
-84,8
+86,11
@@
INIT:
; gio port init
rcall PORT_INIT
; gio port init
rcall PORT_INIT
- ; timer init
- ;rcall TIMER_INIT
+ ; timer0 init
+ rcall TIMER0_INIT
+
+ ; timer0 interrupt enable
+ rcall TIMER0_INT_INIT
; uart init
rcall UART_INIT
; uart init
rcall UART_INIT
@@
-98,18
+103,16
@@
INIT:
out SPL,tmp1
; global interrupt enable
out SPL,tmp1
; global interrupt enable
-
;
sei
+ sei
; signal ready output
ldi uart_rxtx,0x68
rcall UART_TX
; signal ready output
ldi uart_rxtx,0x68
rcall UART_TX
- ;
testing ... DO NOT CONNECT LEDS BY NOW !!!
+ ;
led init
ldi hc595_sink,0xff
ldi hc595_sink,0xff
- ldi hc595_source,0x
ff
+ ldi hc595_source,0x
01
rcall SET_HC595
rcall SET_HC595
- ldi uart_rxtx,0x61
- rcall UART_TX
MAIN:
MAIN:
@@
-131,6
+134,15
@@
T1_OVF:
reti
T0_OVF:
reti
T0_OVF:
+
+ ; shift source
+ rol hc595_source
+
+ ; update sink
+
+ ; set hc595
+ rcall SET_HC595
+
reti
UART_RECEIVE:
reti
UART_RECEIVE: