problem in writing C program

Thread Starter

cktcrazy

Joined Mar 27, 2011
16
hello

i ve a problem writing program in C. Previously i used assembly program now i'm switching to C .

In assembly we are assigning an inbuilt eeprom memory by writing

FOR EX.

position DATA 0008h

where position is any variable

we are assigning eeprom memory address 00008h to any user defined variable ,here taken as 'position'

thereafter we are accessing value from this memory address by using the
movx instruction and dptr .

but in C how we can define this eeprom address as well as how we can access value stored in this memory address ???

plz help me in this regard

thank u
 

AlexR

Joined Jan 16, 2008
732
This is a microcontroller compiler specific feature and every compiler has its own way of addressing eeprom. Since we have no idea which compiler or even which microcontroller you are using about all we can advise is "read your compiler manual".
 

Thread Starter

cktcrazy

Joined Mar 27, 2011
16
hi
i am using the C51 compiler the IDE i'm using is the uvision 2

and 8051 architecture mcu

plz have a reply

thank you
 

Thread Starter

cktcrazy

Joined Mar 27, 2011
16
This is a microcontroller compiler specific feature and every compiler has its own way of addressing eeprom. Since we have no idea which compiler or even which microcontroller you are using about all we can advise is "read your compiler manual".
hi
i am using the C51 compiler the IDE i'm using is the uvision 2

and 8051 architecture mcu

plz have a reply

thank you
 

t06afre

Joined May 11, 2009
5,934
Sorry I do not know the CPU or the compiler. But is is amazing what you can find with Google. Try something like C51 compiler eeprom.
Good luck
 
Top