I'm trying to interface my Arduino with a HopeRF RFM95W module. I successfully interfaced with a 3.3V Pro Mini, but I can't get my Uno to recognize it.
I realize the Uno uses 5V SPI while the Pro Mini uses 3.3V, so I tried a resister divider on each SPI line but that failed.
I'm really not all that familiar with level shifting. I have a 74VHCT125 that I can salvage from an old cicruit. Would that do the trick? If so, can you help me with a diagram so I hook it up right?
Not by itself. SPI has MISO going the other way, so you can use resistor-dividers to go from 5V to 3.3V,
but the other direction needs a voltage increase, which requires active circuitry.
If you send a signal the wrong way through a potential divider it is no longer a potential divider, just a load. Yes it will work but not as effectively or reliably as not having one for that MISO signal.
Thanks for that. They specifically say I2C, so would they work with SPI? I noted that SparkFun's TXB0104 based one states it works with SPI but not I2C.
[edit] Following through on their "hook up" link, I see reference to SPI. So that should be good. Thanks.
Here's what I use for SPI between 5V and 3.3V:
cd74HC4050 powered from 3.3V to go from 5V to 3.3V (has higher voltage tolerant inputs when powered from 3.3V), and some kind of '125 part powered from 5V to bring MISO from 3.3V back to 5V, with its OE/ line controlled by the device's chip/slave select line: to isolate the devices data out line when it is not active (from 5V MISO signals), to prevent any diode clamps from dragging MISO down to 5V levels, and to kick it off the bus when not selected (some parts are known to drive MISO after their slave select has been deselected - SD cards and Ethernet modules come to mind).
With VCC between 2.4V and 5.5V, the Input High Voltage of the pins is 0.6VCC. For a 5V Uno, that's 3V. That means a 3.3V voltage will be detected as HIGH. You shouldn't need a level translator for the MISO line back to the Uno.
You will still need voltage dividers on CS, MOSI, and SCLK because 5V is above the absolute maximum rating of the chip and the datasheet does not say the inputs are 5V tolerant like for an nRF24L01 module.
You shouldn't need a level translator for the MISO line back to the Uno.
That's fine if it's the only device on the bus. Often times there are other devices, that are driving 5V on MISO, and that signal can get degraded and/or interfered with by the unbuffered 3.3V MISO. So providing isolation is a good idea.