Menu

I2C pullups

bed
2020-03-26
2020-03-27
  • bed

    bed - 2020-03-26

    I've just done a longer test.
    two I2C modules on a PIC.
    One module has 2 devices, a RTC DS3231 and a 32K EEPROM AT24C32, the second module is an Oled Display.
    On the double device there are pullup resistors on the data lines of the I2C bus.

    The SSD1306 OLED displays are advertised with 5V tolerance, this is true to the extent that most of them work.

    But in my test it showed up that with a test program the display froze after 2-10 seconds.
    And this is different for different Displays, some just works longer than others, one is not working.

    I wanted to get to the bottom of this. First I tried to reduce the voltage on the data lines a little bit. I experimented with series resistors, but they made the situation worse rather than better.

    The correct solution would be a level converter to get the 3.3V. Since my boards are now in production, I tried to approach the problem from another side. And right, if I add 2k7 resistors as pullup resistors, it works permanently and there are no more dropouts. Also with 1K it works just as cleanly.

    The question is now, why? I have no cable lengths worth mentioning, it is under 10cm.

    Is the resulting pullup resistance of 1k7 ohms simply better? According to the oscilloscope the value at SLA SLD is about 4V, maybe this is the answer.

    The test also works with 64Mhz PIC clock and 1000 Khz I2C speed. Touching the data lines with my fingers will not freeze the display anymore.

     

    Last edit: bed 2020-03-26
  • stan cartwright

    stan cartwright - 2020-03-26

    I found this http://www.ti.com/lit/an/slva689/slva689.pdf
    The SSD1306 OLED I used with 4.7K resistors on the 5V pic board with the display at 5V on the board.
    If the display was connected by a metre of wire then the resistors would have a different value.
    Which end to connect the resistors I don't know.

     
  • bed

    bed - 2020-03-26

    Yes I know this Site: https://www.i2c-bus.org/
    The Problem is that the integrated 4k7 R in the RT Module should be fine. But it is not. I guess this has to do with the 5Volts. I2C was designed for 3.3 Volts.
    With my parallel connected 2K7 it comes to 1K7 R which is enough up to 1000 Khz. So my Questions are still valid.
    Rumors in the German Electronics community leads me to beleive there are at least 2 versions of Oled Modules, some tolerate 5Volts but were not designed for it and others they are...

     

    Last edit: bed 2020-03-26
    • stan cartwright

      stan cartwright - 2020-03-26

      You could be correct. Mine are cheap, from ebay, that work on 5V supply and logic.
      I do not think the displays would work if they were 3.3V logic level.
      I know ili9341 displays work only at 3.3V logic but have a 5V regulator on board for the display and the back light can be 5V.
      I found the pic I use. #chip 18f25k22 ,64 , can run at 3.3V and so logic levels are 3.3V,
      so I do not need a logic level converter. Nice
      I never tried using the SSD1306 OLED at 3.3V
      Not much help, sorry. Take care.

       
  • bed

    bed - 2020-03-27

    As most of time the Error is sitting in front of the Computer. :-[
    I've found that the Resistor @SL for the Combi Module couldn't work because I misplaced a wire
    So, yes it works without my 2 extra Resistors as well.
    But my question about 5V and 3.3 Volts is still valid. Maybe the time will tell. I build my Project several times let's see how long it is working :-)

     
  • stan cartwright

    stan cartwright - 2020-03-27

    Although I can program glcd supported displays to do games and stuff, the wiring i2c or spi or serial is hard for me to understand.
    the wiring is easy but knowing what gcb does with my code I take for granted, under the bonnet they say.
    I use bread boards and the sockets can wear out and give bad connections.
    Caused me many headaches.

     

Log in to post a comment.