Interfacing 5V CPU to 3.3V I2C

This forum is for posts that might be considered off-topic but that may be useful or interesting to members. Examples include posts about electronics or programming in general, other microcontrollers or interesting devices, useful websites, etc.
Post Reply
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Interfacing 5V CPU to 3.3V I2C

Post by spamiam »

I am considering using the Dallas DS32C35 RTC with FRAM

[http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5283]

It runs on 3.3v. It has 5v tolerant interrupt and clock signals which are open drain types.

But the I2C runs on 3.3v and it does not state explicitly that these are 5v tolerant.

I would have thought that as long as the pull-up resistors on the I2Csignals are not too small, then it should not overstress the RTC to have 5V on the I2C.

But since the docs specifically state that one set of signals ARE 5V tolerant and does not say such a thing about the others, then they are NOT 5V tolerant.

What would be the simplest and/or most reliable way to hook this device into a 5V I2C bus, while not overstressing the RTC.

Could it be as simple as a couple of normal diodes (0.7v Vf), or 3 or 4 diodes with a lower Vf so it adds up to 1.7V total Vf?

Would a transistor or 2 on each signal be better and not interfere with the max bus speed?

-Tony
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Interfacing 5V CPU to 3.3V I2C

Post by dkinzer »

spamiam wrote:What would be the simplest and/or most reliable way to hook this device into a 5V I2C bus, while not overstressing the RTC.
The simplest method would be to use pullups to 3.3V. This is the method used in Application Note 3974 which shows how to connect the DS32x35 to an 8051-type CPU.

Note that both SDA and SCL are bi-directional signals although SCL is commonly used in a uni-directional manner.
- Don Kinzer
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Re: Interfacing 5V CPU to 3.3V I2C

Post by spamiam »

dkinzer wrote:The simplest method would be to use pullups to 3.3V.
I thought that 3.3v was not totally reliable on the AVR devices to be read as "high".

I had failed to consider bidirectionality. This means that simple diode and transistor configurations might not do the trick either.

-Tony
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Interfacing 5V CPU to 3.3V I2C

Post by dkinzer »

spamiam wrote:I thought that 3.3v was not totally reliable on the AVR devices to be read as "high".
The specification for the AVR says that the guaranteed low and high switching thresholds are 0.2 x Vcc and 0.6 x Vcc, respectively. That means that when running on 5 volts anything above 3.0 volts is guaranteed to be seen as a logic high.
- Don Kinzer
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

Well, in that case 3.3 volts on the I2C bus is OK.

Now, what about other 5V devices on the bus? This may be a case where 2 separate busses may be necessary. Maybe most other devices would function reliably on a solid 3.3v.

In the application that I am doing right now, I am currently using a 5V precision clock and 5V FRAM. With this new Dallas combo precision RTC and FRAM, I only need the one device anyway!

-Tony
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

spamiam wrote:Now, what about other 5V devices on the bus?
You'll have to check the specifications for any other devices that you want to connect but I would guess that most 5 volt devices would interpret a level of 3 volts or more as a logic one.
- Don Kinzer
Post Reply