User manual
Debug for 8- and 16-Bit Devices
© 2008 Microchip Technology Inc. DS51616B-page 73
EXAMPLE 7-3: dsPIC33F DEVICE RUNNING AT 10 MIPS WITH C PROJECT
EXAMPLE 7-4: dsPIC33F DEVICE RUNNING AT 16 MIPS WITH C PROJECT
EXAMPLE 7-5: dsPIC33F DEVICE RUNNING AT 34 MIPS WITH C PROJECT
7.3.10 More on Trace/Log ID Numbers
MPLAB IDE will automatically generate the ID numbers required for a trace or log
macro. However, to understand the method behind the numbering, read further.
You can have 64 trace points and 128 log points. These limits are determined by port
trace (8 bits). Bit 7 is used as a clock, thus leaving 7 bits for data (128). Bit 6 is a flag
which indicates a trace record instead of a log record.
For a trace record (bit 6 is 1), the low order bits represent the trace number (nnnnnn).
You could say 0-63 are the legal trace numbers and require the trace flag be set, but it
was just easier to combine the flag with the number and say the valid numbers are
64-127.
For a log record (bit 6 is 0), the low order bits identify the data type (t) and the log
number is sent in the next byte (nnnnnnn), thus freeing up a full 128 values.
Native SPI I/O Port
Library Size (in instructions) 87 + 9 92 + 9 93 + 9
GPRs Used (in bytes) 18 14 0
__TRACE(id) instruction cycles 80 53 32
__LOG(id, INT) instruction cycles 212 124 106
Native SPI I/O Port
__TRACE(id) instruction cycles 88 53 32
__LOG(id, INT) instruction cycles 227 138 106
Native SPI I/O Port
__TRACE(id) instruction cycles 100 53 32
__LOG(id, INT) instruction cycles 251 152 106
clock 1
bit 7 bit 0
n nnn nn
clock 0
bit 7 bit 0
t ttt tt
clock n
bit 7 bit 0
n nnn nn