I want to store a single bit with rare rewrite. It's possible for STM32 without EEPROM, but how about PIC microcontroller?
And is there examples with configuration and code?

  • 4
    \$\begingroup\$ Have you scrutinized the data sheet to see if you can write to internal flash while the processor is running? Is there a reason you cannot use RAM? \$\endgroup\$ – TimWescott Sep 3 '19 at 15:18
  • 3
    \$\begingroup\$ What have you uncovered in your research so far? Can this MCU write to its own flash memory? Can it erase less than all of it? Would your application permit using a small I2C EEPROM or FRAM or does the MCU offer "backup" registers which retain state even in the lowest power mode? How much power do you actually save by disabling the ordinary RAM? \$\endgroup\$ – Chris Stratton Sep 3 '19 at 15:18

What you need to look for is if the processor can perform reads and writes to its own flash. I don't know of all members of the PIC10Fxx family do, but according to this page (https://www.microchip.com/wwwproducts/en/PIC10F322) the PIC10F322 does. A bullet point on that page says "Flash Program Memory with self read/write capability". Additionally, this part also has a separate 128 bytes of "high endurance flash memory" specifically for non-volatile storage.

MCU vendors often have white papers or application notes for this sort of thing.


Yes, you could emulate a high endurance EEPROM for the PIC10 family. Have a look at the application note AN1687 from Microchip.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.