User manual
PICkit™ Serial Analyzer User’s Guide
DS51647A-page 34 © 2007 Microchip Technology Inc.
Macro commands are entered according to the sequence of events as defined by the
I
2
C bus protocol. Studying the example scripts is a good way to learn the sequence of
events. The example scripts can also be modified and saved under a different name.
A complete listing of the available macro commands is given in Table 4-2. The macro
command abbreviation will be displayed in the Transactions Window. The Transactions
window keeps a running log of the commands and data sent to and from the target
device.
FIGURE 4-9: I
2
C™ SCRIPT BUILDER – CREATING A SCRIPT
CAUTION
The choice of macro commands is very flexible. Therefore, the correctness of the
script has to be verified by the user. The PICkit Serial Analyzer program does not
verify the correctness of the script.
TABLE 4-2: I
2
C™ SCRIPT MACRO COMMAND
Macro Command
Command
Abbreviation
Description
I2CINIT [I_] I
2
C™ Initialization
I2CSTART [S_] I
2
C™ Start
I2CSTOP [P_] I
2
C™ Stop
I2CRESTART [RS] I
2
C™ Restart
I2CWRTBYT [W_] I
2
C™ Write Bytes. Next byte is the byte count,
followed by the data.
I2CRDBYT [R_] I
2
C™ Read Bytes. Next byte is the byte count.
I2CRDBLK [RB] I
2
C™ Read Block
I2CBITRATE [BR] Set I
2
C™ Bit Rate - min:0 = 35k, max:127 = 100k.
Next byte is the bit rate.
I2CRESET [RE] Reset MSSP module
I2CRDBYTNLB [RN] Read bytes - NACK last byte. Next byte is the byte
count
I2CRDBLKNLB [RBN] Read block - NACK last byte
I2CAUX1RST [A1RST] Reset AUX1