Page 1 of 1

GLCD error message

Posted: Sun Feb 25, 2018 11:21 am
by Jan Lichtenbelt
My first try to use the GLCD with SSD1306 driver and using I2C, gives two errors:
Test GLCD SSD1306 I2C_V1.c: 181: (1250) could not find space (128 bytes) for variable _FCV_0cc51_gLCD_SSD1306_i2c1__DRAM7
Test GLCD SSD1306 I2C_V1.c: 181: (1262) object "_FCV_0cc51_gLCD_SSD1306_i2c1__DRAM7" lies outside available data space (warning)
What to do?

Kind regards

Jan Lichtenbelt
Test GLCD SSD1306 I2C_V1.fcfx
(9.34 KiB) Downloaded 295 times

Re: GLCD error message

Posted: Sun Feb 25, 2018 7:29 pm
by gdt
Hello Jan,
it's a matter of RAM. You need to use another PIC or reduce the display height and/or width if you want to use same hardware.
Read this post: viewtopic.php?f=63&t=19414&p=85805#p85805

Regards
Giuseppe

Re: GLCD error message

Posted: Mon Feb 26, 2018 10:17 am
by Jan Lichtenbelt
I use the 16F1847 microchip which has 1024 RAM. How much RAM do I need for this GLCD apllication? The GLCD has 128x64 pixels.

Kind regards

Jan

Re: GLCD error message

Posted: Mon Feb 26, 2018 10:46 am
by gdt
Hello,
I don't know exactly how the RAM is handled on this controller but in my case I was using a PIC18LF26K80 which has 3648 byte and it was ok.

Regards
Giuseppe

Re: GLCD error message

Posted: Mon Feb 26, 2018 1:50 pm
by Jan Lichtenbelt
128x64= 8192 bits and is 1024 bytes. The 16F1847 has a Ram of 1024. That should fit, isn't it?

Kind regards

Jan Lichtenbelt

Re: GLCD error message

Posted: Mon Feb 26, 2018 4:14 pm
by gdt
Hi,
it doesn't mean that the RAM is used only for the display.
If you want to make a test, just define the display 64x64 and compile. Then you will see how much RAM is used.
Regards
Giuseppe

Re: GLCD error message

Posted: Mon Feb 26, 2018 5:13 pm
by Benj
128x64= 8192 bits and is 1024 bytes. The 16F1847 has a Ram of 1024. That should fit, isn't it?
I'm afraid that the device RAM is also required for the component variables separate from the pixel buffer, your user variables and the program stack. The compiler is simply saying it cannot fit everything in.

Re: GLCD error message

Posted: Wed Feb 28, 2018 8:22 pm
by Jan Lichtenbelt
Setting flowcode to 128x64, I get a RAM overflow with 16F1847. Setting it to 128x32, it works fine.

Kind regards

Jan Lichtenbelt