Skip to main content

Subsection 10.1.5 Part 3c: Reading Your Own Trace

Figure 10.1.16 is a capture of the transaction your loop is producing, and it should look like yours. Eighteen clock pulses: nine for the address byte and its ACK, nine for the data byte and its ACK, with the START before them and the STOP after. Keep the eight values you read off the address phase; you’ll need them in Subsection 10.1.6.
Figure 10.1.16. One write to address 0x70, captured on the AD2 in oscilloscope mode: SDA in blue on channel 2 above, SCL in orange on channel 1 below, offset vertically so the two do not overlap. The whole transaction is eighteen clock pulses and takes under 200 microseconds. Reading left to right: both lines idle HIGH, SDA falls while SCL is still HIGH, SCL begins clocking, and the first blue pulse near 90 microseconds is the moment the display lets go of SDA after acknowledging. This is what your own single sweep should look like.
The ACK is the part worth slowing down on, because it is the only moment in the transaction where the wire changes hands. After the eighth bit (in the address case this is the R/W bit) the controller keeps clocking and lets go of SDA. The display, having recognized its address, then pulls SDA LOW sometime during the clock’s LOW phase, so that when SCL rises, SDA is stable and LOW. On the next LOW phase the display lets go again and the controller takes over. That second handover is the short HIGH spike visible just after each ACK in Figure 10.1.16, and there is no matching one before the ACK, because the handover was so fast. Either way it is harmless: nothing is read while SCL is LOW.