Searching \ for 'bank allocation problem' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/mems.htm?key=bank
Search entire site for: 'bank allocation problem'.

Truncated match.
PICList Thread
'bank allocation problem'
2009\06\01@082932 by Marcelo Rodrigues

picon face
Hi all,

I'm working with the PIC16F916, and according to the Datasheet (page 25)
it has the following memory banks:
Bank 0 = 96 bytes
Bank 1 = 80 bytes
Bank 2 = 80 bytes
Bank 3 = 96 bytes

I've written a small program only with 4 arrays to fill the banks, but
the compiler return an error:

bank0 unsigned char volatile static var00[96];
bank1 unsigned char volatile static var01[80];
bank2 unsigned char volatile static var02[80];
bank3 unsigned char volatile static var03[96];

Error [1250] double.c; 55. could not find space (96 bytes) for variable
_main_var03

However, if i set the bank 3 only with 80 bytes, it compiles succesfull
and says that I have 16 bytes free:

bank0 unsigned char volatile static var00[96];
bank1 unsigned char volatile static var01[80];
bank2 unsigned char volatile static var02[80];
bank3 unsigned char volatile static var03[80];

Data space used 150h (336) of 160h bytes ( 95.5%)

Why can't i fill these 16 bytes on bank 3, is it used for anything else?

Thanks in advance,

--
Marcelo dos Santos Rodrigues

2009\06\01@090004 by Carl Denk

flavicon
face
Not very good at this stuff, here's some quick thoughts, but make the
array small enough to compile successfully, then look at the MAP file
(any text editor, or open in MPLAB. All the addresses are shown. Do you
"#pragma idata" after you declare the thinks you want in the banks?

Marcelo Rodrigues wrote:
{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...