Hi,
Here is the explaination. When you are using I2C module, you might have multiple devices connected to the bus and there might be arbitration involved and you might have arbitration lost, also you might be receiving a calling address when in slave receive mode. ICF bit just reflects data transfer complete, but IIF reflects three cases:
- Complete one byte transfer (set at the falling edge of the ninth clock)
- Reception of a calling address that matches its own specific address in slave-receive mode
- Arbitration lost
So you better read IIF.
OK, I know that you are not using interrupt, you are just try to poll the IIC interrupt status, IIF is just a flag, if you are not enabling IIEN, no I2C interrupt will be fired.