Pages: [1]   Go Down
Author Topic: 74hc595 shift reg - Turn off all outputs on arduino reset/startup/shutdown?  (Read 1129 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Does anyone know how I can guarantee that all outputs of a 74hc595 shift register turn off on shutdown/restart?

I have a pull up resistor to pin13 of the 74hc595 (Output enable)
http://arduino.cc/forum/index.php?topic=14357.0
but for example when an output is active at the time I press upload to the Arduino, the upload stays active which is a big problem.

I also have 10k pull downs on each Gate pin.

Not sure what else I can do, any thoughts much appreciated!

If it requires turning off the 74hc595 completely, that would be fine - but am not sure how.

Thanks
« Last Edit: April 07, 2013, 01:20:34 pm by diode » Logged

Offline Offline
Jr. Member
**
Karma: 4
Posts: 67
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could put a pull-up resistor on the OE pin, and then drive it low using the arduino when you actually want to display something.  That will turn the outputs off when the board powers up, and lets you control when they turn on via software.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4552
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If it requires turning off the 74hc595 completely, that would be fine - but am not sure how.

My datasheet for the 74hc595 says it has an "output enable" ("OE") pin...

Logged

No, I don't answer questions sent in private messages...

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks,
But as I wrote I already  have a pull up resistor to pin13 of the 74hc595 (Output enable).
With this I can turn the output on and off, but in unexpected occasions, like when arduino stops / resets for an upload, the 74hc595 keeps the output open.

Logged

NL
Offline Offline
Newbie
*
Karma: 1
Posts: 25
Tech Tinkerer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When the Arduino goes into reset (Reset pin is activated or reset button pressed) the outputs should go into input/High-Z mode. So if the OE pin of the 74HC595 is pulled-up, it will also disable (High-Z) those outputs.

If you also want to catch a 'hung' Arduino you will have to use the watchdog timer to force a reset if the program is not running normally anymore.

Hope this helps,
Guido
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks,
Most of the time, during reset, the outputs indeed go off - but sometimes, and when uploading to the arduino, it doesn't - have I done something wrong?

As Grumpy Mike wrote in the link above, a 3.3k pull up to +5v - is that correct?

Or is my problem perhaps related to the fact that Im powering the 74hc595 with a separate power supply?
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

doh! ofcourse it does!
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm I really can't find out how to do apply the Output Enable while using an external power supply - when resetting the Arduino, the outputs stay on. (I checked that I  can switch the Output Enabler in the program, so I suppose its working.
Is 3.3k incorrect?
Or does the whole pull up not work when using an external power supply?
Thank you,
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 438
Posts: 23725
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Which Arduino pin are you using to control the OE pin?

Serial pins D0, D1,
or SPI pins D11, D12, D13?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

D13, is that an issue?
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4552
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

D13, is that an issue?

The Arduino has a LED attached to pin 13. The bootloader is probably flashing the LED (and thus enabling your chip).

Logged

No, I don't answer questions sent in private messages...

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,
I'm new in arduino.
I have the opposite question here. Is it posibble to keep the outputs of 74hc595 when the arduino reset/restart?
How can I do that? is it by software or should add an additional circuit (hardware) ?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 438
Posts: 23725
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Put a pulldown resistor on the Latchpin. That will keep it from floating and moving any new data into the output register during the arduino's reset period.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: