Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved] Controlling 5 MCP23017 I2Cs in Sequence.

Status
Not open for further replies.

DaveKlebt

Newbie level 2
Newbie level 2
Joined
Nov 28, 2017
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
15
i need some assistance - i need to set up 5 MCP23017 to drive five banks of 16 channel relays. in testing the addressing to pins Ao, A1, and A2, i started with the relay banks.

I placed a ground on A0, A1 and A2 in the first I2C chip. The code uses the wiringpi Setup library. the addresses for the GPAO outputs is:
wiringpi.mcp23017Setup(101, 0x20) # set up the pins and i2c address
wiringpi.mcp23017Setup(117, 0x23) # set up the pins and i2c address

The I2C chip was set with A0 no ground, and A1 and A2 with grounds.

The second relay bank mirrors the action on the first.

When i alter the code to address the address on the range from 117 - 133) nothing happens.

any advice will most welcome.
 

Hi,

A general rule:
Don't leave (unused) inputs floating. This is true for digital inputs as well as analog inputs.

In your case the datasheet especially says: "Hardware address pin. Must be externally biased."
Which means you need to drive them either HIGH or LOW. Leave them floating is not allowed.

Klaus
 

Thanks, I actually figured that out! voltage in gives a 1, ground a O. i have successfully addressed 5 chips. But i appreciate your assistance.

Hi,

A general rule:
Don't leave (unused) inputs floating. This is true for digital inputs as well as analog inputs.

In your case the datasheet especially says: "Hardware address pin. Must be externally biased."
Which means you need to drive them either HIGH or LOW. Leave them floating is not allowed.

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top