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 to access memory location in embedded c?

Status
Not open for further replies.

hiren_dave

Member level 1
Joined
Jul 3, 2012
Messages
40
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
AHMEDABAD,INDIA
Activity points
1,535
hi.

i want to know that how to access memory location in embedded c?

i have 1 register a and i want to store this in memory location 0x501 than how should i defined??
 

Do you mean writing to eeprom? Which mcu are you using?
 

Are you writing 8-bits?

I think you can write like

Code:
unsigned char *ptr = 0x501;

*ptr = ADCON0;

writing ADCON0 register to address 0x501.
 

mmm i think you need to define which memory is it...
0x501 for a 8051 seems external ram so you should define your pointer as xdata...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top