I want to buy Logik level shifters exactly like these here. However I can't buy it from adafruit as shipping to Europe is extremely expensive. I found these on Ebay. They seem to be right but they aren't called exactly the same. Ada fruits are called: 74LVC245, the ones from Ebay however 74HC245N. What is the difference? Can I use them the same way?
The LVC vs HC part is important, as aarg explained. Typically the letters on the end either describe the package (DIP, SOIC, etc.) or the packaging (tape and reel, tube, etc).
Chagrin:
What am I missing and/or what makes you say that?
It has diodes between the input/output pins and Vcc, according to the datasheet. See recommended operating conditions for Input Voltage, maximum is VCC for the HC, 5.5v for the LVC
The 74HC/74HCT family has the same pin-out as the 74 series and provides the same
circuit functions. The family includes several HEF4000B family circuits that do not have
TTL counterparts, and have some special circuits. The basic family of buffered devices,
designated as xx74HCxxxx, operates at CMOS input logic levels for high-noise immunity
with negligible typical quiescent supply and input current. The family requires a power
supply of 2 V to 6 V. A subset of the family, designated as xx74HCTxxxx with the same
features as the “HC-types” will operate with a standard TTL power supply of 5 V (±10 %)
and logic input levels (0.8 V to 2.0 V) for use as pin-to-pin compatible CMOS
replacements for reducing power consumption without loss of speed. These types are
also suitable for TTL-to-CMOS switching converters.
[quote author=Coding Badly link=msg=2377863 date=1441006630]
In my experience this works a little better... https://www.adafruit.com/products/757[/quote]. . . . . . and it is bidirectional (without needing to control a direction pin) which can be essential, such as for I2C.
LVC stands for Low Voltage Cmos. It is 5V input tolerant but outputs 3.3V when run on 3.3V, making it ideal as a level shifter for 5V to 3.3V. To go from 3.3V to 5V requires a different chip.
Your question is like asking for an airline ticket without specifying "where".
You were asked to specify what you are trying to do and post a schematic.
You have not done so. You were asked to specify whether you are trying to shift from 3.3 V to 5 V , or the opposite.
We cannot answer a yes/no question without details.
Pay attention.
If you are asked a question, answer it.
bestanamnetnogonsin:
Sorry. I want to do serial communication between a UNO and a DUE. The Idea is, I use 2 chips. One 3v3 to 5V and one 5v to 3v3.
You have been given some incorrect information in this thread.
I assume you are wishing to use SPI serial communication.
To shift from 5V to 3.3V you could use the 74LVC245 but not the 74HC245. To give an output swing limited to 3.3V maximum, you would have to power the chip with 3.3V. The 74HC245 is not tolerant of 5V on its inputs. As SDI communication does not involve bidirectional transmission on any connection, one option is simply to drop from 5V to 3.3V using two resistors as a voltage divider.
To shift from 3.3V to 5V you don't need any level shifting. The minimum voltage regarded as 'high' by the Uno's ATmega328P is 0.6*VCC.
The Sparkfun or Adafruit level shifters can simultaneously provide both 3.3V to 5V and 5V to 3.3V level shifting on four lines. So one breakout board can be used for the MISO, MOSI, SCK and SS lines. Although you could get away with using resistor voltage dividers, it probably makes sense to use a Sparkfun or Adafruit level shifter.
I understand the SPI library works only in master mode so you need advice before you connect your Uno to your Due.