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.

array problem in PIC16F877

Status
Not open for further replies.

kappa_am

Full Member level 6
Full Member level 6
Joined
Jul 16, 2012
Messages
331
Helped
19
Reputation
38
Reaction score
19
Trophy points
1,298
Location
Vancouver
Visit site
Activity points
3,859
Hi all,
While ago, I wrote a program in PIC 18f45K22, which include array data computation. Today I tried to write it for PIC16F877A, it works but several arrays remain zero. I used data watch of the Mikroc
for example in below line
Code:
           WON[0][CL1]=DCHP;

CL1 and DCHP have value but executing this line does not affect value of WON[0][CL1].

I wonder why?
I thought it is addressing problem, so I delete many other variables and turn the program to a simple routine, but the problem was consistent.

I would be grateful if you share your opinion with me.

thank you
 

Memory Bank switching problem ? Do you get IRP bit must be set manually to access xyz variable in messages window ?
 
yeap; just for three of them... and yes they are the ones which have problems. thank you for your guidance.
another question is why just three of the arrays? it means just these 3 arrays are on bank 2 and 3?
 

The 16F877 has only 368 bytes of RAM to hold your array and all other program variables, including ones created automatically by the compiler. That seriously limits your array size, especially as it has two dimensions.

Please show how you declared the array and what type of variables are CL1 and DCHP.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top