# Driving a 74HC245 in one direction with 3.3V when Vcc is 5V

I have a 5V device that accepts parallel data in. That data is buffered by a 74HC245 IC (TI datasheet, NXP datasheet) where the Dir pin is hard wired to drive in one direction. I can't change/modify this device hardware-wise.

To date I have been driving this device using an ATMega328P, running at 5V, with no problems.

I now have to switch to a 3.3V microcontroller for other reasons out of my control.

I am hoping that I don't have to add logic level adjustment circuitry in-between the microcontroller PCB and the device being controlled. Reading the datasheet of the 74HC245, the input high threshold is 2.4V(typ.) to 3.15V when Vcc is 4.5V. Being that the 74HC245 IC is supplied by 5V, I am concerned that 3.3V logic out of the microcontroller is going to be right on the limit.

Will I be able to get away without any logic level adjustment circuitry?

• 74HCT logic is the solution with TTL thresholds making the input compatible from 2 to 6V with a threshold of Vt=1.5V . Drive levels = Vdd. – Tony Stewart EE75 Jan 14 '20 at 16:39
• What is the device? – Bruce Abbott Jan 14 '20 at 21:59
• The device is a LED dot matrix panel. – sa_leinad Jan 24 '20 at 15:04

This will not work reliably. If you look at the TI datasheet you will see that $$\V_{IH}\$$ is specified at $$\3.15\$$V when $$\V_{CC} = 4.5\$$V, and it is clearly a strong function of $$\V_{CC}\$$. If we assume that $$\V_{IH}\$$ scales linearly then it would be $$\3.675\$$V when your power supply voltage is $$\5.25\$$V, which could be the case if your voltage regulator tolerance is 5%. In fact, this arrangement won't work is the supply voltage is above about $$\4.7\$$V.

Furthermore, if the supply voltage for the microcontroller is $$\3.3\$$V that doesn't mean that the logic signals will be right at $$\3.3\$$V. Check $$\V_{OH}\$$ for the microcontroller.

There are 74HC devices and there are 74HCT devices. The HCT device works with TTL levels at the input: -

Guess what the "T" might stand for.

If you can swap-out the HC for a HCT you'll be good to run.

• I think the statement "The HCT device works with TTL levels at the input" would benefit from the addition of "... which is compatible with 3.3V CMOS outputs". Without it one might wonder what TTL has to do with MCU running at 3.3V – Maple Jan 14 '20 at 19:36
• @Maple you’ve done a great job adding that addendum – Andy aka Jan 14 '20 at 19:41
• Good answer - Thanks! unfortunately (although I have the skills) I can't change the IC on the device. – sa_leinad Jan 24 '20 at 15:13

As an alternative to using the HCT chip, you could consider something like the 74LVC4245A, which is an octal transceiver with voltage translation. That particular one has a 3.6V limit on the B side so you'd have to flip it and invert the DIR line, but there are others such as 74LVC8T245 that will work from 1.2V to 5.5V on either side.

Many voltage translating types can avoid certain problems with power domain sequencing. With the HCT option you have to ensure the 3.3V supply is not present when the 5V supply is less than about 3V in order to stay within maximum limits.

From the 74LVC8T245 datasheet:

The devices are fully specified for partial power-down applications using IOFF. The IOFF circuitry disables the output, preventing any damaging backflow current through the device when it is powered down. In suspend mode when either VCC(A) or VCC(B) are at GND level, both A port and B port are in the high-impedance OFF-state.

The performance is generally higher as well, being a newer logic family.

Maybe the following is the solution for you. I just found this when I searched for a level shifter. And after I found that I found your question.

That is a commercial product from a reputable Thai electronic component supplier. I didn't try it myself. It seems you just have connect DIR to 3.3V. Problem solved.

This is just one circuit. In the download below you will find similar with 5V and 3.3V.

https://www.es.co.th/detail.asp?prod=005904425 Sorry, it's all in Thai but the circuit works in any language. You can download the data sheet with more info on that page.

I just looked a little on the internet. Here is the ready build circuit with English description. https://www.futurlec.com/Mini_Logic.shtml

• Thanks for posting your answer. However it is not what I am after. The circuit you post (with Dir pulled high) has the 5V logic changing into 3.3V logic. I need it the other way around (ie. 3.3V logic converted to 5V logic). – sa_leinad Jan 18 '20 at 16:57
• Your answer would be valid if you change your wording from you just have connect DIR to 3.3V to you just have connect DIR to GND – sa_leinad Jan 24 '20 at 15:24