MCP23008 - I2CR8G5V1 - 8-channel IC2 codes

What is the IC2 codes for opening replays 5-8?
In AnyIC2 v.1.2.0 I’ve found a 4-relay version where the code W:40 09 0X activates relay 1-4. The X i a Hex number 1-F.
I can’t find the codes for relay 5-8. Where should I look for these codes?

Found that the first digit in the 0X (the 0) controlled the 5-8 relay. But it’s super unstable. Sometimes it works, other times not. Help

Hi Alrer,

What board are you using? I’m assuming an MCP23008, but I’d just like to be sure.

If it is an MCP23008, they first you’ll want to make sure that all 8 channels are set to be outputs using register 0x00. You will set it to 0x00. This will set all 8 channels to be outputs.

Once that’s done you will be targeting register 0x09 to set the status of the relays in a bitwise fashion. Each bit in the byte written to that register will activate or deactivate the corresponding relay. For instance 0x01 [00000001] will activate relay 1. 0x02 [00000010] will activate relay 2. 0x03 [00000011] will activate relays 1 and 2. So to activate relays 5-8 you would set the first four bits to high: 0xF0 [11110000].

1 Like