interfacing 3v and 5v logic circuits

Just want someone to verify my belief…

From the respective data sheets, it appears I can directly connect the digital IO and UART pins of an XBee (at 3v) to IO and UART pins of an ATMega128 at 5v with zero ill effect.

If I’m wrong, please point me to the documentation I didn’t read, or didn’t read correctly.

Thanks,

Digi really should add an “Absolute Maximum Ratings” section to their Xbee datasheets.

The short answer is you are wrong.

The Xbee datasheets specify Vcc to be 2.8V to 3.4V. Though, they never specify the max Vih, it is implied that the I/O and UART pins to not exceed Vcc. The datasheet would state if the I/O and UART pins are 5V tolerant but in this case, it does not.

Please take a look at the Digi app note on their website located here: http://www.digi.com/support/kbase/kbase … sp?id=2160

There are many posts on how to do “voltage level shifting”. Sparkfun even sells one that can be found here:

http://www.sparkfun.com/commerce/produc … ts_id=8745.

If you need something quick and fast, a pair of resistors to create a voltage divider would probably work on the I/O and UART output pins from the Atmega128 to the Xbee.

Your homework is to figure out if the Xbee’s Voh (Voltage Output High) when the Xbee Vcc is powered from 2.8V to 3.4V is enough to satisfy the Atmega128’s Vih (Voltage Input High) when the Atmega128’s Vcc is 5V.

Nullz

Thanks Nullz. I did do more research after my original post and discovered I was wrong, or at least on the ragged edge. I should have updated my post.

The Atmega128 (my particular example) data sheet says VIH min = 0.6 Vcc, which is borderline at 3v into 5v. More importantly, that statement morphed into “VIH min = 0.6 V” by the time it reached my brain. As you noted, the XBee data sheet says only “-” about maximum IO signal voltage. In the presence of other clearly stated maximums, it implies there’s no limit. After the first discovery, I had planned to use that exact level shifter you mentioned.

Thanks again for replying.