Quantcast
Viewing all articles
Browse latest Browse all 16

The point of I2C NACKs

Image may be NSFW.
Clik here to view.
nack

The logic analyzer output above (top continues on the bottom) shows the Bus Pirate I2C address scan function. The Bus Pirate sends a DS1307 I2C read address. After the DS1307 ACKnowledges the address (bit 9), it immediately starts sending data to the Bus Pirate and ignores the I2C STOP sequence sent by the address scanner. This caused extra I2C addresses to appear at random.

This is the purpose of the I2C NACK bit that concludes a transfer from the slave IC to the master device. If the master ACKs the last byte and then attempts a STOP condition, the slave might put a 0 on the data line that blocks the STOP condition. If the master NACKs the last byte then the slave IC gives up and everybody exits cleanly.

Read more about this issue here, updates will be in the nightly compiles in a few days.


Viewing all articles
Browse latest Browse all 16

Trending Articles