Code for MCP23008

Bayside888

Active member
I have read most of the previous posts for the MCP23008 and 23016, but can't seem to put the whole thing together. Does anyone have a simple code snippet to read a 4X4 matrix keypad with this chip? I can decode once I get the data into a byte variable. I am using the 28X2 chip with the I2C CLK and SDA lines on C2 and C3. Then trying to read with a "hi2in" Command. Thanks
 
Do you mean C3 and C4, which are the usual I2C pins, or are you in some way re-routing the I2C?
 
Aries: my error, you are correct - C3 and C4. I have an I2C bus with an LCD, an EEprom, and an RTC working fine, so not having electrical or hookup issues. Just have to program the MCP23008 to work with them.
 
Back
Top