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 me IN ACCESSING INTERNAL RAM

Status
Not open for further replies.

namees22

Junior Member level 2
Joined
Aug 30, 2012
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Ernakulam
Activity points
1,430
hi,

am working on a project now i would like to know how to access the internal memmory i know it in assembly but i need to code that in C..how wil i start...moving a data to specific location in RAM.help me guys.!
 

That's a very vague question as it depends entirely on the hardware you are using.

In general, use the pointer instructions in 'C', the operator "&xxxx" means the address of xxxx and "*xxxx" means the contents of xxxx. In both cases xxxx can be a memory address or a variable..

You can write and read using these instructions.

Brian.
 

thanks for the reply brain,i know pointer concept in c ,i have done some silly projects in c also..but coming to program a hardware,i found a keyword DATA(unsigned char data i; )will allocate memory in scratch pad area in internal ram.(30-7f) but it has some error while i applied it to my code..in Assembly we could do this by indirect addressing,what i need to ask u is
//////////////////////////
unsigned char DATA *ptr;
ptr=0x30;
*ptr=41;
////////////
will this data be moved to 30 of internal ram.
 

In principle yes, that should work but the keyword "DATA" is not part of standard "C" so it has some special meaning in your compiler. You will have to check your documentation to see exactly what it does.

Brian.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top