# Different Vcc and input voltage into flip flop

I am building an LED matrix using flip-flops. I will have 128 rows in the matrix, so I am using 16 octal flip-flops, where all inputs to are shared and come from a microcontroller, which uses 5V logic.

I would like to supply 3.3V to the latches so I don't need to solder 128 resistors for each LED (forward voltage of my white LEDs is 3.3V). I tried doing this and the latch stopped working, producing unpredictable results. This was a bit of surprise as the flip-flop is documented to work within a range that includes these two voltages. I presumed that the flip flop didn't like two different voltages coming into it.

With my very limited electronics knowledge, I thought the following would work: simulate this circuit – Schematic created using CircuitLab

It seems to work fine. However, I have since come across this question:

Why is it important not to exceed Vcc at the input to a logic gate?

Where it states that as long as you limit the current going in, no permanent damage will be done. So I tried removing the transistor and just placed R1 between the microcontroller and the flip-flop. It worked.

I have a feeling my circuit above either massive overkill and/or wrong in the first place. Is just using a resistor OK? Any pointers/corrections would be gratefully received.

For reference the flip flop I am using is a SN54HC574

• You are using the power symbols wrong. Positive voltage is at the '+' end, '-' end goes to ground. Aug 31, 2014 at 10:57
• The lack of a Vcc symbol in Circuit Lab is confusing so I can understand why he's used the voltage source symbol like that. Aug 31, 2014 at 11:05

STOP RIGHT THERE

Your basic assumptions are flawed which are putting your entire circuit at risk:

I would like to supply 3.3V to the latches so I don't need to solder 128 resistors for each LED (forward voltage of my white LEDs is 3.3V).

The resistors are NOT to drop the voltage. They are to limit the current.

As it stands your LEDs will be trying to draw massive amounts of current from the latches probably damaging them in the process.

In an ideal diode (light emitting or otherwise) with the voltage at or above the "forward" voltage, the resistance is 0. With Ohm's Law, I=V/R = 3.3/0 = infinity!

Of course, no LED is ideal, so infinity is never viable, but the theory still stands, and the current being demanded by the LED will be far in excess of what the latch can provide.

If you are lucky the latch will just top out at its output current maximum. More likely the MOSFETs in the output stage of the latch will overheat and break down.

You need one of two things:

1. 128 resistors, or
2. a constant current sink / source latch.

I would go for the latter. You can get nice shift registers with constant current sink specifically designed for LED usage.

Most logic chips will have ESD diodes on the input stage. These look like: simulate this circuit – Schematic created using CircuitLab

Therefore any voltage on the input above Vcc + the forward drop of the diode (typically 0.3V) will be routed to the Vcc rail through the diode. The input will be "clamped" at Vcc + 0.3V. Of course, current will the be flowing through that diode. The higher the voltage the greater the current. The diodes have a finite limit on the amount of current they can handle, so adding a resistor to the input will limit that current (just like you should be doing with your LEDs) and prevent the diodes from melting.

For a 5V input on a 3.3v chip there would be an excess 1.4V. With a 100Ω resistor that would be (I=V/R) 14mA of current flowing through the ESD diode. With a 1KΩ resistor it would of course be 1.4mA, and so-on.

If you keep the current to within the safe limits of the ESD diode's current rating then it should be OK. It's not Good Practice™ to rely on it though.

For low bandwidth operations like this, though, a simple resistive divider is really all you need to drop the voltage to 3.3V.

As a point of interest, from the data sheet of your specific logic chip there is this:

Input clamp current, I IK (V I < 0 or V I > V CC ) (see Note 1) .................. ±20 mA

NOTES: 1. The input and output voltage ratings may be exceeded if the input and output current ratings are observed.

So as long as the current through the ESD diodes does not exceed 20mA you can safely over-power the input voltage. You'd want to keep the current to a minimum though to keep the heat dissipation to a minimum.

• +1 just for the first sentence. (SE doesn't allow me to give another one for the rest) Aug 31, 2014 at 11:41
• Very good answer. The only improvement I would suggest is adding to "You can get nice shift registers with constant current sink specifically designed for LED usage." a phrase like "the parts may be called 'LED display drivers'", and maybe even "and are made by many companies e.g. TI, Maxim Integrated, ..." Aug 31, 2014 at 18:04