; main file of led_plex project
;
+; schematics: http://hackdaworld.org/download/led_plex/led_plex.png
+;
; author: hackbard@hackdaworld.org
;
ldi tmp1,0x0f
out DDRB,tmp1
- ; g, rck, sck -> low / scl -> high
- ldi tmp1,0x07
- out PORTB,tmp1
- sbi PORTB,3
+ ; disable hc595 outputs
+ sbi PORTB,0
+
+ ; rck -> low
+ cbi PORTB,1
+
+ ; clear hc595 registers
+ cbi PORTB,3
+
+ ; rck -> high (store shift register data)
+ sbi PORTB,1
+
+ ; enable outputs
+ cbi PORTB,0
; port d 6 -> output
sbi DDRD,6
; ser -> low
cbi PORTD,6
+ ; release hc595 register clear
+ sbi PORTB,3
+
ret
SET_HC595: