learning to use a mcp23008 using I2C

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
Darren.Smith
Flowcode V4 User
Posts: 38
Joined: Thu Feb 24, 2011 4:38 pm
Has thanked: 2 times
Been thanked: 1 time
Contact:

learning to use a mcp23008 using I2C

Post by Darren.Smith »

hi guys, this may be a stupid question but gonna ask anyway, am just starting to use I2c com's with a mcp23008 expander chip. have figured out most of the basic's but am wondering if the outputs actually go low on the mcp23008 output or do they stay floating at around 2v. when i right an output to the gpio port the pin i right to goes to 5v as expected, but the rest stay at 2v, i was expecting them to goto 0v, am i missing something here?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: learning to use a mcp23008 using I2C

Post by Benj »

Hello,

The pins probably should go to 0V though I have not personally tested this on the I2C expander. Are you sure you have setup the data direction register correctly for an output?

Darren.Smith
Flowcode V4 User
Posts: 38
Joined: Thu Feb 24, 2011 4:38 pm
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: learning to use a mcp23008 using I2C

Post by Darren.Smith »

hi ben, you are correct, outputs do go to zero. have written code addressing each register individually which works. i did have a restart command inbetween before, which i assumed would write all the data at the final stop command.

Post Reply