Author Topic: Logic level shifting sanity check  (Read 4590 times)

0 Members and 1 Guest are viewing this topic.

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Logic level shifting sanity check
« on: July 19, 2015, 11:06:22 am »
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:



The SN74LVCC3245A that 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 is MC74VHC1GT50 that 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 devices but 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 one thread where 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.
 
« Last Edit: July 19, 2015, 11:10:17 am by prasimix »
 

Offline bobcat

  • Regular Contributor
  • *
  • Posts: 94
  • Country: us
Re: Logic level shifting sanity check
« Reply #1 on: July 19, 2015, 07:32:18 pm »
Take a look at the Texas Instruments TXS0108E level translator. It can do what you require.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Logic level shifting sanity check
« Reply #2 on: July 19, 2015, 08:15:14 pm »
For low speed (up to 400kb/s) for I2C

Old Philips app note:

http://www.adafruit.com/datasheets/an97055.pdf

New app note from NXP (formerly Philips) but I think the old one has more information :)

http://www.nxp.com/documents/application_note/AN10441.pdf

So 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

 

Offline Alexei.Polkhanov

  • Frequent Contributor
  • **
  • Posts: 684
  • Country: ca
Re: Logic level shifting sanity check
« Reply #3 on: July 19, 2015, 08:22:00 pm »
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

 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Logic level shifting sanity check
« Reply #4 on: July 19, 2015, 08:55:07 pm »
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.
 

Offline prasimixTopic starter

  • Supporter
  • ****
  • Posts: 2026
  • Country: hr
    • EEZ
Re: Logic level shifting sanity check
« Reply #5 on: July 20, 2015, 07:29:33 am »
Thanks everyone for your inputs. Regarding application notes I found particularly interesting the TI's Voltage-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).
« Last Edit: July 20, 2015, 07:31:47 am by prasimix »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf