Pages: 1 [2] 3   Go Down
Author Topic: Triple Shift Register question  (Read 1911 times)
0 Members and 1 Guest are viewing this topic.
East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 109
Posts: 4080
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried the 10k pull down resistor on the latch pin like the diagram shows, but it still lights up random lights on first power-on...
Random drink dispenser - could be interesting.
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Temple, Texas
Offline Offline
Sr. Member
****
Karma: 14
Posts: 360
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried the 10k pull down resistor on the latch pin like the diagram shows, but it still lights up random lights on first power-on...
Random drink dispenser - could be interesting.

(O.T.)
Yeah you could get a random drink to enjoy while you're having a random tattoo applied by by Chris Eckert's "Auto Ink":

Quote
Auto Ink is a three axis numerically controlled sculpture. Once the main switch is triggered, the operator is assigned a religion and its corresponding symbol is tattooed onto the persons arm. The operator does not have control over the assigned symbol. It is assigned either randomly or through divine intervention, depending on your personal beliefs.
Logged

Illinois, US
Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

EEK!

It sounds like this auto ink creation could use a little less "auto" !
Logged

Illinois, US
Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also of note:

Yesterday while I was out of the house- the house lost power!  How ironic that we JUST disscussed this in the thread!  And just as we discussed- when power came back on a bunch of random lights came on- causing two liters of water to be pumped into a cardboard box full of clothes and books  smiley-eek-blue

I returned to find a mess, but it could've been WAY worse if a finished barbot with 24 bottles of booze was connected!  I really need to fix this glitch before pressing on any further lol
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 603
Posts: 33402
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Read again Reply #14,
That is what you need to implement.
Logged

Illinois, US
Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did, but haven't implemented it yet.  Just wanted to share the story  smiley
Logged

Illinois, US
Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm...  pull down 10k resistors on each MR line, with a pin controlling when it goes high, STILL does not alleviate random lights from coming on when power is first applied.

Why aren't these solutions working?  Should I be using different sized resistors?

The only thing I haven't tried now is a pull-up resistor on the output enable lines...  But judging by these attempts I am having little faith that it will work?  What I don't get is, on Nick Gammon's schematic he lists a single 10k pull down.  He says it will stop erroneous inputs from coming in during power-on.  This leads me to believe that it works for him.  Why didn't the same method work for me?

Then I used pull-downs on the master reset lines, and controlled the output with pin 5.  This didn't stop the erroneous inputs, either.  (granted, with this setup, the inputs would go away as soon as the code initialized and brought MR low, but by this time I would already have 8 different types of booze splattered all over my counter...)

Maybe I am just doing something wrong...  I'll quad-check it...

...seems to be correctly wired.  I don't get it.  Should I have to use this many outputs to control this phenomenon?  These pull-down resistors should have done the trick, right?
« Last Edit: February 02, 2013, 06:14:16 pm by Jim_Socks » Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

One resistor should have done it, and wire all the /MR pins in parallel.

Looking at the datasheet again, perhaps what you need is /OE to be wired high (via a pull-up). That will force the outputs to be high-impedance. Then put pull-up or pull-down resistors as appropriate on each output pin. That will pull them to the desired level, while /OE (output enable) is high.

Quote
He says it will stop erroneous inputs from coming in during power-on.

However it boots so quickly I can't say for certain that it worked. smiley
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26513
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

Why not pull OE high instead, let it sit there while the code starts up, and don't take it low until some valid data has been clocked in & latched.
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.

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 603
Posts: 33402
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Pin 10 of the shift register ~SNCLR should be pulled low with a resistor suitable for the logic family you have. That is a 10K for a HC or a 470R for an LS. This will clear all the outputs of the shift register. Then once you have booted, it should be taken HIGH to allow data to be clocked into the shift register.
If this pin is not resetting all the shift register bits then either you have wired it wrong or you have a faulty chip.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That is the same as /MR (master reset) that we have been discussing.
Logged

Illinois, US
Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Seeing as once the code is up and running the MR pin works perfectly as advertised, even when the code is altered to specifically test it's function, I am going to conclude the wiring is correct and the chips are in working order (as far as MR is concerned, anyway.)

I am going to move things around and try the OE/pull-up resistor method next.  Results to follow.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Judging by the truth table in the datasheet, the /MR pin has different effects depending on /OE, and also ST_CP (clock).
Logged

Illinois, US
Offline Offline
Jr. Member
**
Karma: 2
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm, some interesting results:

So I did the OE/pull-up resistor method, and it definitely kept the outputs off, but as soon as they were turned back on- there were those arbitrary bits staring me in the face...  The OE just stopped them from going out, but they were there waiting once output was enabled again...

So I did a combination of both, I used a pull-up resistor on the OE, and a pull-down resistor on the MR, using arduino pins to control both.  This is more I/O than I would LIKE to use for these registers...  but I guess it is a necessary evil if I want to guard against the inevitable "power-outage-liquor-spewing-barbot" incident.

HOWEVER- while this measure DRASTICALLY reduced the issue, it has not made it go entirely away!  Not every time, but say, one out of every three times I plug the arduino back into power, the LEDs will flicker on very briefly, in the same arbitrary manner as before except much briefer in duration (heck, they used to just remain on permanently until reset!  So this is a huge improvement.)

I am currently unsure if this is even a concern- the output may be too fast for my pumps to even move any liquid past the check valves at all (which is probably the case, so I am not very worried about it.)  I am going to consider this problem FIXED unless I notice otherwise later in pump testing.

I just thought it was interesting to note for anyone interested- that even with all these measures in place, the arbitrary flicker remains!  (Albeit reduced to acceptable levels of operation)

Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So I did the OE/pull-up resistor method, and it definitely kept the outputs off, but as soon as they were turned back on- there were those arbitrary bits staring me in the face... 

Right. So before you turn the outputs on, clock out 3 x bytes of zero. That makes sure they are all off.
Logged

Pages: 1 [2] 3   Go Up
Jump to: