Microchip Technology Inc., has expanded its product portfolio to include a wide variety of cost-effective PIC® Microcontrollers (MCUs) without an internal data EEPROM.
Many applications store nonvolatile information in the Flash program memory using table read and write operations. Applications that need to frequently update these data may have greater endurance requirements than the specified Flash endurance for the MCU/Digital Signal Controller (DSC) devices.
The alternate solution of using an external, serial EEPROM device may not be appropriate for cost-sensitive or pin-constrained applications.
This Data EEPROM Emulation library presents a third alternative that addresses these issues. This library features an interface similar to an internal data EEPROM, which uses available program memory and can improve endurance by a factor as high as 500.
This code example demonstrates the usage of Data EEPROM Emulation Library.
- dsPIC33AK128MC106 microcontroller (https://www.microchip.com/dsPIC33AK128MC106)
- Emulating Data EEPROM for PIC18 and PIC24 MCUs and dsPIC33 DSCs (https://www.microchip.com/en-us/application-notes/an1095)
- MPLAB® X IDE v6.20 or newer (https://www.microchip.com/mplabx)
- MPLAB® XC16 v3.10 or newer (https://www.microchip.com/xc)
- Any of the serial terminal application. Example: Tera Term (https://ttssh2.osdn.jp/index.html.en)
- dsPIC33AK Curiosity Development Board (https://www.microchip.com/EV74H48A)
- dsPIC33AK128MC106 GP DIM (https://www.microchip.com/ev02g02a)
- USB Type-c Cable
-
Launch Tera Term
-
Go to File -> New Connection.
-
Select the "Serial" option and select the correct COM Port from the dropdown menu.
-
Go to Setup -> Serial port and ensure that the settings match the following:
This demo runs the Data EEPROM Emulation , if emulation is successful then prints the message as shown below
If emulation fails then prints the message as shown below.
For more information refer: https://www.microchip.com/en-us/software-library/dspic33-pic24-data-eeprom-emulation