Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

More mcp23017 help.


Best Answer NooM, 07 April 2013 - 02:47 PM

000 (0)

001 (1)

010 (2)

011 (3)

100 (4)

101 (5)

110 (6)

111 (7)

 

its 8.

 

slave address is:

0100 + 3 address pins (to ground means 0, to positive means 1) + r/w bit (set in the programm automatically, you dont need todo anything for that.)

so first address is 0x20, second 21... 22

 

use the windows calculator in programmer mode, you can enter binary and it will show you the hexdecimal output.

(dont add the r/w bit when you enter it, so enter only 7 bits.)

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 corythompson

corythompson

    New Member

  • Members
  • Pip
  • 6 posts

Posted 07 April 2013 - 02:05 PM

Hi

 

I'm struggling to understand the hardware addressing of the mcp23017.

I have two chips so i need to set the address of one different to the other, I have been looking this http://ww1.microchip...edoc/21952b.pdf

I don't understand how to address this chip.

If i ground all address pins A0 ,A1, A2 then the address is 0x20 ?

What if I send 5v to all address pins, what address will I have then ?

Is that how I would change the address?

Could I ground A0 and then 5v the other 2? if so what adderss would this give?

If thats how to do it then why does the datasheet say "Three hardware address pins to allow up to eight devices on the bus"

I can only count 7

000

001

010

100

101

110

111

Can someone show me what I'm doing wrong.

 

Thanks



#2 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 07 April 2013 - 02:47 PM   Best Answer

000 (0)

001 (1)

010 (2)

011 (3)

100 (4)

101 (5)

110 (6)

111 (7)

 

its 8.

 

slave address is:

0100 + 3 address pins (to ground means 0, to positive means 1) + r/w bit (set in the programm automatically, you dont need todo anything for that.)

so first address is 0x20, second 21... 22

 

use the windows calculator in programmer mode, you can enter binary and it will show you the hexdecimal output.

(dont add the r/w bit when you enter it, so enter only 7 bits.)



#3 corythompson

corythompson

    New Member

  • Members
  • Pip
  • 6 posts

Posted 13 April 2013 - 09:07 PM

Thanks Noom .

 

I thought I'd lost this post . was looking for it :P






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.