biw1160
Posts: 1
Joined: Sun Feb 23, 2014 3:33 pm

i2cdetect returns changing address (SOLVED)

Sun Feb 23, 2014 4:32 pm

Hi,

writing the problem description below, I realized my soldering on the address pins was faulty, so all the i2c stuff was not the issue. I post it anyway, for those running into a similar mysterious problem.

Ciao, Felix
-------------------------------


Hi,

I am new in the forum, at raspberry and at electronics, so lot of chances were I can be wrong.

I have one I2C chip (port expander) connected to the GPIO pins. When I ask with i2cdetect for its address, I get changing results, with no recognized pattern?

- Could the problem be my wiring?
- Did I change foolishliy the configuration of the iÍ2C chip?
- Is my linux/raspbian/i2c setting wrong?

Some more details:
- The raspberry is Modell B2, running an currently updated raspbian
- The GPIO pins are connected to a bread board by a ribbon cable.
- The I2C chip is MCP23017 Port Expander. The connections towards raspberry are only ground, 5.5 V, SDA, SCL
- Three leds are connected to Bank A (GPA7, 6 and 5)
- The led and the I2C chip are on a strip board with my soldering
- Wiring seems to be fine, as I can switch the LEDs on and off by i2cset, though I get occasionall "Write failed" Errors.
- i2cdetect -y1 shows three differen results
--- Address 20 (most frequently)
--- Adresss 21 (quite frequently)
--- No address (very rarely, less than 1 out of 50 )
--The switching between 20 and 21 seem to happen every third or fourth call, but this is not a reliable pattern.

My explanation is, that the I2C chip switches between addresses 20 and 21 due to an internal algorithm. I want the address to be stable.

The manual mentions config bits (0x05) like BANK, SEQOP, which sound like they might control at least the registers of the output pins of the i2c chip. Might they also change the address?
Is there a reset command I can send via i2cset?

Please help,
Ciao, Felix

Sun Feb 23 17:13:10 CET 2014
[email protected] ~/projects/gpio $ i2cdetect -y 1; date
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Sun Feb 23 17:13:15 CET 2014
[email protected] ~/projects/gpio $ i2cdetect -y 1; date
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Sun Feb 23 17:13:22 CET 2014
[email protected] ~/projects/gpio $ i2cdetect -y 1; date
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Sun Feb 23 17:13:24 CET 2014

Saran
Posts: 11
Joined: Wed Oct 23, 2013 8:31 pm

Re: i2cdetect returns changing address (SOLVED)

Wed Jul 09, 2014 9:01 pm

Same problem here. Did you fix it?

User avatar
joan
Posts: 14076
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: i2cdetect returns changing address (SOLVED)

Wed Jul 09, 2014 9:04 pm

Saran wrote:Same problem here. Did you fix it?
There is a note at the start of the opening post that the problem was caused by faulty soldering.

Return to “Troubleshooting”