The address I am trying to write to is 0x40, which is the slave address for the MCP23008 expander on the pic serial demo board:
m_mishrikey_0-1599147310544.png
(image above off internet).
The code I am using is straightforward:
m_mishrikey_1-1599147386986.png
I do two sends; one is to address 0, instructing all port pins to be outputs. The second instruction is to address 0x09, writing 0xEE to GPIO pins (0b11101110).
One the image I sent previously, you can see the address 0x40 of the first send, followed by NACK, and the address of the second send, also 0x40, followed by NACK.