Memory

Creating Large Memory Arrays The C18 compiler does not support data buffers over 256 bytes without a modification to the linker script to define a larger bank of microcontroller ram. Copy the default linker script for your PIC18 device from: C:\Program Files (x86)\Microchip\MPASM Suite\LKR into your projects directory.  Add the file to your MPLAB project so […]

Read More

Locating things in Pogram memory

//—– CONSTANTS LOCATED IN PROGRAM MEMORY —– #pragma romdata firm_upgrade_code_markers_romdata_section=0x0009fc const rom WORD firmware_upgrade_marker_1 = OUR_PRODUCT_ID; const rom WORD firmware_upgrade_marker_2 = OUR_FIRMWARE_REVISION; #pragma code normal_section=0x000a00 extern void _startup (void); // See c018i.c in your C18 compiler dir #pragma code _RESET_INTERRUPT_VECTOR = 0x000a00 void _reset (void) { _asm goto _startup _endasm } #pragma code   Using […]

Read More