6 PIC24/dsPIC33F/dsPIC33E EMULATION CHECKLIST
Following are the configuration users were required to make for generating the Data EEPROM Emulation algorithm/code for the PIC24/dsPIC33F/dsPIC33E devices without using the 16 Bit Data EEPROM EMULATION Module.
- Specify the number of EEPROM banks required in DATA_EE_BANKS; the maximum number is limited by the device memory.
- Specify the amount of data EEPROM needed for each bank in DATA_EE_SIZE. The maximum is 255 (0xFE). A compile-time error will generate if the data EEPROM size exceeds 255.
- Specify the number of program memory pages in NUM_DATA_EE_PAGES. The minimum is two pages. A compile-time error will generate if fewer than two pages are defined.
- Verify the ERASE, PROGRAM_ROW and PROGRAM_WORD opcode values.
- Specify the page erase size (in instructions) in NUMBER_OF_INSTRUCTIONS_IN_PAGE.(Refer to the specific device data sheet to verify the page erase size for the device.)
- Specify the maximum programming size (in instructions) in NUMBER_OF_INSTRUCTIONS_IN_ROW.(128 for the dsPIC33E/PIC24E devices and 64 for other device families).
- Select the maximum erase/write cycle count in ERASE_WRITE_CYCLE_MAX. The maximum is 65,535. A compile-time error will generate if the limit is exceeded.
- In all dsPIC33E and PIC24F devices containing the Flash ECC feature (check the
specific device data sheet to find out if ECC is present), un-comment the
following line in the include file, “DEE Emulation 16-bit.h”:
#define __HAS_ECC
- For the dsPIC33E/PIC24E devices, comment or un-comment the _AUXFLASH pre-processor definition for using the primary Flash program memory or auxiliary Flash program memory, respectively.
- Add a function call to DataEEInit prior to any other operation to emulated data EEPROM.
- Add the data emulation algorithm source files to your project.