Page 1 of 1

Read and Write to flash memory macros

Posted: Mon Jul 14, 2014 5:33 am
by Kenrix2
I made experimental flash memory read and write macros and thought I would share. The macros read or write a single byte at a time and are used in a style similar to that of how the EEPROM Component is used. These eeprom style flash memory macros are in blocks of 256 bytes. You can have 1 block (256 storage locations) or as many blocks as you need. So, for example, if the chip's flash memory size is 8k and your program only uses 1k of it, you have 7k storage locations you can read and write to. These experimental macros are only for the following PIC microcontrollers: 12F1840, 16F1825, 16F1827 and 16F1936. More chips in the 12 and 16 series can easily be added.