I am facing "362 Not enough RAM 'LCD_DATA' xxx.c" error now.
I am using PIC16F884 device and MikroC PRO for PIC V6.0.0 with free license.
Related ode is following.
(I deleted unrelated code. But it still have error.)
Code: Select all
// TOOL : MikroC PRO for PIC V6.0.0
/*
PIC16F884
Oscillator Selection : INTOSCIO
Watchdog Timer : Disabled
Power-up Timer : Disabled
RE3/MCLR Pin Function : Enabled
Code Protection : Program memory code protection is disabled
Data Code Protection : Dta memory code protection is disabled
Brown-out Reset : Enabled
Internal Extaernal Switchover : Enabled
Fail-Safe Clock Monitor : Enabeled
Low-Voltage Programing : Disabled
In-Circuit Debugger Mode : Disabled
*/
// Variable
unsigned char i = 0;
char LCD_DATA[80] = "123456789012345678901234567890";
char LCD_BUF[21] ="";
//char DUMY1[80] = "AAA";
//char DUMY2[20] ="";
// Prototype
void IoInit(void);
void Disp();
void main() {
IoInit();
while(1)
{
Disp();
}
}
void IoInit(void)
{
OSCCON = 0x70;
ANSEL = 0x1F;
TRISA = 0xEF;
PORTA.RA4 = 0;
ANSELH = 0x07;
TRISB = 0x0F;
PORTA.RB4 = 0;
PORTA.RB5 = 0;
PORTA.RB6 = 0;
PORTA.RB7 = 0;
TRISC = 0x8C;
}
void Disp()
{
LCD_BUF[i] = LCD_DATA[i];
//DUMY2[0] = DUMY1[0];
}
And I got following massage.
" Used RAM (bytes): 105 (44%) Free RAM (bytes): 135 (56%)"
It seems enough area for additional one byte.
In this condition, I can allocate DUMY1[80] additionally.
And I got following massage.
" Used RAM (bytes): 205 (85%) Free RAM (bytes): 35 (15%)"
But allocation DUMY1[81] was not allowed.
Is number 80 any limitation for array?
Thank you.