device 74HC595

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
chava
Posts: 20
Joined: Mon Sep 22, 2003 1:01 am
Location: Israel
Contact:

device 74HC595

Post by chava »

Hi,
I'm new here, so Hello everybody!
I have a circuit in which a microcontroler controls over the outputs of a part, named 74HC595 . The micro is programmed.
This part, 74hc595, is a shift register with latch and output enable.
Untill now, we mounted the device, manufactured by Texas Instrument (TI), and everything went fine.
lately, the purchasing dep. bougth that part from another manufacturer, named "ST".
The thing is that the ST part misbehave, it clears its output now and then, sometimes it just clear all outputs and turns all of them together, and just only then, goes back to an output situation as expected.<p>I checked the datasheets of both devices, by TI and ST. all time parameters are at nano sec, while I know that the microcontroller works at opcode processing speed of 1M (1 micro >>>> nano)
so time between pulses are at list 1 micro-sec.
did anyone worked with this part befor , and encountered with this issue????
help.... its important<p> :roll:
Jukin Chava<p>E.Dove Israel
R&D
Ron H
Posts: 360
Joined: Tue Dec 18, 2001 1:01 am
Location: Boise, ID
Contact:

Re: device 74HC595

Post by Ron H »

Perhaps you know this, but you can't leave any inputs floating on a CMOS device. It sounds as if pin 10 (/SCLR) may be floating, either because you didn't tie it to VCC, or perhaps because of a bad solder joint.
If that isn't the problem,...?
User avatar
haklesup
Posts: 3136
Joined: Thu Aug 01, 2002 1:01 am
Location: San Jose CA
Contact:

Re: device 74HC595

Post by haklesup »

Either the ST parts are more sensitive to noise than normal or the TI parts were particularly robust (masking a pre-existing problem). I am presuming it is noise triggered because it is intermittant with no obvious trigger to make it happen. Does this happen at high temperature or ambient room temp.<p>Check for noise on the power and ground lines at the problem device. Observe during conditions when you have the fault condition occuring. Try more or bigger decoupling capacitor. If there is none at the IC add a decoupling cap.<p>Look at the signals on your control signal lines for any noise and correct that downstream.<p>If you have access to a curve tracer, I can suggest several ways to compare the actual characteristics of the two devices to see if there is a difference.<p>Observe the supply current to your IC or the whole circuit (whichever is convenient). If you observe a large temporary or sustained increse in current when the fault occurs, you may be experiencing latch up (presumably triggered by noise on a pin)(this is a CMOS part)<p>If you don't know what latch up is see my article in Test and Measurement World this month "Looking for Latchup". (okay maybe that link is a little self serving but...)<p>To trigger a noise induced fault you can try these tricks for injecting noise. Operate a spark gap near the equipment (just brush some wires together from a good supply), Operate an electric drill or other AC motor (with brushes). Instigate a short across the supply lines with either a high value resistor (500K or more) or a small to mid sized capacitor.<p>Chris
Chris Foley
Posts: 146
Joined: Mon Jan 13, 2003 1:01 am
Location: Chicago IL
Contact:

Re: device 74HC595

Post by Chris Foley »

