PCA9655E breakout

04 February 2018
While I was doing the reflow for the PCA9671 expander breakout I also used the same PCB board to mount an ON Semiconductor PCA9655E (Farnell 2464421) since aside from having an interrupt pin rather than a reset, the pin-outs are virtually identical. As it turned out this I/O expander is functionally identical to the TCA9535, while having the higher total current draw tolerance and address range of the PCA9671. As a result this article will highlight the differences.

The PCA9655E is register-based where all I2C transactions, including pin reads & writes, use an internal 8-byte address. The 16 input/output pins are divided into two 8-bit ports, which operate independently. Each pin can sink 50mA with a combined ground current limit of 600mA, although there is a recommended limit of 25mA per pin.

Usage

I2C communication of the expander makes use of the same register addresses as the TCA9535, so the sub-sections below will only cover the difference. One nice feature is the ability to use a multi-byte transaction to read/write more than one register at once — I did not check at the time whether the TCA9535 also allows this — which is particularly useful as it allows one transaction to deal with all 16 pins over the two ports.

Address pins

Like the PCA9671, the PCA9655E expander uses the I2C SDA & SCL lines as input for the device address selection pins in addition to Vcc and Ground. I am not exactly sure how it works, but my suspicion it is an elimination process based on comparing when the pins change state, assuming they change at all. There is quite likley coordination between manufacturers as the address table in the data-sheet has the same mapping as that in the PCA9671 data-sheet, and is replicated below:

Address pins I2C address
A2 A1 A0 Write Read
Gnd
Scl
Gnd
0x200x21
Gnd
Scl
Vcc
0x220x23
Gnd
Sda
Gnd
0x240x25
Gnd
Sda
Vcc
0x260x27
Vcc
Scl
Gnd
0x280x29
Vcc
Scl
Vcc
0x2a0x2b
Vcc
Sda
Gnd
0x2c0x2d
Vcc
Sda
Vcc
0x2e0x2f
Gnd
Scl
Gnd
0x300x31
Gnd
Scl
Vcc
0x320x33
Gnd
Sda
Gnd
0x340x35
Gnd
Sda
Vcc
0x360x37
Vcc
Scl
Gnd
0x380x39
Vcc
Scl
Vcc
0x3a0x3b
Vcc
Sda
Gnd
0x3c0x3d
Vcc
Sda
Vcc
0x3e0x3f
Gnd
Gnd
Gnd
0x400x41
Gnd
Gnd
Vcc
0x420x43
Gnd
Vcc
Gnd
0x440x45
Gnd
Vcc
Vcc
0x460x47
Vcc
Gnd
Gnd
0x480x49
Vcc
Gnd
Vcc
0x4a0x4b
Vcc
Vcc
Gnd
0x4c0x4d
Vcc
Vcc
Vcc
0x4e0x4f
Gnd
Gnd
Scl
0x500x51
Gnd
Gnd
Sda
0x520x53
Gnd
Vcc
Scl
0x540x55
Gnd
Vcc
Sda
0x560x57
Vcc
Gnd
Scl
0x580x59
Vcc
Gnd
Sda
0x5a0x5b
Vcc
Vcc
Scl
0x5c0x5d
Vcc
Vcc
Sda
0x5e0x5f
Scl
Scl
Gnd
0xa00xa1
Scl
Scl
Vcc
0xa20xa3
Scl
Sda
Gnd
0xa40xa5
Scl
Sda
Vcc
0xa60xa7
Sda
Scl
Gnd
0xa80xa9
Sda
Scl
Vcc
0xaa0xab
Sda
Sda
Gnd
0xac0xad
Sda
Sda
Vcc
0xae0xaf
Scl
Scl
Scl
0xb00xb1
Scl
Scl
Sda
0xb20xb3
Scl
Sda
Scl
0xb40xb5
Scl
Sda
Sda
0xb60xb7
Sda
Scl
Scl
0xb80xb9
Sda
Scl
Sda
0xba0xbb
Sda
Sda
Scl
0xbc0xbd
Sda
Sda
Sda
0xbe0xbf
Scl
Gnd
Gnd
0xc00xc1
Scl
Gnd
Vcc
0xc20xc3
Scl
Vcc
Gnd
0xc40xc5
Scl
Vcc
Vcc
0xc60xc7
Sda
Gnd
Gnd
0xc80xc9
Sda
Gnd
Vcc
0xca0xcb
Sda
Vcc
Gnd
0xcc0xcd
Sda
Vcc
Vcc
0xce0xcf
Scl
Gnd
Scl
0xe00xe1
Scl
Gnd
Sda
0xe20xe3
Scl
Vcc
Scl
0xe40xe5
Scl
Vcc
Sda
0xe60xe7
Sda
Gnd
Scl
0xe80xe9
Sda
Gnd
Sda
0xea0xeb
Sda
Vcc
Scl
0xec0xed
Sda
Vcc
Sda
0xee0xef

Addresses ranges 0x00-0x1e, 0xd0-0xde, and 0xf0-0xfe are not used. Some of these correspond to I2C reserved addresses which ought not be used anyway.

Interrupts

Due to a PCB design error I was not able to verify the expected interrupt behaviour of the PCA9671, but since no such error exist with this breakout board, I did a quick test of the interrupt pin using the setup shown below. The interrupt pin is active-low open-drain, and it resets either when the port with the changed pin is read or the pins return to the pre-interrupt state.

I am not exactly sure how it resolves the reset when pins on both have changed but only one port is read, so I would be inclined to read both ports with a two-byte read:

./ttyTxRx.py /dev/ttyACM0 2 55 41 00 2

Remarks

While it was a nice discovery that the command set was identical to an I/O expander I had tried out in the past, I find the command-orientated ones that use register addresses to be a bit of a pain. The Microchip MCP23017 seemed to include 1 or 2 fringe options purely because there was the spare capacity, but the others I have tried are not quite so pathological. Personally I prefer the zero-configuration nature of the 8-bit PCF8574 and 16-bit PCA9671, the latter being physically identical to the expander this article details.