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.

RAM Problem with PIC16F877A

Status
Not open for further replies.

garg29

Advanced Member level 1
Joined
Nov 17, 2004
Messages
451
Helped
25
Reputation
50
Reaction score
9
Trophy points
1,298
Activity points
3,605
pic16f877a ram

Hi guys,
i'm trying to learn gsm modem communicatin with microcontroller(pic16f877). in 'C' laguage.

I'm able to receive sms through gsm modem but only first few characters. I am defining a string as
Code:
unsigned char sms[50];
but if i try to increase the no. of characters and for that i try to define Code:
unsigned char sms[90];
i get the following errors:- Quote:
Error[491] : can't find 0x85 words for psect "rbss_0" in segment "BANK0"
Error[491] : can't find 0x7 words for psect "temp" in segment "COMBANK"
Error[593] : can't find 0x2 words (0x2 withtotal) for psect "code_ptr" in segment "BANK0"



i tried using different bank Code:
bank1 unsigned char sms[90];
but i still get the same resultts

Please help me out.

With best regards,
Garg
 

namqn

Full Member level 3
Joined
Feb 19, 2006
Messages
172
Helped
26
Reputation
52
Reaction score
7
Trophy points
1,298
Activity points
2,410
for psect code_ptr in segment bank0

PIC16F877A has 4 RAM banks, in which the top 16 bytes of each are mapped to the same address. Therefore, bank 0 and bank 1 have only 80 contiguous bytes of general purpose RAM, and bank 2 and bank 3 have only 96 contiguous bytes of general purpose RAM.

For your array of 90 bytes of RAM, you could try bank 2 or bank 3.

Cheers,
 

garg29

Advanced Member level 1
Joined
Nov 17, 2004
Messages
451
Helped
25
Reputation
50
Reaction score
9
Trophy points
1,298
Activity points
3,605
pic16f877 bank ram

thanks for your reply can u please tell me how can i split one array in 2 different banks.
Thanks once again.
 

namqn

Full Member level 3
Joined
Feb 19, 2006
Messages
172
Helped
26
Reputation
52
Reaction score
7
Trophy points
1,298
Activity points
2,410
pic16f877a size of banks

I don't think you should spread your array over 2 banks. Can you not use 2 arrays?

Cheers,
 

user1111

Member level 3
Joined
Mar 24, 2007
Messages
55
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,288
Activity points
1,576
psect pic16f877 bank

put your data in other bank 1,2,or 3
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top