Chris nailed everything. 10.0. (Good article!) Something like this has happened to me with other parts for another reason, too. When the assembly stops being an engineering project (shoot the engineer and ship the product, for pity's sake!), people in purchasing start trying to save money. Possibly it tastes better once they've had a spin in it, so they automatically home in on the cheapest source of parts, which may be a chip broker or other unreliable source. Brokers get QC rejects and used/abused parts as well as overpurchases, and sometimes you'll get some bad eggs that way. If they have this bad habit, try to enforce a policy of only buying ICs from first-line distributors.<p>Good luck.
Chris<p>[ September 22, 2003: Message edited by: Chris Foley ]</p>
chava
Posts: 20
Joined: Mon Sep 22, 2003 1:01 am
Location: Israel
Contact:

Re: device 74HC595

Post by chava »

(Hi, thats me who asked the Q)
Help me Out here, I'm still stuck!<p>The mclr of the 595 (pin 10) is atached to Vcc and the G (pin 13) atached to Gnd. this is not the problem!
I realized that, after I write to the device, I turns the pins of the microcontroled to Hi-Z (which means I leave the 595's pins floating.)
I Fixed that but The problem still occure....<p>By the way, we placed a rotating relay ( N.C atached to one side of coil , "0" to other side of coil, ~ to com - it rotates like crazy) near the board and the noise made it go nuts.. It changed other measurements that are been done by this device so I belive It HAS indeed something to do with noise and device (the ST 595 device) istability.
By the way, the power circuit is based on a serial capacitor.
Our engineer atached a capacitor to the ~ input.
but still the problem is there...<p>
:(
Jukin Chava<p>E.Dove Israel
R&D
Chris Foley
Posts: 146
Joined: Mon Jan 13, 2003 1:01 am
Location: Chicago IL
Contact:

Re: device 74HC595

Post by Chris Foley »

Hello again, Jukin. You've apparently got a noise problem. Not unusual in the real world. The thing is, sometimes problems like this are almost impossible to deductively troubleshoot without some major test equipment. Here's a few suggestions you can run through on inductive logic troubleshooting without taking out or renting the big guns.<p>* First, take a break and clear your mind. To start fresh, you need to look at the problem with fresh eyes. Go outside, have a Coke, take a walk. When you come back in, start a lab notebook, and jot down everything you do, as well as any ideas you may get along the way. Go back and read it occasionally, especially if you get stuck again.
* Take a good look at your circuit again, with the HC595 data sheet by your side. Are any of the outputs driving excessive/capacitive loads? Look carefully. If this is a "one-off" or prototype, be sure to check the schematic and the wiring/board layout again. Good technical rule of thumb -- on prototypes, the most common problem is the short between the ears.
* Look at the power supply again. Put a good scope right on the power supply pins of the '595 (isolate the scope if necessary to avoid measuring the ground loops caused by the scope ground and your circuit, if it's ground-referenced). What do you see? Many factors can contribute to poor regulation at the IC, including trace/wire inductance. Get one of those IC sockets with a bypass cap built in, and install that in the circuit. If anyone put an electrolytic in for bypass anywhere near the '595, remove it immediately. Looking at the power supply first is good practice, and it saves time more often than you think.
*Now that the PS is clear, take a look at your software. Try single-stepping through that section of code if you can, and see if the right things actually do happen in the right order. If the noise upset happens while you're single-stepping, you then have information as to the noise source. Again, good practice. You need to be absolutely sure it's not a software problem (for instance, two things happening at the same time that, because of slight differences in setup/hold times between the ICs, causes one to work and the other not. Single-stepping with a logic probe and a piece of paper will show this kind of problem. Try to make the problem happen.
* Next thing is the real-world loads of the I/O pins. I've used the 595 as essentially a serial in-parallel out output port, and have driven all kinds of loads with this. You mentioned relays. If one of the outputs ends up driving a transistor that drives a relay, make sure there's a diode across the relay coil. (Don't ever use the '595 to drive any inductive or capacitive load directly.) Look at loading, and for non-resistive loads try to limit the max current to something the power supply can handle. Take a look at the power supply wiring, too. Things may be happening on those lines when things are turned on or off which may kick back to affect the IC power supply. If you can, you might want to try separate wiring from the power supply to the loads. Use SSRs if you can -- a relay contact opening an inductive load (like your astable relay oscillator) sets up lots of broadcast energy with its arcing that can be picked up by your chip traces, which won't happen with a transistor- or triac-based SSR.
* If you've gotten this far, it's possible that electrical energy is being coupled into either the input lines (e.g. extra clocks), or output lines. The 8255/-C55 was/is famous for this kind of problem, because of the way its output FETs are laid out on the chip. Any chip with internal latching logic is possibly susceptible to this kind of problem. Hopefully by this time, you've identified a source of electrical noise that might be causing this problem, and how it is being coupled onto the circuit board lines that go to your I/O pins. If possible, move the source of noise as far as possible away from the traces/wires. (The solution...to pollution...is dilution! If the noise source is far enough away, it won't matter.) Moving the wires works, too. Another thing you might try is using small RC snubbers (from the IC pin thru a 33 ohm resistor to a 100pF ceramic disk to GND and your output. you can do this with the data in pin too, but don't do it with the clock pin -- you'll mess up rise/fall time requirements. This strategy works best with a ground plane. It doesn't take a whole lot of energy to make a flip-flop flop, and sometimes, by just cutting the edge of the spike, you can limit it enough so that the internal logic won't upset.<p>You really haven't provided enough information to be more specific, but you should know that you're not the first one to get stuck like this. The lessons learned from "voyages of discovery" like this are a start in learning good construction technique, and help when you're doing it next time. Here are two of the best resources for your problems:<p>Don Lancaster's Degubbing Techniques<p>Analog Devices' "An IC Amplifier Users Guide to Decoupling, Grounding, and Making Things Go Right for a Change" by Paul Brokaw
Analog Devices AN-202.pdf<p>Feel free to email me if you'd like (no attachments, and put N&V in the subject heading, please).<p>Good Luck (luck is the residue of intelligence and hard work -- you'll be OK).
Chris<p>[ October 02, 2003: Message edited by: Chris Foley ]</p>
Post Reply

Who is online

Users browsing this forum: No registered users and 103 guests