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.

HELP for programming µc

Status
Not open for further replies.
imemkeycode = imemkeycode * 100;
imemkeycode = imemkeycode + eeprom_read(addr++);

what's mean this two staterments???
 

If data in eeprom is 1234. 12 is stored at address 0x0001 and 34 is stored at address 0x0000. First you retrieve value at address 0x0001 and multiply it with 100 and you get 1200. Then you get the value 34 and add it to 1200 and get 1234. The above code is wrong. It is my mistake. First read addr++ and then read addr.

method to write to eeprom.

1234

1234/100 = 12
1234%100 = 34

12 = 0Ch
34 = 22h

0x0000 = 22h
0x0001 = 0Ch
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top