Read and Write to flash memory macros

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Read and Write to flash memory macros

Post 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.
Attachments
Flash_EE_PROM_256_X_v1.fcf
(41.91 KiB) Downloaded 711 times

Post Reply