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:
![](https://i.imgur.com/zGN8DCL.png)
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:
![](https://i.imgur.com/I8Tim8h.png)
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:
![](https://i.imgur.com/VV9yrBx.png)
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.