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 PIC18FXxxJ 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()
.
Table 5-9. PIC18FxxJ MCU Running at 4MHz (1 MIPS) with Assembly Project | 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 5-10. PIC18FxxJ MCU Running at 40MHz (10 MIPS) with C 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, INT)
instruction cycles | 225 | 169 | 162 |
Table 5-11. dsPIC33F DSC Running at 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, INT)
instruction cycles | 212 | 124 | 106 |
dsPIC33F device running at 16 MIPS with C project
Table 5-12. dsPIC33F DSC Running at 16 MIPS with C Project | Native | SPI | I/O Port |
---|
__TRACE(id)
instruction cycles | 88 | 53 | 32 |
__LOG(id, INT)
instruction cycles | 227 | 138 | 106 |
Table 5-13. dsPIC33F DSC Running at 34 MIPS with C Project | Native | SPI | I/O Port |
---|
__TRACE(id)
instruction cycles | 100 | 53 | 32 |
__LOG(id, INT)
instruction cycles | 251 | 152 | 106 |