Datasheet

Table Of Contents
PICkit™ Serial Analyzer User’s Guide
DS51647C-page 102 © 2009 Microchip Technology Inc.
An example of a data stream in the script buffer that would direct the Comm back to
communicate in I
2
C to the unit.
Under test is as follows:
The script (above) is interpreted as follows. Tag 0x81 instructs the Comm module to
generate an I
2
C Start bit on the I
2
C bus. Tag 0x84 indicates 2 bytes will be transmitted
following the start – 0xA8 and 0x01. The first byte is the I
2
C slave address (with
Write/Read bit Reset) and a data/command byte of 0x01. The Comm module does not
place any significance on the value of the data bytes but merely transmits them ‘blindly’
– as instructed. The next Tag 0x83 instructs the Comm module to issue a Restart bit
on the I
2
C bus. Tag and data bytes - 0x84, 0x01, 0xA9 – will cause 1 byte (0xA9) to be
transmitted. Here again, the Comm module does not interpret the data – the I
2
C slave
will interpret 0xA9 as an address with Write/Read bit set. Tag 0x89 followed by data
byte 0x01 instructs the Comm module to attempt to read 1 byte from the slave then
issue a NACK on the bus. Finally, an I
2
C Stop bit is issued according to Tag 0x82. The
resulting I
2
C transaction looks like this on the bus:
[START][A8][01][RESTART][A9][data byte received][STOP]
As the script is executed, a data stream will be developed using Tags/CDATA
(described in Table 11-19) and returned to the host software via CBUF2.
0x95 1 I
2
CM _AUX1_WAIT_1 wait AUX1 == 1
0Tag
0x96 1 I
2
CM _AUX2_RST AUX2: 0
0Tag
0x97 1 I
2
CM _AUX2_SET AUX2: 1
0Tag
0x98 1 I
2
CM _AUX2_OUT AUX2 direction: OUTPUT
0Tag
0x99 1 I
2
CM _AUX2_IN AUX2 direction: INPUT
0Tag
0x9A 1 I
2
CM _AUX2_WAIT_0 wait AUX2 == 0
0Tag
0x9B 1 I
2
CM _AUX2_WAIT_1 wait AUX2 == 1
0Tag
0x81 I
2
CM_START
0x84 I
2
CM_WRITE_BYTES
0x02 Number of bytes
0xA8 I
2
C™ address for writing
0x01 I
2
C™ command code
0x83 I
2
CM_RESTART
0x84 I
2
CM_WRITE_BYTES
0x01 Number of bytes
0xA9 I
2
C™ address for reading
0x89 I
2
CM_READ_BYTES_NLB
0x01 Number of bytes
0x82 I
2
CM_STOP
TABLE 11-18: I
2
CM ‘CMD’ TAG BYTES (CONTINUED)