I2C SDA not going to zero! 3.3V --> 1.14V !


Closed Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62

    Default I2C SDA not going to zero! 3.3V --> 1.14V !

    Hi,

    I have a strange one... I have had some boards made up. Some work but one in particular fails to talk to some I2C sensors. The clock line is correctly jumping between 3.3V and 0V but the data (SDA) line is bouncing between 3.3V and 1.15V !

    I changed the code to something simple that simply set data line high for a second and then low but it's just not having it. I can't find any shorts anywhere between this line and anything else! Could the PIC port be damaged?

    Cheers

    Mark

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,598

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Are you sure you didn't forget a resistor? (I have pull-down in mind).

    PICs are pretty resilient as some have tested here. If you have identical boards and one is acting up, I'd check for missing parts, polarity, etc.

    Robert

    Edit: I'm assuming the boards, PICs and program are all identical.
    Last edited by Demon; - 22nd March 2013 at 21:07.

  3. #3
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Yup, all components accounted for. I still need to have another good look at it but I've followed the track from PIC to all sensors on that data line through each Via, looking for possible shorts and nothing. All boards and firmware identical yes.

    I have a pull-up on the line for I2C; it just seems like the PIC can't pull the line down, even when I stick on a simple program to pull it down for a second or more.

    If I find out what it is/was, I'll let you know. I'd prefer to not have to resort to air gunning off the PIC...

  4. #4
    Join Date
    Mar 2006
    Location
    China
    Posts
    266

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Hi,

    What PIC do you use? Are you sure that pin does not have any other functions that you might have forgotten to set (comparators, AD and similar).

    What if you remove the I2C device? Will the data line go low?

  5. #5
    Join Date
    Dec 2010
    Posts
    409

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Check the tracks with a meter. I've seen vias with internal cracks cause invisible opens, especially when there is solder resist over them.

  6. #6
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    644

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Start replacing components. Start with the pull-ups resistors, then the sensors and the PIC. If the problem persists then trash the board .
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  7. #7
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Quote Originally Posted by Jumper View Post
    Hi,

    What PIC do you use? Are you sure that pin does not have any other functions that you might have forgotten to set (comparators, AD and similar).

    What if you remove the I2C device? Will the data line go low?
    Many thanks for your reply. It's an 18F26J53. It's set for output so should automatically be digital. The firmware works on other board (identical). I may have to start removing components but they're all QFN types, including the PIC.

  8. #8
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Quote Originally Posted by Charlie View Post
    Check the tracks with a meter. I've seen vias with internal cracks cause invisible opens, especially when there is solder resist over them.
    Many thanks for your reply. I'll try some more continuity tests. Not given up on this one yet.

  9. #9
    Join Date
    Sep 2009
    Location
    South Wales (UK)
    Posts
    62

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Quote Originally Posted by rsocor01 View Post
    Start replacing components. Start with the pull-ups resistors, then the sensors and the PIC. If the problem persists then trash the board .
    Many thanks for your reply. I'll try replacing the pull up res' but the sensors/PIC will be tricky. I don't think it's the res as the line is going high to 3.3V. As you rightly point out, there's only so long one should spend on something like this before trashing it. I just like to know the root cause of the issue. Because everything is surface mount, there's always the danger of trashing the board when heat gunning components. All part of the fun I guess...

  10. #10
    Join Date
    Mar 2006
    Location
    China
    Posts
    266

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Should? maybe

    Will? Only a deep dive into the datasheet can be sure of that.

    PIC18F26J53 har PPS (periphial pin select or how it is spelled, menaing you can re-route HW functions to different pins)

    So what PIN on the device and what PORT-id do you use?

    I would not bet that all pics always gets all registers set up exactly the same everytime.. so there might be a conflict that is because of a register setting.

    Before I start pulling components I would advise you to give us more details about the device setup and configuration...and PPS register settings

  11. #11
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Hi,
    Have you verified the value of the pullup resistor? Perhaps it's 10ohms instead of 10k or whatever it's supposed to be. The PIC can only pull so hard on the pin, if the pullup is too stiff it won't be able to get it all the way to Vss.
    I was going to suggest to lift the pin in question and measure directly on the pin but with a QFN that won't be easy. Make sure you measure from the pin in quesion to adjacent pins, perhaps there's a solder bridge under the chip.

    /Henrik.

  12. #12
    Join Date
    Sep 2009
    Posts
    737

    Default Re: I2C SDA not going to zero! 3.3V --> 1.14V !

    Put your pin to input, then measure current between ground and pin.
    IF current is few mA THEN pic is problem
    IF current is much bigger THEN
    Remove pull up
    Measure again
    ENDIF
    IF any current exist THEN
    Problem is in sensor or pcb
    Remove sensor
    measure current.
    IF any current exist THEN
    pcb have short
    ELSE
    Problem is in sensor
    END IF

Similar Threads

  1. Interfacing with Arduino I2C LCD
    By norohs in forum Documentation
    Replies: 47
    Last Post: - 30th May 2017, 18:53
  2. TMR0 Interferes with I2C GLCD
    By prstein in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd January 2013, 06:56
  3. PIC as I2C Slave
    By Mainul in forum General
    Replies: 4
    Last Post: - 5th January 2013, 13:23
  4. 16F1847 Usart and I2C
    By Seahound1 in forum Serial
    Replies: 6
    Last Post: - 18th December 2012, 20:41
  5. Strange I2C and serial behaviour.......
    By jimbostlawrence in forum General
    Replies: 4
    Last Post: - 30th October 2012, 01:02

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts