First thing I noticed. According to the MCP23016 data sheet, the control byte is 0100bbbx where bbb is the device address set on the address pins and x is where the read/write bit is located. *edit The address pins I am referring to are A0, A1, and A2 (pins 16,17 and 18 on the DIP package). So for a device with all the addres pins pulled low would have a control byte of $40, with all pins set high, the control byte would be $4E.
Second you need to use the "define I2C_HOLD 1" because the MPC23016 pulls the clock low in order to signify it is not ready for the next byte of data.
Thirdly the address field of the I2C commands should be where you put the register command byte for read or write of a register. The address field should be left out if you are reading the I/O status.
Also are you using external 4.7k pullup resistors? The I2C commands set the SDA and SCL pins to tristate and only drive a low state. External pullups are needed unless you use "DEFINE I2C_SCLOUT 1" which defeats the clock hold capability of the MPC23016.
Bookmarks