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.

PICC-18 Overlap of ram memory variables

Status
Not open for further replies.

mrcube_ns

Advanced Member level 1
Joined
Apr 10, 2002
Messages
452
Helped
48
Reputation
96
Reaction score
34
Trophy points
1,308
Location
Europe
Activity points
3,813
Hi all;

I have strange behavior of PIC18F4550.

I doing some project which send and receive SMS, generally everything working fine (in term of sending and receiving SMSs), but I have problem:
some memory static variables are overlaped one over another so when I put some string in a variable, it become overwritten with part of other strings or with value of some other variable.

I do not know reason.

List of strings definitions are:

static char txBuff[50], rxBuff[251], messText[160], tel_to_send[30], debugBuff[30];
static char const tel[5][16]={
"\"+123456789012\"", //THIS IS FAKE TEL NUMBERS HERE, in my code are real ones
"\"+123456789013\"",
"\"+123456789014\"",
"\"+123456789015\"",
"\"+123456789016\""
};
static char RecivedTelNum[20];


I have same problem with value of a few static unsigned int variables, which gets value from some other variable without any reason.

ANY IDEAS????



Compiler print this information after successful build :

Psect Usage Map:

Psect | Contents | Memory Range | Size
-----------|---------------------------|---------------|--------------
reset_vec | | 0000h - 0003h | 4 bytes
intcode | Interrupt service routine | 0008h - 0013h | 12 bytes
intcodelo | | 0018h - 0027h | 16 bytes
init | Initialization code | 0028h - 0057h | 48 bytes
end_init | Initialization code | 0058h - 006Dh | 22 bytes
text0 | Program and library code | 006Eh - 1239h | 4556 bytes
text20 | Program and library code | 123Ah - 1775h | 1340 bytes
text6 | Program and library code | 1776h - 181Dh | 168 bytes
text2 | Program and library code | 181Eh - 18C3h | 166 bytes
text15 | Program and library code | 18C4h - 1959h | 150 bytes
text10 | Program and library code | 195Ah - 19E9h | 144 bytes
text7 | Program and library code | 19EAh - 1A75h | 140 bytes
text3 | Program and library code | 1A76h - 1AFFh | 138 bytes
text4 | Program and library code | 1B00h - 1B87h | 136 bytes
text17 | Program and library code | 1B88h - 1BF1h | 106 bytes
text5 | Program and library code | 1BF2h - 1C51h | 96 bytes
text9 | Program and library code | 1C52h - 1CB1h | 96 bytes
text1 | Program and library code | 1CB2h - 1D09h | 88 bytes
text16 | Program and library code | 1D0Ah - 1D5Bh | 82 bytes
text11 | Program and library code | 1D5Ch - 1DADh | 82 bytes
text21 | Program and library code | 1DAEh - 1DFBh | 78 bytes
text18 | Program and library code | 1DFCh - 1E45h | 74 bytes
text12 | Program and library code | 1E46h - 1E81h | 60 bytes
text8 | Program and library code | 1E82h - 1EB7h | 54 bytes
text14 | Program and library code | 1EB8h - 1EE5h | 46 bytes
text19 | Program and library code | 1EE6h - 1F05h | 32 bytes
text13 | Program and library code | 1F06h - 1F1Fh | 26 bytes
| | |
mediumcon | | 7D9Eh - 7FFFh | 610 bytes
-----------|---------------------------|---------------|--------------
| | |
rparam | | 004Ch - 005Fh | 20 bytes
| | |
abs_s1 | | 0000h - 004Bh | 76 bytes
abs_s1 | | 0060h - 026Eh | 527 bytes
abs_s1 | | 0400h - 04FFh | 256 bytes
-----------|---------------------------|---------------|--------------


Memory Class Usage:

Program space:
CODE used 1F18h ( 7960) of 8000h bytes ( 24.3%)
CONST used 0h ( 0) of 8000h bytes ( 0.0%)
SMALLCONST used 0h ( 0) of 7800h bytes ( 0.0%)
MEDIUMCONST used 262h ( 610) of 7800h bytes ( 2.0%)

Data space:
RAM used 0h ( 0) of 7A0h bytes ( 0.0%)
BIGRAM used 0h ( 0) of 7A0h bytes ( 0.0%)
COMRAM used 14h ( 20) of 60h bytes ( 20.8%)
ABS1 used 35Bh ( 859) of 7A0h bytes ( 44.0%)
BANK0 used 0h ( 0) of 100h bytes ( 0.0%)
BANK1 used 0h ( 0) of 100h bytes ( 0.0%)
BANK2 used 0h ( 0) of 100h bytes ( 0.0%)
BANK3 used 0h ( 0) of 100h bytes ( 0.0%)
BANK4 used 0h ( 0) of 100h bytes ( 0.0%)
BANK5 used 0h ( 0) of 100h bytes ( 0.0%)
BANK6 used 0h ( 0) of 100h bytes ( 0.0%)
BANK7 used 0h ( 0) of A0h bytes ( 0.0%)
NVRAM used 0h ( 0) of A0h bytes ( 0.0%)

EEPROM space:
EEDATA used 0h ( 0) of 100h bytes ( 0.0%)

ID Location space:
IDLOC used 0h ( 0) of 8h nibbles ( 0.0%)

Configuration bits:
CONFIG used 0h ( 0) of 7h words ( 0.0%)


Memory Summary:
Program space used 217Ah ( 8570) of 8000h bytes ( 26.2%)
Data space used 36Fh ( 879) of 7A0h bytes ( 45.0%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
ID Location space used 0h ( 0) of 8h nibbles ( 0.0%)
Configuration bits used 0h ( 0) of 7h words ( 0.0%)



Thank you in advance!!!!



Mr.Cube
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top