74LVC245 to down-shift into 3.3V GPIO, safe?

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
diaphone
 
Posts: 34
Joined: Thu Apr 21, 2022 8:38 pm

74LVC245 to down-shift into 3.3V GPIO, safe?

Post by diaphone »

I'm building a device that reads from legacy 5V flash memory using a Teensy 4.1, which does not have 5V-tolerant pins like the Teensy 3.5 I was using before it. So, I've added two 74LVC245 transceivers, supplied 3.3V Vcc, to convert down. This works, and I haven't killed a Teensy yet, but I see something on the scope that gives me a bit of concern: While the outputs of the 245 do settle quickly to 3.3V output for HIGH bits, the step response is underdamped and the voltage on the pins consistently overshoots to 4.4-4.5V, almost the level of the 5V lines coming in!

What I don't know is whether this is OK for the Teensy, or if I need to do something further to clamp this. In otherwords, is 4.5V into a 3.3V pin only a problem if it's sustained long enough for currents or heating inside the MCU to do damage, or is a brief pulse enough to cause failure of a pin? You can see from my photo that the pin is pulsing well over 3.3V for around 30ns or so.

Yellow is 5V from the Intel flash chip, cyan is the converted output pin from the SN74LVC245AN:
overshoot1.jpg
overshoot1.jpg (330.7 KiB) Viewed 195 times

User avatar
freddyboomboom
 
Posts: 267
Joined: Wed Feb 16, 2022 7:55 pm

Re: 74LVC245 to down-shift into 3.3V GPIO, safe?

Post by freddyboomboom »

Adafruit doesn't manufacture or engineer the Teensy line of boards.

You should probably ask the manufacturer instead.

User avatar
diaphone
 
Posts: 34
Joined: Thu Apr 21, 2022 8:38 pm

Re: 74LVC245 to down-shift into 3.3V GPIO, safe?

Post by diaphone »

Sorry, I didn't mean for the quesiton to necessarily be Teensy specific, lots of MCU dev boards use these same Arm family of chips. I thought maybe someone would be able to quickly point me to the definitive answer. PJRC doesn't make the chip, either, of course, NXP does; the Teensy is just exposing pins of the MCU.

With another hour of Googling and wading through PDFs, I did finally come across the definitive answer, it's on page 34 of NXP's "i.MX RT1060 Crossover Processors for Consumer Products" datasheet, a footnote in section 4.3.1.2 "Single-voltage GPIO DC Parameters":
Overshoot and undershoot conditions (transitions above NVCC_XXXX and below GND) on switching pads must be held
below 0.6 V, and the duration of the overshoot/undershoot must not exceed 10% of the system clock cycle. Overshoot/
undershoot must be controlled through printed circuit board layout, transmission line impedance matching, signal line
termination, or other methods. Non-compliance to this specification may affect device reliability or cause permanent damage
to the device.
So, to be safe, I put 100 ohms of series resistance on both sides of each 245, which brought everything down to critically-damped levels with no overshoot and no significant imact on timings.

User avatar
freddyboomboom
 
Posts: 267
Joined: Wed Feb 16, 2022 7:55 pm

Re: 74LVC245 to down-shift into 3.3V GPIO, safe?

Post by freddyboomboom »

Whether the BOARD can tolerate it and whether the MCU can tolerate it are two completely different questions dependent on the design of the board and where there are bufering chips/circuits between the MCU and the GPIO pins.

Your initial post was asking if the BOARD could tolerate it.

Adafruit isn't the manufacturer of the MCU either, as you point out, so asking them if the MCU can tolerate something is asking the wrong people, too.

User avatar
diaphone
 
Posts: 34
Joined: Thu Apr 21, 2022 8:38 pm

Re: 74LVC245 to down-shift into 3.3V GPIO, safe?

Post by diaphone »

freddyboomboom wrote:Adafruit isn't the manufacturer of the MCU either, as you point out, so asking them if the MCU can tolerate something is asking the wrong people, too.
With all due respect, I'm not asking Adafruit though, as this is a customer-to-customer support forum and not their support ticket system. My question is directed at other customers who've had similar issues with the LVC245 chips, Teensy interfacing, both, or really just any related practical experience with safeguarding (or killing) 3.3V MCU pins and what preventative measures are actually advised. These are all products sold by Adafruit, and should be fair game for discussion. And while Adafruit doesn't manufacture MCUs, they do design their own dev boards and have very deep technical knowledge of the products they sell too. If they respond here as well, I see that as a bonus.

