Page 1 of 1

Fill-up EEPROM with data

Posted: Fri Apr 13, 2007 6:49 pm
by skywalker
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.

Posted: Mon Apr 16, 2007 9:12 am
by Steve
You can fill the EEPROM with information using the code similar to the following:

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
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.