5.5.9 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 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
NativeSPII/O Port
Library Size (in instructions)23 + 3037 + 3025 + 30
GPRs Used (in bytes)866
__TRACE(id) instruction cycles805442
__LOG(id, BYTE) instruction cycles1689057
Table 5-10. PIC18FxxJ MCU Running at 40MHz (10 MIPS) with C Project
NativeSPII/O Port
Library Size (in instructions)75 + 3087 + 30112 + 30
GPRs Used (in bytes)1088
__TRACE(id) instruction cycles797155
__LOG(id, INT) instruction cycles225169162
Table 5-11. dsPIC33F DSC Running at 10 MIPS with C Project
NativeSPII/O Port
Library Size (in instructions)87 + 992 + 993 + 9
GPRs Used (in bytes)18140
__TRACE(id) instruction cycles805332
__LOG(id, INT) instruction cycles212124106

dsPIC33F device running at 16 MIPS with C project

Table 5-12. dsPIC33F DSC Running at 16 MIPS with C Project
NativeSPII/O Port
__TRACE(id) instruction cycles885332
__LOG(id, INT) instruction cycles227138106
Table 5-13. dsPIC33F DSC Running at 34 MIPS with C Project
NativeSPII/O Port
__TRACE(id) instruction cycles1005332
__LOG(id, INT) instruction cycles251152106