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
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.
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...
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?
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.
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 :D.
Re: I2C SDA not going to zero! 3.3V --> 1.14V !
Quote:
Originally Posted by
Jumper
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.
Re: I2C SDA not going to zero! 3.3V --> 1.14V !
Quote:
Originally Posted by
Charlie
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.
Re: I2C SDA not going to zero! 3.3V --> 1.14V !
Quote:
Originally Posted by
rsocor01
Start replacing components. Start with the pull-ups resistors, then the sensors and the PIC. If the problem persists then trash the board :D.
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...
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
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.
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