; main file of led_plex project
;
+; schematics: http://hackdaworld.org/download/led_plex/led_plex.png
+;
; author: hackbard@hackdaworld.org
;
.def tmp1 = r16
.def tmp2 = r17
.def uart_rxtx = r18
+.def hc595_sink = r19
+.def hc595_source = r20
;
; interrupts
reti
; T1 OVF1
-rjmp T1_OVF1
+rjmp T1_OVF
; T0 OVF0
-rjmp T0_OVF0
+rjmp T0_OVF
; UART RX
-rjmp UART_RX
+rjmp UART_RECEIVE
; UART UDRE
reti
; WDT OVF
reti
-
-; include control defines
-.include "ctrl.def"
+;
+; init and main code
+;
RESET:
INIT:
- ; port init
+ ; gio port init
rcall PORT_INIT
; timer init
- rcall TIMER_INIT
+ ;rcall TIMER_INIT
; uart init
rcall UART_INIT
;sei
; signal ready output
- ldi uart_rxtx,0x23
+ ldi uart_rxtx,0x68
+ rcall UART_TX
+
+ ; testing ... DO NOT CONNECT LEDS BY NOW !!!
+ ldi hc595_sink,0xff
+ ldi hc595_source,0xff
+ rcall SET_HC595
+ ldi uart_rxtx,0x61
rcall UART_TX
MAIN:
; interrupt routines
;
-T1_OVF1:
+T1_OVF:
reti
-T0_OVF0:
+T0_OVF:
reti
-UART_RX:
+UART_RECEIVE:
reti