michael_x:
There's two questions I have in this level converter topic:
- High -> Low
Depending on how fast you are running your SPI communications, a simple potential divider will do the trick.
Do real resistors behave so bad, compared to ideal resistors without any frequency dependency, and compared to diodes I see usually as level converter recommendation ???
Yes, they can cause problems with high frequency comms - remember, traces have inductance - inductance + resistance = filter. Yes, you could use a diode to drop a small amount of voltage (schottky = ~0.4V, silicon = ~0.7V) so with a silicon you'd go from 5V to 4.3V - a chain of them together could get you to (2silicon + 1schottky) ~3.2V, but remember that the diodes block current in the reverse direction, so won't be able to sink current - you'll need a pull-down resistor to provide the logic low level. Cheaper and simpler to just use 2 resistors. Or you can use transistors to act as proxy switches, or a chip that can accept a 5V logic signal and give out a 3.3V one for higher frequency communications. There's (as always) many options.
michael_x:
2. Low -> High , if I do not want to rely on the assumption that 3V is high enough to be a logic HIGH in the 5V area ( KirAsh4's issue )
Do I need some IC doing the level shift, or minimally 2 transistors to get it non-inverting, or is there another electronics trick to "amplify" a 0...3V signal I'm not aware of ???
The simplest thing is to use any readily available 74HCT part that can be adapted to a buffer. One of the most common is the 74HCT08 quad AND gate. Take one of the AND gates, tie both inputs together, and it becomes a simple buffer - what logic level you put on the input is presented on the output. Run the chip from 5V, and the output will be a 5V logic level output. Being a TTL level chip (the T of HCT), the input "high" level is only 2V, so can be driven happily by the 3.3V of the Atmel.