User manual
PICkit™ SERIAL ANALYZER
USER’S GUIDE
© 2007 Microchip Technology Inc. DS51647A-page 73
Chapter 9. PICkit™ Serial Analyzer Firmware
9.1 INTRODUCTION
This chapter explains the internal operations of the PICkit™ Serial Analyzer firmware.
The source code is available on the PICkit Serial Analyzer CD-ROM at D:\PICkit Serial
Analyzer\Firmware.
9.2 HIGHLIGHTS
This chapter discusses:
•EXEC
•COMM
•I
2
CM Communications
• SPI Communications
• USART Communications
9.3 OVERVIEW
Internally, the PICkit™ Serial Analyzer operates two firmware state controllers running
in parallel – EXEC (executive) and COMM (communication). The EXEC controller is
responsible for overall PICkit™ Serial Analyzer configuration, moving data to/from the
host (via USB) and moving data to/from the COMM controller (via RAM buffers). The
COMM controller supervises serial communication with the target device. This includes
both configuring the necessary communication hardware and executing a sequential
‘script’ defining a serial ‘transaction’.
FIGURE 9-1: ARCHITECTURE
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 9-1, the data stream for each state controller has a set of associated TAG bytes
defined in detail later in the document.
I
2
C™
SPI
USART
COMM
CONTROL
CBUF2
(output/data)
CBUF1
(script/data)
CBUF
(scratch)
STATUS
CONTROL
EXEC
EP0-OUT
EP0-IN
EP1-IN
EP1-OUT
ARCHITECTURE
USB
CIRCULAR
BUFFERS
H
O
S
T
D
E
V
I
C
E