USB host and 20 pins (output only) that are 5v tolerant

Status
Not open for further replies.

8bitAndy

Member
Hi I'm still learning about all the options available.
My project needs to interface with a 5v device through 20 output pins and also support USB host. I have a Teensy 4.1 that has great USB Host support but it is not 5v tolerant.
I am going down the route of using a lot of level shifters. Is there any other solution I'm missing?
Thanks
 
I don't fully understand your question. You said you need output only pins, but then you're talking about 5V tolerance which is a property of input pins.

Even on 5V tolerant boards like Teensy 3.2 & 3.5, when the pins are used as output you get 3.3V for logic high. If you need a full 5V level output signal, you really do need buffers like 74HCT245.
 
Hi Paul, you are right, I am still getting used to these issues. i need to be able to output 5 volts on 20 pins and have good USB host support. I'll check out the 74HCT245.
Thanks
 
Hi Paul, you are right, I am still getting used to these issues. i need to be able to output 5 volts on 20 pins and have good USB host support. I'll check out the 74HCT245.
Thanks
IIRC, the 74HCT245 is available in through hole form, while some of the other level shifters are only available in surface mount soldering. The through hole form can be used in breadboards without soldering using jumper wires (though you likely will want to solder things down as the design is finalized). Each 74HCT245 can translate up to 8 pins, so you would need 3 chips.

If you don't need the pins to be super-fast, another option is to use an I2C I/O expander, such as the MCP23017. This chip is an I2C device that has 16 pins for either digital input or output. There are 3 pins that set the address, which means you can have up to 8 MCP23017's on one I2C bus (i.e. 128 bits). The advantage for I2C is you don't need to hook all of the pins to the Teensy, and you can easily grow the number of pins. Because you want 5v output, I would likely use a bidirectional level shifter between the Teensy 3.6, 4.0, or 4.1 and the I2C bus with 2 MCP23017's. It is likely the same complexity as the 74HCT25

A third option that I don't know anything about is a shift register (https://learn.sparkfun.com/tutorials/shift-registers/all)
 
Status
Not open for further replies.
Back
Top