Geez Oh Grief - MCP23018 Port Expander I2C Address Setting....

Status
Not open for further replies.

For The Popcorn

Well-Known Member
Most Helpful Member
The MCP23018 is a revised version of the MCP23017 16 bit port expander. The biggest difference is that outputs are open drain only (rather than push/pull & open drain) and they are 5 volt tolerant over the operating Vcc range of the chip. Oh, and one other important difference - they are AVAILABLE.

My design is mostly finished and I came to setting the I2C address. Instead of the 3 pins on the MCP23017 (providing 8 addresses), the MCP23018 has a single address pin. I noticed that early on but I thought no big deal - I've seen other I2C chips where a single pin is connected to ground, Vcc, SDA, SCL, etc. to set the address. Since I'm only using one of the chips, no big deal, I'll connect it wherever is most convenient.

I looked though the datasheet, expecting a tidy table showing the options. Nope. The designers didn't do anything that simple on the MCP23018. The address pin is an ANALOG INPUT, and you need to set the voltage to a certain range for each address! The data sheet touts the advantage that this method requires only one pin instead of three. Three of the pins on the MCP23018 are n/c. Instead of allowing easy field-settable address selection via a DIP switch or solder jumpers, I suppose you could calibrate your MCP230118 with a pot.

The datasheet doesn't mention one feature of the MCP23018 - you can use it as a 3-bit ADC! Connect the signal to the address pin and see with address the MCP23018 responds to.

Ahhhh, progress.
 
The data sheet touts the advantage that this method requires only one pin instead of three. Three of the pins on the MCP23018 are n/c.
That's microchip for ya... three steps back, 0 steps forward! At least they didn't make you connect the "N/C" pins to anything!

The datasheet doesn't mention one feature of the MCP23018 - you can use it as a 3-bit ADC! Connect the signal to the address pin and see with address the MCP23018 responds to
Now that's certainly inventive!
 
Fortunately, connecting to ground or Vcc are allowed addresses.

The 2 pages of explanation in the datasheet clearly illustrate the improve this is.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…