GLCD error message

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

GLCD error message

Post 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 222 times

gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

Re: GLCD error message

Post 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

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: GLCD error message

Post 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

gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

Re: GLCD error message

Post 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

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: GLCD error message

Post 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

gdt
Posts: 71
Joined: Thu Aug 10, 2017 2:04 pm
Has thanked: 25 times
Been thanked: 36 times
Contact:

Re: GLCD error message

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: GLCD error message

Post 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.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: GLCD error message

Post 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

Post Reply