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
OLED Memory problem
Moderator: Benj
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
OLED Memory problem
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- 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: OLED Memory problem
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: OLED Memory problem
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
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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: OLED Memory problem
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
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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: OLED Memory problem
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
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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
- 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: OLED Memory problem
Hi Stuart,
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.
As is the component will work on a device with more memory.Are you saying that I can use the component but I need to change to a device that has a larger amount of 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.
I think DRAM and SRAM are both essentially referring to RAM, nothing to do with EEPROM or Flash Program memory.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
Hmm let me investigate this for you, I beleive this is unrelated to the LCD.I have a few pic18f24J11 devices so I swapped to these, when I try and write to Hex I get this error
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- 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: OLED Memory problem
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.
Simply extract the attached files to your "Flowcode 7/FCD/PIC" folder restart Flowcode and the problem should then be gone.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: OLED Memory problem
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
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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.
Computers are like air conditioners. They work fine until you start opening windows.
-
- Posts: 71
- Joined: Thu Aug 10, 2017 2:04 pm
- Has thanked: 25 times
- Been thanked: 36 times
- Contact:
Re: OLED Memory problem
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
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