Forums

I2C Level Translator

Started by Tim Wescott May 9, 2016
So, I was happily working away, designing in a 2.5V part to talk to the 
I2C bus from a 5V processor, when reality caught up to me.

2.5V.  5V.  I2C.

It appears that NXP has some I2C level translators -- does anyone have 
any mileage with them?  Do they work?  Anyone have any parts to either 
embrace or avoid?  I can certainly see some issues with trying to make it 
all reliable, and back when NXP was Phillips I had to coerce some pretty 
weird stuff into working correctly, up to and including yanking one of 
their I2C to microprocessor bus chips off a board and bit-banging the 
I2C.  So I'm not ready to fully believe in the NXP parts.

-- 

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
On Monday, May 9, 2016 at 1:35:24 PM UTC-5, Tim Wescott wrote:
> So, I was happily working away, designing in a 2.5V part to talk to the > I2C bus from a 5V processor, when reality caught up to me. > > 2.5V. 5V. I2C. > > It appears that NXP has some I2C level translators -- does anyone have > any mileage with them? Do they work? Anyone have any parts to either > embrace or avoid? I can certainly see some issues with trying to make it > all reliable, and back when NXP was Phillips I had to coerce some pretty > weird stuff into working correctly, up to and including yanking one of > their I2C to microprocessor bus chips off a board and bit-banging the > I2C. So I'm not ready to fully believe in the NXP parts. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com
The SCL and SDA lines of I2C are open drain / open collector so as long as your 5V part has TTL levels (0.8V and lower is a zero, 2V and higher is a one), all you need is two pull-ups to 2.5V. Make the pull-ups stiff, 1K - 2.2K.
On Mon, 09 May 2016 12:00:56 -0700, papabear546 wrote:

> On Monday, May 9, 2016 at 1:35:24 PM UTC-5, Tim Wescott wrote: >> So, I was happily working away, designing in a 2.5V part to talk to the >> I2C bus from a 5V processor, when reality caught up to me. >> >> 2.5V. 5V. I2C. >> >> It appears that NXP has some I2C level translators -- does anyone have >> any mileage with them? Do they work? Anyone have any parts to either >> embrace or avoid? I can certainly see some issues with trying to make >> it all reliable, and back when NXP was Phillips I had to coerce some >> pretty weird stuff into working correctly, up to and including yanking >> one of their I2C to microprocessor bus chips off a board and >> bit-banging the I2C. So I'm not ready to fully believe in the NXP >> parts. >> >> -- >> >> Tim Wescott Wescott Design Services http://www.wescottdesign.com > > The SCL and SDA lines of I2C are open drain / open collector so as long > as your 5V part has TTL levels (0.8V and lower is a zero, 2V and higher > is a one), all you need is two pull-ups to 2.5V. Make the pull-ups > stiff, 1K - 2.2K.
Would work -- except that the processor is 5V CMOS levels, so it wouldn't see 2.5V as high. Hence the need for level translators in the first place. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Den mandag den 9. maj 2016 kl. 20.35.24 UTC+2 skrev Tim Wescott:
> So, I was happily working away, designing in a 2.5V part to talk to the > I2C bus from a 5V processor, when reality caught up to me. > > 2.5V. 5V. I2C. > > It appears that NXP has some I2C level translators -- does anyone have > any mileage with them? Do they work? Anyone have any parts to either > embrace or avoid? I can certainly see some issues with trying to make it > all reliable, and back when NXP was Phillips I had to coerce some pretty > weird stuff into working correctly, up to and including yanking one of > their I2C to microprocessor bus chips off a board and bit-banging the > I2C. So I'm not ready to fully believe in the NXP parts. >
we use a tca9509 from a 1.8V master to 3.3V slaves, though I'm not sure if it works in the opposite direction
On Mon, 09 May 2016 13:35:18 -0500, Tim Wescott
<seemywebsite@myfooter.really> wrote:

>So, I was happily working away, designing in a 2.5V part to talk to the >I2C bus from a 5V processor, when reality caught up to me. > >2.5V. 5V. I2C. > >It appears that NXP has some I2C level translators -- does anyone have >any mileage with them? Do they work? Anyone have any parts to either >embrace or avoid? I can certainly see some issues with trying to make it >all reliable, and back when NXP was Phillips I had to coerce some pretty >weird stuff into working correctly, up to and including yanking one of >their I2C to microprocessor bus chips off a board and bit-banging the >I2C. So I'm not ready to fully believe in the NXP parts.
As Philips originated and standardized both, you'd be better off reading up on the difference and limitations built into the methods than blaming the parts. No profit in it. Your scope may tell you more than bus monitoring tools can, if there are issues in a specific app, even if the solution ends up being in firmware. Timing and impedance levels, rather than bit banging. RL
On 5/9/2016 2:35 PM, Tim Wescott wrote:
> So, I was happily working away, designing in a 2.5V part to talk to the > I2C bus from a 5V processor, when reality caught up to me. > > 2.5V. 5V. I2C. > > It appears that NXP has some I2C level translators -- does anyone have > any mileage with them? Do they work? Anyone have any parts to either > embrace or avoid? I can certainly see some issues with trying to make it > all reliable, and back when NXP was Phillips I had to coerce some pretty > weird stuff into working correctly, up to and including yanking one of > their I2C to microprocessor bus chips off a board and bit-banging the > I2C. So I'm not ready to fully believe in the NXP parts.
I2C is open collector. You can connect a 2.5 volt bus to the 5 volt bus through a quickswitch without interfering with the logic in any way. You might need to use a diode in series with the power supply to the quickswitch part which already drops the 5 volt supply just enough to limit the low voltage side to 3.3 volts. One more diode drop gets you pretty close to 2.5 volts. -- Rick C
On Monday, May 9, 2016 at 2:40:41 PM UTC-5, Tim Wescott wrote:
> On Mon, 09 May 2016 12:00:56 -0700, papabear546 wrote: > > > On Monday, May 9, 2016 at 1:35:24 PM UTC-5, Tim Wescott wrote: > >> So, I was happily working away, designing in a 2.5V part to talk to the > >> I2C bus from a 5V processor, when reality caught up to me. > >> > >> 2.5V. 5V. I2C. > >> > >> It appears that NXP has some I2C level translators -- does anyone have > >> any mileage with them? Do they work? Anyone have any parts to either > >> embrace or avoid? I can certainly see some issues with trying to make > >> it all reliable, and back when NXP was Phillips I had to coerce some > >> pretty weird stuff into working correctly, up to and including yanking > >> one of their I2C to microprocessor bus chips off a board and > >> bit-banging the I2C. So I'm not ready to fully believe in the NXP > >> parts. > >> > >> -- > >> > >> Tim Wescott Wescott Design Services http://www.wescottdesign.com > > > > The SCL and SDA lines of I2C are open drain / open collector so as long > > as your 5V part has TTL levels (0.8V and lower is a zero, 2V and higher > > is a one), all you need is two pull-ups to 2.5V. Make the pull-ups > > stiff, 1K - 2.2K. > > Would work -- except that the processor is 5V CMOS levels, so it wouldn't > see 2.5V as high. > > Hence the need for level translators in the first place. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com
http://www.nxp.com/documents/data_sheet/GTL2002.pdf
Am Montag, 9. Mai 2016 22:18:15 UTC+2 schrieb papab...@gmail.com:
> On Monday, May 9, 2016 at 2:40:41 PM UTC-5, Tim Wescott wrote: > > On Mon, 09 May 2016 12:00:56 -0700, papabear546 wrote: > > > > > On Monday, May 9, 2016 at 1:35:24 PM UTC-5, Tim Wescott wrote: > > >> So, I was happily working away, designing in a 2.5V part to talk to the > > >> I2C bus from a 5V processor, when reality caught up to me. > > >> > > >> 2.5V. 5V. I2C. > > >> > > >> It appears that NXP has some I2C level translators -- does anyone have > > >> any mileage with them? Do they work? Anyone have any parts to either > > >> embrace or avoid? I can certainly see some issues with trying to make > > >> it all reliable, and back when NXP was Phillips I had to coerce some > > >> pretty weird stuff into working correctly, up to and including yanking > > >> one of their I2C to microprocessor bus chips off a board and > > >> bit-banging the I2C. So I'm not ready to fully believe in the NXP > > >> parts. > > >> > > >> -- > > >> > > >> Tim Wescott Wescott Design Services http://www.wescottdesign.com > > > > > > The SCL and SDA lines of I2C are open drain / open collector so as long > > > as your 5V part has TTL levels (0.8V and lower is a zero, 2V and higher > > > is a one), all you need is two pull-ups to 2.5V. Make the pull-ups > > > stiff, 1K - 2.2K. > > > > Would work -- except that the processor is 5V CMOS levels, so it wouldn't > > see 2.5V as high. > > > > Hence the need for level translators in the first place. > > > > -- > > > > Tim Wescott > > Wescott Design Services > > http://www.wescottdesign.com > > http://www.nxp.com/documents/data_sheet/GTL2002.pdf
Hi, Or see figure 45 of the I2C Bus Specification which shows how to connect devices with different voltage levels using MOSFETs. Here is a link to the document: http://www.cs.unc.edu/Research/stc/FAQs/Interfaces/I2C-BusSpec-V2.1.pdf Best regards, Martin
On Monday, May 9, 2016 at 3:33:04 PM UTC-5, martinb...@gmail.com wrote:
> Am Montag, 9. Mai 2016 22:18:15 UTC+2 schrieb papab...@gmail.com: > > On Monday, May 9, 2016 at 2:40:41 PM UTC-5, Tim Wescott wrote: > > > On Mon, 09 May 2016 12:00:56 -0700, papabear546 wrote: > > > > > > > On Monday, May 9, 2016 at 1:35:24 PM UTC-5, Tim Wescott wrote: > > > >> So, I was happily working away, designing in a 2.5V part to talk to the > > > >> I2C bus from a 5V processor, when reality caught up to me. > > > >> > > > >> 2.5V. 5V. I2C. > > > >> > > > >> It appears that NXP has some I2C level translators -- does anyone have > > > >> any mileage with them? Do they work? Anyone have any parts to either > > > >> embrace or avoid? I can certainly see some issues with trying to make > > > >> it all reliable, and back when NXP was Phillips I had to coerce some > > > >> pretty weird stuff into working correctly, up to and including yanking > > > >> one of their I2C to microprocessor bus chips off a board and > > > >> bit-banging the I2C. So I'm not ready to fully believe in the NXP > > > >> parts. > > > >> > > > >> -- > > > >> > > > >> Tim Wescott Wescott Design Services http://www.wescottdesign.com > > > > > > > > The SCL and SDA lines of I2C are open drain / open collector so as long > > > > as your 5V part has TTL levels (0.8V and lower is a zero, 2V and higher > > > > is a one), all you need is two pull-ups to 2.5V. Make the pull-ups > > > > stiff, 1K - 2.2K. > > > > > > Would work -- except that the processor is 5V CMOS levels, so it wouldn't > > > see 2.5V as high. > > > > > > Hence the need for level translators in the first place. > > > > > > -- > > > > > > Tim Wescott > > > Wescott Design Services > > > http://www.wescottdesign.com > > > > http://www.nxp.com/documents/data_sheet/GTL2002.pdf > > Hi, > > Or see figure 45 of the I2C Bus Specification which shows how to connect devices with different voltage levels using MOSFETs. > > Here is a link to the document: > http://www.cs.unc.edu/Research/stc/FAQs/Interfaces/I2C-BusSpec-V2.1.pdf > > Best regards, > Martin
Yep, I've done it that way also. I used BSS123 FETs.
On Mon, 09 May 2016 13:18:11 -0700, papabear546 wrote:

> On Monday, May 9, 2016 at 2:40:41 PM UTC-5, Tim Wescott wrote: >> On Mon, 09 May 2016 12:00:56 -0700, papabear546 wrote: >> >> > On Monday, May 9, 2016 at 1:35:24 PM UTC-5, Tim Wescott wrote: >> >> So, I was happily working away, designing in a 2.5V part to talk to >> >> the I2C bus from a 5V processor, when reality caught up to me. >> >> >> >> 2.5V. 5V. I2C. >> >> >> >> It appears that NXP has some I2C level translators -- does anyone >> >> have any mileage with them? Do they work? Anyone have any parts to >> >> either embrace or avoid? I can certainly see some issues with >> >> trying to make it all reliable, and back when NXP was Phillips I had >> >> to coerce some pretty weird stuff into working correctly, up to and >> >> including yanking one of their I2C to microprocessor bus chips off a >> >> board and bit-banging the I2C. So I'm not ready to fully believe in >> >> the NXP parts. >> >> >> >> -- >> >> >> >> Tim Wescott Wescott Design Services http://www.wescottdesign.com >> > >> > The SCL and SDA lines of I2C are open drain / open collector so as >> > long as your 5V part has TTL levels (0.8V and lower is a zero, 2V and >> > higher is a one), all you need is two pull-ups to 2.5V. Make the >> > pull-ups stiff, 1K - 2.2K. >> >> Would work -- except that the processor is 5V CMOS levels, so it >> wouldn't see 2.5V as high. >> >> Hence the need for level translators in the first place. >> >> -- >> >> Tim Wescott Wescott Design Services http://www.wescottdesign.com > > http://www.nxp.com/documents/data_sheet/GTL2002.pdf
So, have you actually used it? Did it work? I understand the principle involved -- I want to know if anyone's done this and been happy. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com