Hex level shifter vs level shifter

What is the difference between the 74HC4050 Hex level shifter and sparkfun's level shifter?

Which one should be used for SPI & I2C bus?

I've seen that for micro-sd breakout boards and for the RFM95W LoRa breakout, the 74HC4050D is used. But, if I'm not mistaken, it offers one way conversion. So, if one where to read from the sd, wouldn't that be impossible?

The 74HC4050 is not a level shifter where as the sparkfun product is.

But, if I'm not mistaken, it offers one way conversion.

You are not mistaken.

First paragraph in the 74HC4050 datasheet: "The 74HC4050 is a hex buffer with over-voltage tolerant inputs. Inputs are overvoltage tolerant to 15 V which enables the device to be used in HIGH-to-LOW level shifting applications."

Thank you for the replies!

What about the buses? Which one is better / correct to use and why?

Sparkfun device is a bi-directional level shifter, the 74HC4050 is uni-directional level shifter.

The I2C bus is bi-directional, the SPI bus is uni-directional.

There is no better, only correct.

For an SD card you only have the option SPI. And only at 3.3V. Fortunately most 5V Arduinos can read a 3.3V
logic signal reliably (the ATmega's for instance). Note that the supply must be capable of 150mA or more
without drooping, SDcards are power-hungry and that 3.3V needs to be a solid 3.3V to be readable by a 5V
ATmega. That usually means a separate external 3.3V regulator for the SD card and its level shifter.

Excellent!
So sparkfun's level shifter for I2C plus a voltage regulator and the 74HC4050 for SPI.

Thank you very much!

avr_fred:
SPI bus is uni-directional.

Um, no. MISO == "master in, slave out".

That pin does not need a level translator. You just about get away with it connecting it directly. If not then that buffer is wired up the other way round.

I have used ATMega 2560 directly to a 3V3 SPI device without the need for level shifters.

Also, SPI isn't uni-directional. SPI ports can be configured for bidirectional modes as well.
The bit that controls the MOSI and MISO of the SPI used for bidirectional mode of operation is SPC0.
In master mode this bit controls the output buffer of the MOSI, in slave mode it controls the output buffer of the MISO port. In master mode, SPC0 is set, which aborts an ongoing transmission and allows SPI into idle or reception.

I have used ATMega 2560 directly to a 3V3 SPI device without the need for level shifters.

Yes, people do violate manufacturers' absolute maximum ratings, and sometimes get away with it.

Please do not recommend that extremely unwise approach on this forum, as it tends to destroy equipment.

Connecting 5v device to 3.3v one without level shifter is only an acceptable approach if the device you're initerfacing with is 5v tolerant. SD cards are not.

some do not realise that ATMega 2560 chip comes with built-in 50K internal resistors on SPI ports.
It was meant to be modular. I2C does not so that external 10K resistors are used.

Can you actually point to the part of the data sheet that says that please.

I2C does not so that external 10K resistors are used.

Rubbish I wish you would not say Things that are clearly untrue.

nchia:
some do not realise that ATMega 2560 chip comes with built-in 50K internal resistors on SPI ports.
It was meant to be modular. I2C does not so that external 10K resistors are used.

You might be taking about pull-up resistors, which have nothing to do with the issue because they are not wired in series.
The others are totaly right.