3.3V and 5V device on SPI with Teensy 3.6, Voltage level translator?

Status
Not open for further replies.

Mike_

Member
Hello!

I am trying to run a 5V reference ADC and a 3.3V OLED display on the same SPI bus on a teensy 3.6. I am using a MCP3008 and a 128x128 SSD1327 round OLED. This is supposed to be a digital car computer, interfaces with an aftermarket ECU over CANbus. Most of the sensors I want to use are 5V or thermistors needing dividers, I've tried a few things and I think just shifting SPI levels is best.

I think I have a fix, but I would like to check here first. I plan on using a MAX3390E, it's a unidirectional level translator with a three state mode. If I am not mistaken, I think this is necessary to keep the buffer from interfering with 3.3V SPI communication, at least on MISO. The three state pin needs to be low whenever I'm not using 5V SPI devices, I guess this disables internal pull up resistors so they don't override the 3.3V MISO? I'm thinking I can do this with a free pin, or can I use my LCD chip select signal?

Since I'm not using 3.3V SPI MISO as my OLED has no output data I ought to be able to skip all this three state nonsense, right? I don't plan on adding any more SPI devices, anyway. Could I just pull the tri state pin up and leave it that way?

I honestly have no idea what I'm doing, but here's a schematic of what I think might work.

RRhqiEs.png


Thanks in advance for any help!
 
I've never worked with the MAX3390E, myself, but the datasheet says that the TRISTATE function is a feature meant to improve use with multi-drop networks, where a high impedance state would be useful. Since you are just running between the uC and the MCP3008, I would think that the TRISTATE feature could be disabled without negative effect and the MAX3390E would act like a normal translator.
 
Thank you for the advise, I have an extra output pin nearby so I figure I'll control the tristate pin anyway just in case!
 
Status
Not open for further replies.
Back
Top