Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How do I insert data into the EEPROM?

Status
Not open for further replies.

ljcox

Full Member level 5
Full Member level 5
Joined
Feb 1, 2006
Messages
253
Helped
25
Reputation
50
Reaction score
23
Trophy points
1,298
Location
Melbourne Australia
Activity points
3,119
I have not used the EEPROM in a PIC before.

In the template for the 16F628A, the last three lines are as follows:-

; initialise eeprom locations

ORG 0x2100
DE 0x00, 0x01, 0x02, 0x03

I don't understand what this means.

Does the DE line represent the data that will be inserted in the first 4 EEPROM locations?

Or does it represent the addresses of the first 4 locations?

In short, how do I insert the EEPROM data into the .asm?

I programme in assembly, not C.

Any assistance will be appreciated.
 

What would be more interesting would be what else is attached to the board which holds the EEPROM, and what kind of tools you've got to hand (for programming in assembler for example).

EEPROM is just another kind of memory, like RAM, except it doesn't forget. So programming it is just a matter of using the right tool, which will become (hopefully) much more apparent when you supply some more details.

Hope this document can help a little
View attachment createEPROM.pdf
 
  • Like
Reactions: ljcox

    ljcox

    Points: 2
    Helpful Answer Positive Rating
'de' means "Declare EEPROM" byte. The numbers following it are the bytes stored in the EEPROM from the .HEX file. Note this does not produce code for storing the bytes, it just embeds the values in the hex file so the programmer can write them into the PIC when it is being programmed.

The address in EEPROM has 0x2100 added to it. This is to ensure the values don't fall within the normal programming addresses. 0x2100 means EEPROM address 0x0000, 0x2101 means EEPROM address 0x0001 and so on. The assembler automatically adds 1 to the address when it saves each value so unless you use another ORG statement, the data will be stored in ascending addresses.

Brian.
 

aggpankaj2
Thanks for the response, but I am not intending to use an external EPROM.

My question was with regard to the EEPROM within the PIC.

I have MPLAB IDE v 8.63.

Nevertheless, I have filed the paper you attached for possible future reference.

Thanks for the info.

Len

---------- Post added at 02:13 ---------- Previous post was at 02:08 ----------

Thanks Brian,
That is exactly what I wanted to know.

Len
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top