Electrical – SPI with multiple slaves working on different voltages

microcontrollerspi

Is there any way to hook up two slave devices in SPI mode: one working on 3.3V and another on 5V level, using a micro controller without using a logic level converter to interface between them? Suggestions of any micro controllers which would allow this would also be great.

Best Answer

Without any active level-shifting circuitry involved, you basically need to find three devices that are all 5V-tolerant on their inputs, and secondarily, for the devices running at 3.3V, you need to make sure that their VOH meants the VIH requirements for the 5V part (i.e. if a device outputs 3.3V, will that 5V part think that is a '1' or a '0'). That's a gross oversimplification of I/O thresholds (VIH/VIL/VOL/VOH) but should put you on the right track.

Passively, Microchip has a Tips 'n Tricks document that details some methods in the '3V Tips 'n Tricks' section, including diodes, series resistors, etc.

I guess though, at the end -- why can't you use a level-shifter? If the 5V SPI device can read 3.3V I/O correctly, you only need one on the MISO of the 5V part. I.E:

SCK -- 3.3V out from master, MOSI -- 3.3V out from master, MISO -- 3.3V from 3V SPI slave (5V->3.3V through level-shifter for 5V SPI slave), CS# -- pulled-up to 3.3V, brought low by master