Communicating using UART to a 3.3V device

Hi,

I just realized that in all the time I have been messing around with micro controllers, I have never communicated serially to a device that wasn't 5V and I have a whole bunch of questions.

First off, can I just directly connect the RX pin on the 3.3V device to the TX pin on the Arduino? Or do I need to add a resistor in-between? Or a voltage divider?

Actually, that wasn't all that many questions. Basically, I'm just wondering what is good form in communicating between devices of varying voltages?

Thanks!

A few low voltage devices have 5V tolerant inputs, and 3.3V is above the level needed for a high on the ATmega input pins, so they can simply be attached directly.

There are dedicated level translator ICs to take care of this job.

Resistors can be set up as a voltage divider. Diodes can be used to clamp the voltage. Transistors can be used as well.

Another method, if you can take the clock rate hit, is to use a low voltage ATmega at the same voltage as the device you are interfacing. (The low voltage ATmegas run at half the speed of the 5V versions).

-j

You can also use a dedicated voltage translator IC. Many manufacturers make them in 5V to 3.3V.
However, A quick test shows the Atmega168s UART triggers at 3.3V levels just fine. You should be able to get away with hooking the devices TX to the Ardiono's RX directly and either placing a large resistor (10K?) between the Arduino's TX and the devices RX or a voltage divider (Arduino TX->1.8K resistor->3.9K resistor->GND and connect the devices RX to the resistor-resistor junction).

An excellent discussion on the topic....

Hi,

I just realized that in all the time I have been messing around with micro controllers, I have never communicated serially to a device that wasn't 5V and I have a whole bunch of questions.

First off, can I just directly connect the RX pin on the 3.3V device to the TX pin on the Arduino? Or do I need to add a resistor in-between? Or a voltage divider?

Actually, that wasn't all that many questions. Basically, I'm just wondering what is good form in communicating between devices of varying voltages?

Thanks!

Voltage dividers are ok for slow interfaces (less than 1MHz?). If you need high speed, then it is better to use a level shifter (LCX245) to keep the same aproximate form of the original signal.

Voltage dividers are ok for slow interfaces (less than 1MHz?). If you need high speed, then it is better to use a level shifter (LCX245) to keep the same aproximate form of the original signal.

He's discussing connecting to a 3.3V UART, so even assuming 115200 baud, we're well under 1MHz.

Voltage dividers are ok for slow interfaces (less than 1MHz?). If you need high speed, then it is better to use a level shifter (LCX245) to keep the same aproximate form of the original signal.

He's discussing connecting to a 3.3V UART, so even assuming 115200 baud, we're well under 1MHz.

@spiffed, I am not trying to say voltage dividers won't work. I am just trying to shed some light into the 5V - lower voltage interfacing issues.