Instrumented Trace Resource Usage Examples
The following examples are for illustration only. Your results may vary based upon compiler/assembler version, command line options, MPLAB® X IDE version, size of data variable being logged, interrupt state, and device in use. All examples include argument setup, function call, and return time in their cycle counts.
The PIC18FXXJ MCU examples are compiled/assembled for non-priority interrupt usage (30 instructions). For priority interrupt usage, the value is 57; and for no interrupt usage, the value is 15.
The dsPIC33F DSC examples show nine instructions specified in the 16-bit library size for memcpy().
Native | SPI | I/O Port | |
---|---|---|---|
Library Size (in instructions) | 23 + 30 | 37 + 30 | 25 + 30 |
GPRs Used (in bytes) | 8 | 6 | 6 |
__TRACE(id) instruction cycles | 80 | 54 | 42 |
__LOG(id, BYTE) instruction cycles | 168 | 90 | 57 |
Table 1: PIC18FXXJ device running at 4 MHz (1 MIPS) with assembly project
Native | SPI | I/O Port | |
---|---|---|---|
Library Size (in instructions) | 75 + 30 | 87 + 30 | 112 + 30 |
GPRs Used (in bytes) | 10 | 8 | 8 |
__TRACE(id) instruction cycles | 79 | 71 | 55 |
__LOG(id, BYTE) instruction cycles | 225 | 169 | 162 |
Table 2: PIC18FXXJ device running at 40 MHz (10 MIPS) with C project
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, BYTE) instruction cycles | 212 | 124 | 106 |
Table 3: dsPIC33F device running at 10 MIPS with C project
Native | SPI | I/O Port | |
---|---|---|---|
__TRACE(id) instruction cycles | 88 | 53 | 32 |
__LOG(id, BYTE) instruction cycles | 227 | 138 | 106 |
Table 4: dsPIC33F device running at 16 MIPS with C project
Native | SPI | I/O Port | |
---|---|---|---|
__TRACE(id) instruction cycles | 100 | 53 | 32 |
__LOG(id, BYTE) instruction cycles | 251 | 152 | 106 |
Table 5: dsPIC33F device running at 34 MIPS with C project