Logic level shifting sanity check - Page 1
Forum section: electronics / projects

author: prasimix
author_rank: Unknown
timestamp: July 19, 2015, 11:06:22 am
content: I made a short investigation about level shifting that I'll require in my project. I found interesting discussion in thread:A question about logic level shifting, 74LVC74, and 74HC(T) vs 74AHC(T)where general 3.3 to 5V and vice versa is covered. I need something on top of that, first here is an block diagram:The system is consists of two parts: removable where MCU resides, and fixed with peripherals. MCU could be 3.3 or 5V and peripherals are only 3.3V. In case of 5V MCU a logic shifting/translation is required. But the same translators have to work properly even without translation when 3.3V MCU is connected. So, selected level shifting logic cannot be removed since it's on the fixed part of the system. Only power supply voltage is possible to manipulate.In general three types of connection is possible: bidirectional, output only and input only. In the next schematic I listed few parts that I hope are usable when 5V MCU is used:TheSN74LVCC3245Athat is listed under bidirectional section is currently my favorite since it can be used in all scenarios. Its price also seems reasonable (i.e. Farnell code:2342537). But I also added other devices in one place just as an exercise to see what is possible in each of mentioned scenarios. Things starts to be a little bit challenging when the same translators that ensure level shifting should works transparently in case when 3.3V MCU is used:Input only scenario is tricky since in that case it's not possible to use the same devices used for level shifting from 3.3 to 5V. For example HCT instead of HC has to be used to ensure proper level shifting with 5V MCU, but it cannot be used with 3.3V since recommended Vcc is usually in range of 4.5 to 5.5V.A "rare animal" seems that isMC74VHC1GT50that has VHC label but can be used for 3.3 to 5V translation what is not a feature of VHC family. Unfortunately this is single gate (1-bit) device and I need at least 10 of them what does not looks economical. ONsemi has i.e.NLSV and NLSX devicesbut they doesn't looks as something generally available.I put GTL devices only in 5V case for the sake of simplicity but it can be used in 3.3V case (no translation) and hopefully in all scenarios not inputs only. I'm not familiar with such devices and I found only onethreadwhere GTL2003 is mentioned.Please let me know about your opinions, suggestions about selected devices and this basic idea how to get configurable solution which can provide reliable communication between 3.3V peripherals and 3.3 or 5V MCU.

author: bobcat
author_rank: Regular Contributor
timestamp: July 19, 2015, 07:32:18 pm
content: Take a look at the Texas Instruments TXS0108E level translator. It can do what you require.

author: miguelvp
author_rank: Super Contributor
timestamp: July 19, 2015, 08:15:14 pm
content: For low speed (up to 400kb/s) for I2COld Philips app note:http://www.adafruit.com/datasheets/an97055.pdfNew app note from NXP (formerly Philips) but I think the old one has more informationhttp://www.nxp.com/documents/application_note/AN10441.pdfSo I guess it depends on what protocol are you using for your peripherals.I guess you could get this cheap board to test (only 4 channels)http://www.adafruit.com/products/757

author: Alexei.Polkhanov
author_rank: Frequent Contributor
timestamp: July 19, 2015, 08:22:00 pm
content: There is a whole web page or website entirely dedicated to logic level translation - check it out:http://www.interfacebus.com/Design_Translation.html#h

author: miguelvp
author_rank: Super Contributor
timestamp: July 19, 2015, 08:55:07 pm
content: Just to note that the Phillips app note is for bidirectional signals without the need to specify direction on the signal.But again, limited depending on what speeds are needed.

author: prasimix
author_rank: Unknown
timestamp: July 20, 2015, 07:29:33 am
content: Thanks everyone for your inputs. Regarding application notes I found particularly interesting the TI'sVoltage-Level-Translation Devices. I'm aware of TXS0108E but price-wise it's not so attractive as SN74LVCC3245A.EDIT: Something that I missed to mention initially is the speed: I need parallel and SPI data transfer (so it's more in range of MHz then hundred of KHz like in case od I2C).