# How do I translate voltages to user-supplied levels?

I'm working on an AVR/JTAG/whatever programmer. The programmer will interface with chips running at various voltage levels, ranging from 1.8V to 5V. The programmer runs at 3.3V.

The programmer interfaces with the programee through four 3-state pins, which I control from the 3.3V chip, and I need those pins to provide logic levels supplied by the user. I've tried the following (VDD is the user-supplied voltage), but unfortunately, with R1 = 220, the switching was too slow; I'd like to communicate at up to 10MHz.

I've looked at voltage-translator ICs, but the best that I found was SN74LVC8T245, which won't however allow me to tristate each pin separately.

What should I use to perform the voltage translation?

Here's what you need: T.I. SN74LVC1G125. It's a single tri-state buffer in a 5 pin package. It takes input voltages up to 5v, and spits out a voltage that's basically the same as VCC. And VCC can be 1.65 to 5.0v.

• Thanks! However, according to the datasheet, at VCC=5V, the buffer needs at least 3.5V on input to indicate high-level (see Vih parameter). How should I solve that? May 16, 2011 at 21:50
• @avakar Hmm, that will be a little tricky. The easiest way I can think of, while keeping things simple and fast, would be to use two of these parts in series. The first one bumps up the signal to maybe 4.2 volts while the second one is powered off of whatever the devices VCC rail is. Alternatively, TI has basically the same part in different logic families. One of those families might be closer to what you need.
– user3624
May 16, 2011 at 22:04
• I could potentially use SN74AHCT1G04, which has TTL input levels to boost to 5V and then down-convert to VDD. But I'd need two boosts per pin, one for input and one for output-enable. May 16, 2011 at 22:20
• @avakar You can use the Hex version of that part: SN74AHCT04, focus.ti.com/lit/ds/symlink/sn74ahct04.pdf. It doesn't help you much in complexity, but cuts down on the number of chips. The bottom line is this: You want high-ish speed and a wide voltage range. These are not common things, so you whatever solution you end up with will be a compromise. It will have one or more of the following features: slow, costly, lots of parts, or expensive. It's up to you to pick the mis-features that you can live with.
– user3624
May 16, 2011 at 22:36
• thank you for help! I went with your solution, 74ahct04 for boost to 5V plus three SN74LVC1G126 to get three 3-state pins. May 28, 2011 at 10:15

The Bus Pirate does voltage translation using 4066 Analog Bus Switches.

The clearest example is in the Bus Pirate Arduino Shield schematic:

• thanks! The problem is the same as with David's answer though. CMOS input levels are out of range for a 3.3V chip when VDD=5V. May 16, 2011 at 22:21