3.5v SPI?

What would be the best way to go about sending info to a chip that expects 3.5v logic levels?

You might be able to get away with a simple voltage divider, using 2 resistors per I/O line. Atmega8 outputs are +5V when high. You want to convert this down to +3.5V, which is 3.5/5 = 0.7 times as much. So you want to find two resistors R1 and R2 such that R2/(R1+R2) = 0.7 (or close enough). Also, R1+R2 should be on the order of 10K to 100K. This is large enough to avoid wasting a lot of power, but small enough so that the input impedance of the receiving device does not mess up the voltage level.

See the following for schematic:


I'm actually using a voltage divider to power the chip, I was just hoping there was some easier way so I don't have to add 3 more dividers onto my small breadboard, trying to fit everything on a protoshield.

Could I just use a diode with the right voltage drop? I have some led's that work perfectly...

I would be worried about using just a diode by itself, because of course it allows current to flow only one way. When hooked up to a high-impedance input, it may serve to charge up the input pin like a capacitor, and not allow the charge to escape quickly enough when the +5V output goes back to 0V. Another thing to consider is that diodes do not have a constant voltage drop. The voltage drop depends on the amount of current flowing through the diode. With a small enough current flowing due to high impedance, the 3.5V input pin may end up receiving higher voltage than it should. So you might end up needing a diode with a pull-down resistor on the input pin, at which point you are using up as much real estate on your board as if you used 2 resistors.

It is possible to save space by mounting the resistors vertically, with one lead wrapped over in a U shape, as shown here: