Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Logical level i2c converter, YES or NO?

Status
Not open for further replies.

erpgc82

Junior Member level 1
Joined
Mar 21, 2021
Messages
17
Helped
0
Reputation
0
Reaction score
1
Trophy points
3
Activity points
228
Hello friends, I'm new to microcontroller programming and I came across a situation.

Micro in 3.3v, 18LF26K22 and I could not understand if it supports in SDA and SCL 5V. It will be connected to the ds1307 at 5v.

I couldn't understand whether I need YES or NO.
Some say it is necessary to use a logic level converter, others say that it is enough to connect the pull-up resistor to 3.3v.

After all, can I use only the pull-up or do I need to assemble a logic level converter circuit ??
 

Solution
You need to use a logic level converter I'm afraid. That device has a maximum VDD of 3.6V and none of its pins are 5V tolerant.
level-converter.jpg

A BSS123 is a good alternative to the 2N7000 but any 'logic level' small MOSFET will work. You need one for the SCL and one for the SDA lines.
You can add other 5V i2C devices from the same converter.

Brian.
You need to use a logic level converter I'm afraid. That device has a maximum VDD of 3.6V and none of its pins are 5V tolerant.
level-converter.jpg

A BSS123 is a good alternative to the 2N7000 but any 'logic level' small MOSFET will work. You need one for the SCL and one for the SDA lines.
You can add other 5V i2C devices from the same converter.

Brian.
 

Solution
I might be wrong here but SDA and SCL both open drain, PIC and RTC, and min logic 1 for DS1307 is 2.2V,
so if buss pullups are to PIC Vcc then everybody is happy. If the pullups dont turn on parasitic diode in
PIC, or if they do but injection current limited all is fine. But latter not issue since Pullups fed by PIC Vcc.



Regards, Dana.
 

Yes, DS1307 seems to support 3.3V logic level for I2C lines, no level converter needed. But I wonder why you are not using a 3.3V supplied RTC?
 

Hello friend, as I said, I'm learning.

And in the company, I have 1000 or more DS1307, which are from projects that the engineer used in the past, so I will continue to use them. The PIC18LF26K22 also has several units.


Thanks to everyone for your help, I understand that the DS1307 can work at 3.3 on the clock and data line. So I can just connect the pull-ups to 3.3v or use the logic level converter. Either option will work.
 

If the DS1307 also runs on 3.3V there is no problem but the PIC pins are not open drain. To control I2C lines they are driven low and the TRIS (like tri-state) is used to isolate the pin when it is to be externally pulled high. If the pull-up is to 5V it will exceed the PIC input voltage rating and will probably forward bias it's pin protection diode and clamp the voltage a little higher than VDD. It isn't a good solution but it will probably work. Some of the newer PICs have 5V tolerant pins but sadly not that one.

Brian.
 

Is this ever confusing, datasheet says -

1622193434869.png


1622193491159.png



Seems to imply its a standard open drain interface....


Regards, Dana.
 

Yes, SDA and SCL are open drain, but also clamped to Vdd by protection diodes. Respectively I2C pull-ups should connect to Vdd (3.3 V). As already stated, 5V supplied DS1307 can work with 3.3V I2C levels.
 

Some CMOS info, attached.


Regards, Dana.
 

Attachments

  • Passive.pdf
    406.9 KB · Views: 113
  • slya014a.pdf
    151.7 KB · Views: 84

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top