projects
/
my-code
/
atmel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
basic implementation done ...
[my-code/atmel.git]
/
led_plex
/
port.asm
diff --git
a/led_plex/port.asm
b/led_plex/port.asm
index
7109c3c
..
f57bda9
100644
(file)
--- a/
led_plex/port.asm
+++ b/
led_plex/port.asm
@@
-43,14
+43,26
@@
SET_HC595:
; storage clock -> low
cbi PORTB,1
; storage clock -> low
cbi PORTB,1
+ ; zero to everything ...
+ cbi PORTB,3 ; clear hc595 registers
+ sbi PORTB,1 ; store shift register data
+ cbi PORTB,1 ; release hc595 register clear
+ sbi PORTB,3 ; storage clock -> low
+
; source driver
; clock -> low
cbi PORTB,2
; set ser line
cbi PORTD,6
; source driver
; clock -> low
cbi PORTB,2
; set ser line
cbi PORTD,6
- sbrc hc595_source,
7
+ sbrc hc595_source,
0
sbi PORTD,6
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_source,0
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-58,8
+70,14
@@
SET_HC595:
cbi PORTB,2
; set ser line
cbi PORTD,6
cbi PORTB,2
; set ser line
cbi PORTD,6
- sbrc hc595_source,
6
+ sbrc hc595_source,
1
sbi PORTD,6
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_source,1
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-67,8
+85,14
@@
SET_HC595:
cbi PORTB,2
; set ser line
cbi PORTD,6
cbi PORTB,2
; set ser line
cbi PORTD,6
- sbrc hc595_source,
5
+ sbrc hc595_source,
2
sbi PORTD,6
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_source,2
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-76,8
+100,14
@@
SET_HC595:
cbi PORTB,2
; set ser line
cbi PORTD,6
cbi PORTB,2
; set ser line
cbi PORTD,6
- sbrc hc595_source,
4
+ sbrc hc595_source,
3
sbi PORTD,6
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_source,3
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-85,8
+115,14
@@
SET_HC595:
cbi PORTB,2
; set ser line
cbi PORTD,6
cbi PORTB,2
; set ser line
cbi PORTD,6
- sbrc hc595_source,
3
+ sbrc hc595_source,
4
sbi PORTD,6
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_source,4
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-94,8
+130,14
@@
SET_HC595:
cbi PORTB,2
; set ser line
cbi PORTD,6
cbi PORTB,2
; set ser line
cbi PORTD,6
- sbrc hc595_source,
2
+ sbrc hc595_source,
5
sbi PORTD,6
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_source,5
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-103,8
+145,14
@@
SET_HC595:
cbi PORTB,2
; set ser line
cbi PORTD,6
cbi PORTB,2
; set ser line
cbi PORTD,6
- sbrc hc595_source,
1
+ sbrc hc595_source,
6
sbi PORTD,6
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_source,6
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-112,8
+160,14
@@
SET_HC595:
cbi PORTB,2
; set ser line
cbi PORTD,6
cbi PORTB,2
; set ser line
cbi PORTD,6
- sbrc hc595_source,
0
+ sbrc hc595_source,
7
sbi PORTD,6
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_source,7
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-125,6
+179,12
@@
SET_HC595:
cbi PORTD,6
sbrc hc595_sink,7
sbi PORTD,6
cbi PORTD,6
sbrc hc595_sink,7
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_sink,7
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-134,6
+194,12
@@
SET_HC595:
cbi PORTD,6
sbrc hc595_sink,6
sbi PORTD,6
cbi PORTD,6
sbrc hc595_sink,6
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_sink,6
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-143,6
+209,12
@@
SET_HC595:
cbi PORTD,6
sbrc hc595_sink,5
sbi PORTD,6
cbi PORTD,6
sbrc hc595_sink,5
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_sink,5
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-152,6
+224,12
@@
SET_HC595:
cbi PORTD,6
sbrc hc595_sink,4
sbi PORTD,6
cbi PORTD,6
sbrc hc595_sink,4
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_sink,4
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-161,6
+239,12
@@
SET_HC595:
cbi PORTD,6
sbrc hc595_sink,3
sbi PORTD,6
cbi PORTD,6
sbrc hc595_sink,3
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_sink,3
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-170,6
+254,12
@@
SET_HC595:
cbi PORTD,6
sbrc hc595_sink,2
sbi PORTD,6
cbi PORTD,6
sbrc hc595_sink,2
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_sink,2
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-179,6
+269,12
@@
SET_HC595:
cbi PORTD,6
sbrc hc595_sink,1
sbi PORTD,6
cbi PORTD,6
sbrc hc595_sink,1
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_sink,1
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2
@@
-188,6
+284,12
@@
SET_HC595:
cbi PORTD,6
sbrc hc595_sink,0
sbi PORTD,6
cbi PORTD,6
sbrc hc595_sink,0
sbi PORTD,6
+.ifdef DEBUG_PORTS
+ ldi uart_rxtx,0x30
+ sbrc hc595_sink,0
+ ldi uart_rxtx,0x31
+ rcall UART_TX
+.endif
; clock -> high
sbi PORTB,2
; clock -> high
sbi PORTB,2