Hello,
I like to fill up the EEPROM from the PIC with data that I will use while I run the program. Just like peek.
I fill it up with the EEPROM MACRO but this is address by address.
I'm looking for an other way so I can write a column (128 addresses) of data in one time to the EEPROM. This data must always stay in the PIC and it will be readout if running the program.
Manny thanks.
Fill-up EEPROM with data
- Steve
- Matrix Staff
- Posts: 3422
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
You can fill the EEPROM with information using the code similar to the following:
You should put code like this into the top box of the "supplementary code" window.
"_EEPROM" is defined as 0x2100 for 16F series chips. If you want to put data into a specific part of the EEPROM, use "_EEPROM + 100", etc.
Code: Select all
//Initializes EEPROM with data: 0C 22 38 48 45 4C 4C 4F 00 FE 99
#pragma DATA _EEPROM, 12, 34, 56, "HELLO", 0xFE, 0b10011001
"_EEPROM" is defined as 0x2100 for 16F series chips. If you want to put data into a specific part of the EEPROM, use "_EEPROM + 100", etc.