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.

Pic 18f4685 RAM Memory

Status
Not open for further replies.

nimm

Newbie level 3
Joined
Dec 1, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
Hi all,

please help me, I want to write some values in ram in a specific location.

like ( x=4 in specific location)

I'm using Mplab with c18 compiler

thanks
 

Hi,

For that purpose "pragma" directive is used.

As an example;

#pragma udata specific_loc_var=0x100
char user_c1,user_c2;
int user_i1,user_i2;

This will start allocating variables from ram location 0x100,
2 single-byte variables (user_c1 and user_c2)
then 2 double-byte variables (user_i1 and user_i2)
All those are in consecutive manner. (ie start in 0x100 end at 0x106)

Thank you,
 
  • Like
Reactions: nimm

    nimm

    Points: 2
    Helpful Answer Positive Rating
to DineshSL thank you, it is helpful
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top