I am using the MKL46Z processor and would like to understand how to properly read data using the I2C.
I have the following confusion:
1. If I go from writing to the slave device to reading from the slave device, do I have to switch from writing to reading
on the registers C1 and C2?
2. I would really want to know when a byte has come in and completed (meaning the full 8bits are in). Currently
I was trying to use IICF (flag), but unfortunately, I don't understand how to use it or maybe I shouldn't be using it?
Maybe I should use something else to signal me???
If anyone has a short snippet they can share, with an explanation of what is happening I would greatly appreciate it.
By the way, while I am debugging I can actually see the byte coming in and I am able to read it, but if I let the software
run, its a different story.