I2C device address changing of MCP23017 I/O extender
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
When I connect all A0, A1 and A2 to ground, then my device address of the MCP23017 is 0x20 (constant).
But when I disconnect the A0 from ground, then the device address is switching between 20 and 21 everytime I check with the i2cdetect command?
Why isn't the device address constantly 21?
raspbian pi-3 gpio i2c
add a comment |Â
up vote
2
down vote
favorite
When I connect all A0, A1 and A2 to ground, then my device address of the MCP23017 is 0x20 (constant).
But when I disconnect the A0 from ground, then the device address is switching between 20 and 21 everytime I check with the i2cdetect command?
Why isn't the device address constantly 21?
raspbian pi-3 gpio i2c
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
When I connect all A0, A1 and A2 to ground, then my device address of the MCP23017 is 0x20 (constant).
But when I disconnect the A0 from ground, then the device address is switching between 20 and 21 everytime I check with the i2cdetect command?
Why isn't the device address constantly 21?
raspbian pi-3 gpio i2c
When I connect all A0, A1 and A2 to ground, then my device address of the MCP23017 is 0x20 (constant).
But when I disconnect the A0 from ground, then the device address is switching between 20 and 21 everytime I check with the i2cdetect command?
Why isn't the device address constantly 21?
raspbian pi-3 gpio i2c
asked Aug 29 at 17:20
Jochem Gruter
1132
1132
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
Probably because the pin is floating.
Indeed the datasheet says of pins A0, A1, A2 "Hardware address pin. Must be externally biased."
This means you must tie each pin either low or high, you must not let them float.
1
Thanks, I indeed didn't connected to high.
â Jochem Gruter
Aug 29 at 17:52
Also check the errata (always a good idea, doubly so when microchip is involved), I have a feeling that there is a subtle trap in the write to enable hardware addressing on those parts.
â Dan Mills
Aug 29 at 20:47
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Probably because the pin is floating.
Indeed the datasheet says of pins A0, A1, A2 "Hardware address pin. Must be externally biased."
This means you must tie each pin either low or high, you must not let them float.
1
Thanks, I indeed didn't connected to high.
â Jochem Gruter
Aug 29 at 17:52
Also check the errata (always a good idea, doubly so when microchip is involved), I have a feeling that there is a subtle trap in the write to enable hardware addressing on those parts.
â Dan Mills
Aug 29 at 20:47
add a comment |Â
up vote
3
down vote
accepted
Probably because the pin is floating.
Indeed the datasheet says of pins A0, A1, A2 "Hardware address pin. Must be externally biased."
This means you must tie each pin either low or high, you must not let them float.
1
Thanks, I indeed didn't connected to high.
â Jochem Gruter
Aug 29 at 17:52
Also check the errata (always a good idea, doubly so when microchip is involved), I have a feeling that there is a subtle trap in the write to enable hardware addressing on those parts.
â Dan Mills
Aug 29 at 20:47
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Probably because the pin is floating.
Indeed the datasheet says of pins A0, A1, A2 "Hardware address pin. Must be externally biased."
This means you must tie each pin either low or high, you must not let them float.
Probably because the pin is floating.
Indeed the datasheet says of pins A0, A1, A2 "Hardware address pin. Must be externally biased."
This means you must tie each pin either low or high, you must not let them float.
answered Aug 29 at 17:25
joan
46.4k34477
46.4k34477
1
Thanks, I indeed didn't connected to high.
â Jochem Gruter
Aug 29 at 17:52
Also check the errata (always a good idea, doubly so when microchip is involved), I have a feeling that there is a subtle trap in the write to enable hardware addressing on those parts.
â Dan Mills
Aug 29 at 20:47
add a comment |Â
1
Thanks, I indeed didn't connected to high.
â Jochem Gruter
Aug 29 at 17:52
Also check the errata (always a good idea, doubly so when microchip is involved), I have a feeling that there is a subtle trap in the write to enable hardware addressing on those parts.
â Dan Mills
Aug 29 at 20:47
1
1
Thanks, I indeed didn't connected to high.
â Jochem Gruter
Aug 29 at 17:52
Thanks, I indeed didn't connected to high.
â Jochem Gruter
Aug 29 at 17:52
Also check the errata (always a good idea, doubly so when microchip is involved), I have a feeling that there is a subtle trap in the write to enable hardware addressing on those parts.
â Dan Mills
Aug 29 at 20:47
Also check the errata (always a good idea, doubly so when microchip is involved), I have a feeling that there is a subtle trap in the write to enable hardware addressing on those parts.
â Dan Mills
Aug 29 at 20:47
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f88628%2fi2c-device-address-changing-of-mcp23017-i-o-extender%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password