Go Down

Topic: Triple Shift Register question (Read 2455 times) previous topic - next topic

UKHeliBob


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.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

johncc



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.


Jim_Socks

EEK!

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

Jim_Socks

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

Grumpy_Mike

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

Jim_Socks

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

Jim_Socks

#21
Feb 02, 2013, 11:51 pm Last Edit: Feb 03, 2013, 12:14 am by Jim_Socks Reason: 1
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?

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. :)
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Grumpy_Mike

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.

That is the same as /MR (master reset) that we have been discussing.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Jim_Socks

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.

Judging by the truth table in the datasheet, the /MR pin has different effects depending on /OE, and also ST_CP (clock).
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Jim_Socks

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)



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.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up