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 (eight 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 easier to combine the flag with the number and say the valid numbers are 64-127.clock | 1 | n | n | n | n | n | n |
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 |
clock | 0 | n | n | n | n | n | n |
bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 |