Page 1 of 1
OLED Memory problem
Posted: Tue Oct 03, 2017 7:30 pm
by acestu
Hi,
I have bought some oled displays that are i2c SSD1306:
Should I be able to use these with the gLCD_SSD1306_i2c1 component ?, only I have put a simple chart togethor with a pic16f1824 and when I try and compile to the chip I get this error:
Could this be that my device does not have enough memory ?
Thanks
Stuart
Re: OLED Memory problem
Posted: Wed Oct 04, 2017 10:22 am
by Benj
Hi Stuart,
The component currently requires at least 512 bytes of RAM just to host the pixel buffer when the display is 32 x 128 pixels. It is possible to make a version of the component that does not have the pixel buffer but this significantly limits what you can do with the display. Printing text at 8 pixels high on the byte boundaries (Y=0, Y=8, Y=16, Y=24) is possible.
I've just checked if we can read back the pixel data from the display in I2C mode to provide the full functionality without the buffer but the datasheet says read back is not available in serial modes.
Re: OLED Memory problem
Posted: Wed Oct 04, 2017 2:05 pm
by acestu
Hi Ben,
Are you saying that I can use the component but I need to change to a device that has a larger amount of memory ?
cheers
Stuart
Re: OLED Memory problem
Posted: Wed Oct 04, 2017 6:18 pm
by acestu
Hi Ben,
The Error messages talk of DRAM but in the data sheet for the device it has SRAM and Data Eeprom so which one is it referring to
Thanks
Stuart
Re: OLED Memory problem
Posted: Wed Oct 04, 2017 6:56 pm
by acestu
Hi Ben,
I have a few pic18f24J11 devices so I swapped to these, when I try and write to Hex I get this error:
Not sure what this means.....
Thanks
Stuart
Re: OLED Memory problem
Posted: Thu Oct 05, 2017 4:54 pm
by Benj
Hi Stuart,
Are you saying that I can use the component but I need to change to a device that has a larger amount of memory ?
As is the component will work on a device with more memory.
With a tweak the component can be made to work on lower memory devices but lots of the functionality will be lost e.g. you can only write to a block of 8 pixels so things like pixel set, line drawing, alternative size fonts etc will likely cause corruption.
The Error messages talk of DRAM but in the data sheet for the device it has SRAM and Data Eeprom so which one is it referring to

I think DRAM and SRAM are both essentially referring to RAM, nothing to do with EEPROM or Flash Program memory.
I have a few pic18f24J11 devices so I swapped to these, when I try and write to Hex I get this error
Hmm let me investigate this for you, I beleive this is unrelated to the LCD.
Re: OLED Memory problem
Posted: Thu Oct 05, 2017 5:09 pm
by Benj
Found the problem regarding the 18F24J11 configs, plus a few other devices.
Simply extract the attached files to your "Flowcode 7/FCD/PIC" folder restart Flowcode and the problem should then be gone.
- PIC.zip
- (55.74 KiB) Downloaded 297 times
Re: OLED Memory problem
Posted: Thu Oct 05, 2017 6:54 pm
by acestu
Hi Ben,
I changed the files and I just get 1 error now, it seems that the compiler doesen't support the extended functions on the chip, as far as fancy work on the oled goes I was just looking for a smaller display to display text rather than the great big i2c 20x4 lcd display, I am just experimenting with them on Arduino and half the battle is finding the right constructor for your device...
Thanks
Stuart
Re: OLED Memory problem
Posted: Wed Jan 03, 2018 1:32 am
by gdt
Hello Stuart,
I like this small display too and I ordered a few but not received yet. I confirm the DRAM error is due to RAM limitation on the chip. I started to use PIC12F1840 which has the same memory of your 16F1824 and I got the same error on Dram.
Anyway you have a chance to compile if you reduce the display size in pixel (Component->Properties->Dimensions->Pixel Height/Width) to something like 16x64 or 32x32 and so on. Of course your memory is gone and you can't do much with your chip.
No problems if you use some PIC with larger memory. I tried 16F1825, 16F1788 and 18F26K80 and no problems (again just on simulation so far...).
Regards
Giuseppe