Hi,
I am using the NXP PCAL6416A Low-voltage translating 16-bit I2C-bus/SMBus I/O expander with interrupt output, reset, and configuration registers.
Link to datasheet: https://www.nxp.com/docs/en/data-sheet/PCAL6416A.pdf
The I2C is used with a Khadas VIM3 single board computer, running Ubuntu 20.04, Linux 4.9 kernel. The I2C address can be read on the VIM3 and the outputs can be configured as high/low using i2cget and i2cset command from cmdline.
May I please know which registers to read from to observe the input on the I2C pins. I would really appreciate it if you can let me know the sequence of commands to read the inputs on the I2C pins of the PCAL6416A.
Thank you
Hello,
I hope all is great with you. Thank you for using the NXP communities.
In this case, I do recommend reading the INPUT PORT registers. They have the 0x00 and 0x01 address.
The Input port registers (registers 0 and 1) reflect the incoming logic levels of the pins, regardless of whether the pin is defined as an input or an output by the Configuration register. The Input port registers are read only; writes to these registers have no effect.
Therefore, the sequence of commands would be as follows:
S 0x40 0x00 RS 0x41 READ P
I hope this information helps.
Regards,
David