Asking the chip manufacturer isn't really a good option, IMO. Big chip manufacturers don't generally have 1-on-1 support accessible to hobbyists, or care particularly much about how to get their chips working on a solderless breadboard. They primarily offer tech support to other big companies for whom they are an OEM chip supplier. My questions are really unique to the hobbyist use case, and I suspect the userbase here is actually better suited to help than even the chip maker is.
freddyboomboom wrote:Whether the BOARD can tolerate it and whether the MCU can tolerate it are two completely different questions dependent on the design of the board and where there are bufering chips/circuits between the MCU and the GPIO pins. Your initial post was asking if the BOARD could tolerate it.
The Teensy 4.1's GPIO pins are just exposing the MCU's GPIO pins directly, which is why I wasn't making a distinction in my original post. Anyone who knows what MCU the Teensy has, and what its failure modes are, such that they can answer my question, is already going to know this about its board connections too.

While my ringing edges are solved for now by the series resistance, I'm still open to other suggestions or approaches. I kind of hope that this is only needed because this is on a breadboard, with lots of inductance that won't be present on the final PCB, but at the same time, I'm looking at a couple of different motherboards I have here, and I see things like 47-ohm resistor network chips on all of the 245 buffers, so maybe it's still an issue?

If anyone has real, practical experience with how level shifting with these 245 chips works out on a proper PCB (4-layer, with power and ground planes, short traces, etc), I would love to hear it. I'm debating whether or not I should include bridged pads for SMD resistors in my first prototype PCB, just in case.

And no, "Go ask Texas Instruments, because Adafruit doesn't manufacture the 74LVC245s they sell" is not the answer I'm looking for :-P

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: 74LVC245 to down-shift into 3.3V GPIO, safe?

Post by adafruit_support_mike »

WRT your original problem, the photo in the first post shows a lot of long wire. There's a strong chance that the overshoot your seeing is a wiring issue, not a device problem. The overshoot and ringing certainly look inductive.

In general, the LVC logic family is designed to be glue logic between 3.3V systems and 5V systems. The inputs are 5V-tolerant when the chip itself is powered from 3.3V.

Try putting 1k-to-10k resistors in series between the 74LVC245's output pins and the Teensy, with the physical resistors close to the Teensy. Any spikes generated by the parasitic inductance of the wiring will hit the resistor first, and the excess energy will burn off on its way through the resistor.

By the same token, moving the 74LVC245 as close to the Teensy as possible will reduce the amount of wire free to generate spikes.

User avatar
diaphone
 
Posts: 34
Joined: Thu Apr 21, 2022 8:38 pm

Re: 74LVC245 to down-shift into 3.3V GPIO, safe?

Post by diaphone »

adafruit_support_mike wrote:WRT your original problem, the photo in the first post shows a lot of long wire. There's a strong chance that the overshoot your seeing is a wiring issue, not a device problem. The overshoot and ringing certainly look inductive.
Oh, absolutely. I knew when I threw this together that I'd likely be at or beyond the limits of what is reasonable to breadboard with a spaghetti mass of dupont wires. I would certainly hope that the 74LVC245 doesn't ring like this when I get this schematic made with a small SMD PCB. That said though, I took a look at the motherboard of the synthesizer I'm designing these memory expansions for, and I do see that most of the 245 buffers on the board have tiny resistor network chips on one side of them, mostly 47-ohms it looks like.
adafruit_support_mike wrote:Try putting 1k-to-10k resistors in series between the 74LVC245's output pins and the Teensy, with the physical resistors close to the Teensy. Any spikes generated by the parasitic inductance of the wiring will hit the resistor first, and the excess energy will burn off on its way through the resistor.
This is where I ended up putting the resistors, and 100 ohms was enough to get it to datasheet-safe overshoot, and 220 ohms has no overshoot. I may not need them on the final PCB, but on the first prototype I decided to put bridged SMD resistor pads in the paths from 245 to Teensy, so I can cut those traces and add resistors if necessary to keep the Teensy safe.
adafruit_support_mike wrote:By the same token, moving the 74LVC245 as close to the Teensy as possible will reduce the amount of wire free to generate spikes.
OK, thanks! I will try to crowd these components as best I can without introducing any new problems :-)

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: 74LVC245 to down-shift into 3.3V GPIO, safe?

Post by adafruit_support_mike »

Glad to hear you got things working. Happy hacking!

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”