Fill-up EEPROM with data

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
skywalker
Posts: 3
Joined: Thu Mar 22, 2007 4:21 pm
Location: Belgium
Contact:

Fill-up EEPROM with data

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

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

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

Post Reply