I2C causes processor to hang {Solved}
Posted: Sun Sep 03, 2017 2:25 pm
Hello All
Hope you can help me with this problem.
I have a PIC18F46K22 connected to a DS3231 RTC using I2C communicating over hardware channel 2.
I am not able to read from the RTC without causing my processor to hang. This is caused by the SDA line being held low - there is no NAK generation.
The Flowcode sequence used in Test A is normal however changing it and unusually including a I2CMaster1::TransmitByte(0) in the sequence just before the Stop results in a NAK as in Test B (red dot on the logic analyser record). In this case the SDA line is released and all is fine.
Writing to the RTC in the standard way is fine and my addressing for this device is 0xD0 for master write and 0xD1 for master read.
Strangely this segment worked in FC6 and possibly in early FC7 but I cant remember with certainty.
Thanks a lot
Howard
FC7.2.1.4 patched yesterday
Hope you can help me with this problem.
I have a PIC18F46K22 connected to a DS3231 RTC using I2C communicating over hardware channel 2.
I am not able to read from the RTC without causing my processor to hang. This is caused by the SDA line being held low - there is no NAK generation.
The Flowcode sequence used in Test A is normal however changing it and unusually including a I2CMaster1::TransmitByte(0) in the sequence just before the Stop results in a NAK as in Test B (red dot on the logic analyser record). In this case the SDA line is released and all is fine.
Writing to the RTC in the standard way is fine and my addressing for this device is 0xD0 for master write and 0xD1 for master read.
Strangely this segment worked in FC6 and possibly in early FC7 but I cant remember with certainty.
Thanks a lot
Howard
FC7.2.1.4 patched yesterday