5.5.10 More on Trace/Log ID Numbers

MPLAB X 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 64 log points. These limits are determined by port trace (8 bits). Bit 7 is used as a clock and Bit 6 is used as a flag which indicates either a trace record (1) or a log record (0).

For a trace record, 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.

clock1nnnnnn
bit 7bit 6bit 0
For a log record, the low order bits represent the log number (nnnnnnn).
clock0nnnnnn
bit 7bit 6bit 0