Datasheet

Table Of Contents
PICkit™ Serial Analyzer User’s Guide
DS51647C-page 90 © 2009 Microchip Technology Inc.
Data streams associated with PICkit™ Serial Analyzer are formatted with markers
called “Tag” bytes. A Tag may be stand-alone or accompanied by data. As seen in
Table 11-1, the data stream for each state controller has a set of associated Tag bytes
defined in detail later in the document.
Exec manages the interface with the host. The data stream sent to PICkit™ Serial Ana-
lyzer from the host is encoded with ECMD Tags and the data stream returned to the
host from PICkit™ Serial Analyzer uses EDATA Tags. Likewise, the Comm controller
utilizes another set of predefined Tag(s) - CCMD Tags (outgoing scripts) and CDATA
Tags (returning data). Exec has no knowledge of Comm Tag(s) but simply transports
data blindly between the host and Comm using Exec Tag(s). RAM buffers are used as
conduits to exchange data with Comm. Data destined for Comm is queued in RAM buf-
fer 1 (CBUF1). Data returning from Comm is funneled through RAM buffer 2 (CBUF2).
The PICkit™ Serial Analyzer is designed to facilitate continuous ‘spooling’ of data
to/from the external serial device. Separate 255-byte circular buffers are maintained for
both outgoing data (scripts/data) and returning data. The USB interface is not permitted
to be a bottleneck in the PICkit™ Serial Analyzer operation. Exec processes each USB
packet immediately. If data is destined for a RAM buffer, the host is responsible to
insure adequate room is available in the buffer before the data is sent to avoid a fatal
‘overrun’ error. Returning data is queued in the appropriate circular buffer until retrieved
by Exec, tagged and sent to the host. It is possible to overrun the return buffer under
some circumstances but should be rare. Exec can interleave Exec data with Comm
data as necessary.
The PICkit™ Serial Analyzer maintains fixed-length blocks of data for control and
status. The CONTROL_BLOCK provides ‘static’ configuration information. The
STATUS_BLOCK is a snapshot of the PICkit™ Serial Analyzer operation. Each block is
divided into three sections corresponding to Exec, Comm (common to all protocols)
and Comm (specific to the active serial protocol).
TABLE 11-1: TAG BYTE TYPES
The other major blocks are the control memory block and the status memory block. The
control block is used to configure the PICkit™ Serial Analyzer. The control block is
divided into the following three sections:
Exec module configuration
Generic Comm module configuration
Protocol specific communication configuration
This third section will change depending on the protocol. The status block keeps the
status of various flags and is similarly divided into three sections.
TABLE 11-2: CONTROL BLOCK
Tag Types Definition
ECMD Exec command Tag(s) – interpreted by Exec
EDATA Exec data Tag(s) – generated by Exec
CCMD Comm command Tag)(s) – interpreted by Comm
CDATA Comm data Tag(s) – generated by Comm
Tag Bytes Definition
0-7 Exec section
8-15 Generic Comm section
16-23 Protocol specific communication section