I'm faced with an interesting challenge: I'm using a microcontroller with 3.3 V logic, but I need to use a SPI (4-wire) interface with parts operating at three logic levels, namely 1.8, 3.3, and 5 V. Obviously 3.3 V isn't a problem, but I'm curious about the best way to handle the 1.8 and 5 V components. Of course I could use two discrete level translator ICs, but I'm hoping there's a simpler (i.e. cheaper, smaller footprint) solution. I already have ways to generate the voltage supplies, so that isn't an issue.
I'm aware of the following MOSFET level translation technique, which I understand well enough:
This allows a 3.3 V signal from the µC (from the left) to shift up to 5 V to a certain device (to the right). (It would have to be backwards for MISO.) I could similarly change the voltage on the right to 1.8 V to shift down for a different device. Here is my issue: If I were to simply switch the voltage between 5 and 1.8 V, I would almost certainly destroy the 1.8 V pins when at 5 V. Is there an elegant technique for allowing a shift to two different levels, or will I have to suck it up and use two separate circuits for the two translations?