74HC595 shift register connection to prop
edlikestoboogie
Posts: 71
Is it okay to connect the input pins of the 74HC595 directly to the prop? without the use of current limiting resistors in between the two? My shift register is switching some mosfets to control motors, I was suggested to use a 100uF and 0.1uF decoupling caps on the shift register, is the 100uF cap good to use in this application?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
By decoupling caps I assume you mean the supply lines and 0.1uF is standard practice for all logic devices. I don't know about the 100uF as I can't see that being necessary or making much of a difference. Try a 10uf or so tantalum as that would prove more useful. The 0.1uF should always be as close to the devices supply and ground pins as possible.
Now you mentioned the HC595 but remember if you are running the shift registers from +5V then the minimum logic high threshold of these HC devices is 0.7VCC which is higher than the Prop's outputs. These means the HC595 is not guaranteed to see the Prop's 3.3V as a logic high, it might but it's borderline. If this is the case just substitute a 74HCT595 where the T means this is a TTL logic level compatible HC device so any voltage above 2V in will be recognized as a logic high.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
It's interesting that you say that running the 74HC595 at 5V , the props outputs 3.3V will not be high enough for the logic input for the shift register.
I have made plenty of boards that use the 74HC595 and in the circuit I run the 74HC595 at 5V ( 4 of them cascaded driving 32 leds ) and I have the prop inputs ( even with a 1K series resistor in line for the 4 signal line) and I have no problems.
But I read the spec sheet again and as you say, the hi level logic inputs are
2.0v min 1.5 ( 0.75 of VDD )
4.5v min 3.15 ( 0.70 of VDD )
6.0v min 4.2 ( 0.70 of VDD )
So running the 74HC595 shift register at 5V for VDD means the logic input minimum should be 3.5V! according to the spec sheet my circuit should not be working!
So why does my circuit work?
thanks
Dave M
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/propeller
I will in my next designs use the 74HCT595 instead of the 74HC595 as the specification is better suited., But yes the HC version does work?, Maybe Pete can enlighten us as to why it does when it shouldn't!
Regards
Dave M
For some reason too there seems to be a school of thought that says "put current limit resistors on everything". Ok, no harm done but running outputs from the Prop to any logic input is not a current limit situation ever, so the resistors are redundant altogether. If outputs are coming from a logic device that is running from 5V and INTO the Prop then yes, you would definitely use "current limit" resistors as current will certainly be flowing when the input of the Prop is at a higher voltage then the Prop's supply.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jaguar XK8 Parts
Drac, look at the 74LVCxx parts as well. It depends on whether you are requiring the parts to run on 5V supply to drive other 5V logic.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
If the input stage to the 74HC595 is designed to be electrically symmetric, it will normally switch at 0.5xVdd, so it will often work with a 3.3V signal driving it. But as has been pointed out, the trip point can depend on temperature, supply voltage, age and also process variation during production and I agree that you should always make sure you meet the specified input levels or it may fail later on.
1. Vil(max) or the highest voltage that can be recognized as a low
2. Vih(min) (or the lowest voltage that can be recognized as a high
If you input a voltage at Vil(max) or lower it will be seen as a logic low.
If you input a voltage at Vih(min) or higher it will be seen as a logic high.
Now anything in between these voltage are not only sitting in the "noise margin" but they have another more serious consequence. If you are familiar with CMOS logic and how it is constructed you will know that the input stage is actually a P-channel MOSFET and a N-channel MOSFET connected in a complementary configuration (that's the C in CMOS). As their gates are connected together to the input the idea is that only one would be turned on while the other is off, so when the input goes to ground the output of the gate goes high and also if the input is connected to the supply then the output goes low.
What about if the inputs aren't quite ground (VSS) or supply (VDD)? They will still work within the margins mentioned earlier but there are limitations obviously. Now however what happens when the input is in the noise band? Well, they can cease to act as a digital ON/OFF device as they are both partly on and partly off, that is not what a logic gate should ever do. What happens is current flows (conventional) from the supply through the P and through the N to ground. This shouldn't happen and might or might not be harmful but will certainly at the very least increase the current drain of the device. That is why you never have inputs floating because this can happen, you either pull them up or down.
There have been some situations where I have had to make do with 74HC devices operating off +5V and driven by the Propeller at 3.3V. I can definitely say that it doesn't always work even on the bench. I usually kludge this to get around it and put a diode in the +5V supply to the logic so they are running at around 4.4V or so, and then Vih(min) is under 3.3V and they work fine.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
True, there is no need for the resistors when the output from the prop is driving an input pin on a '595 under normal circumstances. I always include them unless switching speed requirements precludes doing so to make the circuit as rugged and forgiving as possible.
If the '595 were to fail and present a short to ground or Vcc that prop output would be damaged without a current limiting resistor. Another consideration is during troubleshooting. If you should short a '595 output pin to the input pin with a scope or meter probe would have the same result.
However, if the 74HC is on the same board or system and especially if it is run from the same supplies then it would be redundant and it would be over-engineering to put current limit resistors on the Prop. Lightning could strike it too, a meteorite could hit it, what do we do? This is risk assessment which looks at the outcome as well, is it a problem? No, then don't worry about it. Every extra component you end up putting on a board is another potential source of a problem and increases the probability of a failure. I keep my designs clean and simple calculating the design parameters and realistic sources of problems. So it's not underdone, but neither is it overcooked.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
@Peter, if the '595 were on the same board and run off the 3.3V supply I would not bother with the resistors either, but if it is running off +5V I would put them in unless switching speed was an issue. The reason is that two of the input pins are adjacent to the output pins (SER and /SCLR) and if I were scoping those pins it would be very easy to have the scope probe short them to the adjacent pin. The price of 5 SMT resistors is a very small price to pay for that protection.
@Cluso99, I am far more familiar with MTBF than I ever wanted to be, and am aware that adding components reduces it. I have been in field service for over 30 years now and designed/built my first interface boards a couple of years after I started in service. Most of those original boards have long since been retired, but I still have a few out there, still plugging away, and very few of them have ever had a problem. Most of those problems happened when a power supply failed or a thunder storm rolled through the area.
@all, some of my customers are in remote areas where getting to the site is very expensive ($1000.00+), so the cost of a few extra components is insignificant by comparison. In addition to that the volumes are small (usually less than 100 units) so the design cost far outweighs that of a few additional components. I make them as rugged as possible, and as a result almost all of the boards I have produced have been retired without a single failure, and a lot of them have been in service for 20 years or more. After 2 years of working with the prop I am confident that any properly designed boards using it will be equally robust.
LOL, it's like a game of football, it's all fun, even if we gang up on you! You go for resistors, n we will resist you
There's no problem with having good arguments and experiences all round, it's a forum.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
The pmos and nmos transistors in the input stage of a 74HC595 have a threshold of 0.6-0.7V, so if the input voltage deviate that much from either supply, there will be current flowing in the input stage. So even at Vil(max) and Vih(min), we will have current but it will not affect the logic function but will add to the total current consumption. This will be true for the 74HCT595 as well, even if the input levels are different.
It was suggested earlier to use 74HCT595 instead of 74HC595 to ensure correct input levels and I agree. However, for some reason the HCT devices are more expensive so it might be better to use a single HCT buffer to do the level shifting and then use standard HC devices. This will also minimize the number of inputs with reduced input swing so current consumption will be reduced.
This type of discussion wants me to get up and put together a test rig to confirm these statements which I might just do. I'm just curious too.
Ahh, I love a good argument.......(as long as I win)
Propeller resistance is futile.....you will be assimilated.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*