Datasheet

Table Of Contents
PICkit™ Serial Analyzer User’s Guide
DS51647C-page 82 © 2009 Microchip Technology Inc.
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 9-9.
Macro commands are entered according to the sequence of events as defined by the
USART Synchronous Master 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 9-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 9-9: USART SYNCHRONOUS MASTER 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 9-2: USART SCRIPT MACRO COMMANDS
Macro Command
Command
Abbreviation
Description
USDATATX [TX] Transmit data. Next byte is the byte count, followed by
the data.
USDATARX [RX] Receive data. Next byte is the byte count.
USBAUD [BD] Set BAUD Rate. Next byte is baud (LSB) followed by
baud (MSB).
USCLKPOLSET [CS] Set Clock Polarity bit
USCLKPOLRST [CR] Reset Clock Polarity bit
USINIT [I_] Initialize USART controller
USAUX1RST [A1RST] Reset Aux1
USAUX1SET [A1RST] Set Aux1
USAUX1OUT [A1OUT] Set Aux1 direction to Output
USAUX1IN [A1IN] Set Aux1 direction to Input
USAUX1W0 [A1W0] Aux1 Wait 0