Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 17th March 2004, 01:32 PM   #1
Default What is the conveniant way of retrieving i2c eeprom?

actually i can read and write the external eeprom

the problem i face is that

I CANNT get a value by specifying the varible name. instead, i have to supply memory address for that.

for example, i cannt read a value by simply writing
printf("%u", variable_name");
instead, i have to KNOW the address of the content in ADVANCE!.

What is the conventional way of retrieving data from eeprom?
janetsmith2000@yahoo.com is offline  
Old 17th March 2004, 03:34 PM   #2
Default Re: What is the conveniant way of retrieving i2c eeprom?

Quote:
Originally Posted by janetsmith2000@yahoo.com
I CANNT get a value by specifying the varible name. instead, i have to supply memory address for that.

for example, i cannt read a value by simply writing
printf("%u", variable_name");
instead, i have to KNOW the address of the content in ADVANCE!.

What is the conventional way of retrieving data from eeprom?
The conventional way is reading it from the address you stored it at, an EEPROM is just a serial access memory chip - if you want to access it in some other way you would need to write some kind of access scheme - rather like a DOS or file system.

Generally knowing the addresses isn't a problem, and if you wanted to use labels for the addresses you could use equates for them.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 17th March 2004, 04:31 PM   #3
Default

hmm...
variable is stored in RAM
not in external eeprom

you could define an address to a variable
#define A 0xffff
then implement i2c read function
i2c_read(A)

overall, it could be written in this way
printf(i2c_read(A));
StupidDum is offline  
Reply

Thread Tools
Display Modes




All times are GMT. The time now is 12:21 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker