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.

[SOLVED] How to save some Data in Code Memory of PIC16F877A

Status
Not open for further replies.

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,154
Helped
161
Reputation
396
Reaction score
189
Trophy points
1,353
Location
India
Activity points
10,591
Hello i have declared a variable in Hi-Tech for Storing 180 bytes of unsigned char variables.

But it is not working as my compiler gives error of 180 bytes not available..

can anyone tell me how to save data in code memory of PIC16F877A.

unsigned char wave[180] = {//180 values are written here};

i want to save these values in rom i.e code memory can anyone tell me how to do so..

I am using Hi-Tech C Compiler along with MPLAB IDE.


Regards
Arun Sharma'
 

You can't store 'variables' in any kind of ROM.
If it's a table of data that never changes, it's a constant array so try declaring it as "const unsigned char wave[180] = ...". Which should telll the compiler it can safely be stored in permanent (ROM) memory.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top