User manual

SPI Master Communications
© 2007 Microchip Technology Inc. DS51647A-page 45
FIGURE 5-12: SPI SCRIPT BUILDER – USER SCRIPTS
5.7.5 Creating A Script
Scripts are created by placing the cursor into the Script Detail column and right clicking.
A local menu will be displayed as shown in Figure 5-13. Select from the choice of
commands or script macro commands.
The sequence of macro commands are executed from top to bottom. Macro commands
are entered by right clicking in the box and selecting from the local menu as shown in
Figure 5-13.
Macro commands are entered according to the sequence of events as defined by the
SPI 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 5-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.
User Scripts
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.