AnsweredAssumed Answered

Why does I2C Expander send NAK when master writes a byte?

Question asked by Amer Naseem on Sep 6, 2019
Latest reply on Sep 13, 2019 by Amer Naseem
NXP LPC11E68JBD48E Microcontroller I2C1 is Master. I2C1 is in chapter 13.  I2C1 is in Master Transmitter Mode.
http://www.mouser.com/ds/2/302/UM10732-315822.pdf
NXP PCAL6416A I2C 16-bit I/O Expander is Slave.  https://www.nxp.com/docs/en/data-sheet/PCAL6416A.pdf
I2C1 Block in Microcontroller is initialized successfully.
Step 1.  I2C1 block is in master transmitter mode because I2C control Register STA bit is set to 1.  See attached step1_Master_Transmitter_Mode.png file.
Step 2.  Microcontroller I2C1 block transmits START bit.  After the START bit is transmitted, the Serial Interrupt(SI) bit in I2C Control Register is set and STAT register in microcontroller I2C1 block contains status of 0x08.  See attached filename step2_start_bit_sent.png
step 3.  The status 0x08 is used to vector to a state service routine.  This routine loads the slave address and Write bit to the DAT register.  See attached filename step3_status_0x08_state_handler.png
step 4.  Slave address and Write bit has been transmitted and negative acknowledgement(NAK) is received from slave.  The STAT register has status of 0x20 and microcontroller fires interrupt on this status value.  See attached step4a_NAK_from_slave.png file and step4b_NAK_handler.png

This problem occurs the very first time Master tries to communicate with slave.
The previous hardware works fine with this microcontroller and NXP PCA6408AHKX I2C 8-bit Expander chip.  When this byte is written to I2C register, ACK is received.
New hardware is same as previous hardware except 16-bit I/O expander instead of 8-bit.
What might be the problem?  Is it hardware or software?  What are usually reasons for NAK in I2C communication?

Outcomes