Hi,
I am using the I2C on 5282. The manual states that the ICF bit in the Status register indicates if transfer is in progress or completed.
Checking the ICF bit does not work. Instead, checking the IIF bit works fine.
Is it a mistake in the manual or I am missing something (I am not using any interrupts)?
Thanks,
Simon
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:
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.