Wiring the 74hc595 correctly.
MStein
Posts: 9
Greetings, I've been trying to get the 74hc595 to work for me.
I see in other discussions that three wires are used from the BS2, Here I'm only using two, and that's probably why it's not working. I jumped pins 12 and 13 on the 595, and these pins are separated in examples. I need the proper wiring to get this display to work.I use pins 9 and 10 for shiftout command. Should I use the third pin to send a pulse to initiate the download?
Thank you.
I see in other discussions that three wires are used from the BS2, Here I'm only using two, and that's probably why it's not working. I jumped pins 12 and 13 on the 595, and these pins are separated in examples. I need the proper wiring to get this display to work.I use pins 9 and 10 for shiftout command. Should I use the third pin to send a pulse to initiate the download?
Thank you.
' {$STAMP BS2} ' {$PBASIC 2.5} PAUSE 1000 tc VAR Byte Main: DO HIGH 14 'led blinker to show the stamp is alive tc = 8 'random value for tc to test led display PAUSE 500 GOSUB lightshow DEBUG ? tc LOW 14 PAUSE 500 LOOP END Lightshow: IF tc = 0 THEN SHIFTOUT 9, 10, 0, [%00000001] IF tc = 1 THEN SHIFTOUT 9, 10, 0, [%00000011] IF tc = 2 THEN SHIFTOUT 9, 10, 0, [%00000111] IF tc = 3 THEN SHIFTOUT 9, 10, 0, [%00001111] IF tc = 4 THEN SHIFTOUT 9, 10, 0, [%00011111] IF tc = 5 THEN SHIFTOUT 9, 10, 0, [%00111111] IF tc = 6 THEN SHIFTOUT 9, 10, 0, [%01111111] IF tc = 7 THEN SHIFTOUT 9, 10, 0, [%01111111] IF tc = 8 THEN SHIFTOUT 9, 10, 0, [%11111111] RETURN
Comments
Use the Downloads button on Parallax's main webpage and look under Educational Tutorials & Translations
Quote:
Both the shift register clock (SRCLK) and storage
register clock (RCLK) are positive-edge triggered.
If both clocks are connected together, the shift
register always is one clock pulse ahead of the
storage register.
But if you are using 3 pins maybe other IC's could also work
for what you are doing, like a 3-to-8 decoder?
Thanks for the help
Thank you very much.
I needed a 10k resistor on the latch.
'
Yes you do.
'
Its a pull-down resistor on the LATCH pin(12) of the 74HC595.
'
With out it you can get errors at the outputs of the 74HC595.These errors will appear strange and at random because the LATCH pin was left floating instead of pulled logic low by the pull-down resistor.
the manual says no pulldowns on the second 595, should I pull it down too...?
And should I put decoupling caps anywhere..? Maybe around the BS2...?
I am a newbie...