English
Language : 

AN584 Datasheet, PDF (1/6 Pages) Microchip Technology – PICMASTER™ Support of Microsoft® Windows™ DDE
PICMASTER Support of Microsoft Windows DDE
AN584
PICMASTER™ Support of Microsoft® Windows™ DDE
The PICMASTER system supports Windows Dynamic
Data Exchange (DDE). This feature allows the contents
of the trace buffer to be transferred to other windows
applications such as Microsoft Excel™. This feature is
invaluable to control systems designers who would like
to plot real-time data to debug and fine tune an applica-
tion. This application note will show how to set this up
and graph system data.
THE TRACE BUFFER
5. You will see the trace buffer fill with instructions and
data if those instructions were executed and trace
enabled. If you do not see any instructions in the
trace buffer, check the Trace Settings in (1) and look
for loops or deadlock situations that would prevent
your program from executing these instructions.
Note: PICMASTER must be running and the trace
buffer open with data displaying in order to use
DDE for other Windows applications (such as
Microsoft Excel as described in the next section).
The PICMASTER contains a 8K x 40 bit trace buffer.
The fields within this buffer are broken up into three
categories:
(1) Current Address of instruction 16-Bits (ADDRESS)
SETTING UP EXCEL
After starting Excel with a blank spread sheet, select 100
rows in the first column by pressing the left mouse button
(2) Data/Opcode Field
16-Bits (DATA)
(3) External Logic Analyzer inputs 8-Bits (EXT)
—————
and holding it down to drag across all cells. Next Type
the following string in the box:
5
=PICMASTR|’c:\path\test.hex’!’data 0 99’
40-Bits
and hit CNTRL+SHIFT+ENTER
Any instruction can be optionally traced or not traced; the
The format for this command is as follows:
trace for each instruction is enabled by the “T” field on the
far left column of the program memory dump window. To
set up the trace buffer, do the following:
1. Select the SETUP->TRACE SETTINGS window
option to set up a range of addresses to be traced.
These ranges are selecting specific memory ad-
=PICMASTR|’<hex_file>‘!’<string>
<start_address> <end_address>‘
• <hex_file> represents the full path and filename of
the object code file that you have downloaded to
program memory. This string must match what is
displayed in the PICMASTER window handle at the
dresses that will be traced if these instructions are
top of the PICMASTER window.
executed. Individual instructions can also be trace
enabled / disabled with theSHIFT+RIGHT_MOUSE
button
2. Open the trace window by selecting the WATCH-
>TRACE MEMORY menu selection.
3. Click the RUN button after opening the Run box with
the RUN->RUN BOX menu selection.
4. The processor will now run. At a later time you may
hit the HALT button from the Run Box.
• <string> defines the group of values that you want
to look at in the trace buffer. The following are the
three groups of trace information:
• ADDRESS for opcode address (16-bits Real-time
data)
• DATA for the opcode coding itself (16-bits Real-time
data)
• EXT for the external logic probes (8-bits Real-time
data)
EXAMPLE 1: TRACE BUFFER DATA
Trace
Buffer
Address
Program
Memory
Address
Instruction
Opcode
(12,14,16 bit)
0
:
711
425
1
:
712
525
2
:
713
305
3
:
714
36F
Address
Label
BIT3
Instruction
Comments
bcf porta,0x1
bsf porta,0x1
rrf porta,W
rlf 0xF
;Toggle Clock
;Clock in data
© 1994 Microchip Technology Inc.
5-231
DS00584A-page 1