OLED Memory problem

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

Moderator: Benj

Post Reply
User avatar
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

Post by acestu »

Hi,

I have bought some oled displays that are i2c SSD1306:
Bang_Oled.png
(115.39 KiB) Downloaded 3186 times
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:
oled_fault.png
(18.38 KiB) Downloaded 3186 times
Could this be that my device does not have enough memory ?

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.

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: OLED Memory problem

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

User avatar
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

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

User avatar
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

Post 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 :?
16f1824_ram.png
(241.11 KiB) Downloaded 3149 times
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.

User avatar
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

Post 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:
18f24j11_error.png
(11.38 KiB) Downloaded 3148 times
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.

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: OLED Memory problem

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

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: OLED Memory problem

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

User avatar
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

Post 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...
extended_error.png
(6.83 KiB) Downloaded 3134 times
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.

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

Re: OLED Memory problem

Post 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

Post Reply