Hello,
I bought little Oled LCD who seems to be very great
But they are I2C and not SPI version.
I made some "i2c optimisation" to have a faster display but it is still not enought.
I don't have a very beautiful refresh rate.
I saw ont his topic http://www.matrixtsl.com/mmforums/viewt ... 6&start=50 that they are some optimisation made for the spi version to only write pixel values that have changed.
Is it possible to have the same optimisation on the simple I2C version ?
Thank you for your help
Adding SSD1306 buffered optimization to the I2C component
Moderator: Benj
-
- Posts: 333
- Joined: Mon Oct 05, 2009 2:39 pm
- Has thanked: 30 times
- Been thanked: 33 times
- Contact:
Re: Adding SSD1306 buffered optimization to the I2C componen
Hello,
Maybe I'm doing something wrong ?
I'm just trying to print numbers on the screen but I have to clear the display before print something everytime.
The result is I have some flickering.
I think the oled component I use need some optimisations made for the spi version to only write pixel values that have changed.
So i could print number without clearing the display but maybe I can make it right with another way ?
Thank you
Maybe I'm doing something wrong ?
I'm just trying to print numbers on the screen but I have to clear the display before print something everytime.
The result is I have some flickering.
I think the oled component I use need some optimisations made for the spi version to only write pixel values that have changed.
So i could print number without clearing the display but maybe I can make it right with another way ?
Thank you
-
- Posts: 333
- Joined: Mon Oct 05, 2009 2:39 pm
- Has thanked: 30 times
- Been thanked: 33 times
- Contact:
Re: Adding SSD1306 buffered optimization to the I2C componen
Benj ?
Do you understand what I mean with my bad english ?
I can explain it in an other way or try to make a little video to see why it is not as good as It could be.
Thank you
Do you understand what I mean with my bad english ?
I can explain it in an other way or try to make a little video to see why it is not as good as It could be.
Thank you
- 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: Adding SSD1306 buffered optimization to the I2C componen
Hello Mathy,
Yes I understand your meaning. I have already had a quick look and meant to reply but must have got distracted onto something else.
I will go over the code again now and see if I can make any improvements.
....
Ok, I've looked now and the code is the same for the two components. Here is the latest exported component if you want to see if this improves things at all.
Yes I understand your meaning. I have already had a quick look and meant to reply but must have got distracted onto something else.
I will go over the code again now and see if I can make any improvements.
....
Ok, I've looked now and the code is the same for the two components. Here is the latest exported component if you want to see if this improves things at all.
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: Adding SSD1306 buffered optimization to the I2C componen
Here is something you can try if the new component is not giving you and speed boost.
Go into the CAL I2C file and edit this section of code.
to this, you may have to increase the number of nops until the comms works reliably.
Go into the CAL I2C file and edit this section of code.
Code: Select all
#ifndef MX_I2C_SW_DEL
#define MX_I2C_SW_DEL
#define MX_I2C_SW_BAUD ((500000 / MX_I2C_BAUD_X)-1)
#if (MX_I2C_SW_BAUD < 1)
#define MX_I2C_DELAY delay_us(1);
#else
#define MX_I2C_DELAY delay_us(MX_I2C_SW_BAUD);
#endif
#endif
Code: Select all
#ifndef MX_I2C_SW_DEL
#define MX_I2C_SW_DEL
#define MX_I2C_SW_BAUD ((500000 / MX_I2C_BAUD_X)-1)
#if (MX_I2C_SW_BAUD < 1)
#define MX_I2C_DELAY nop();nop();
#else
#define MX_I2C_DELAY delay_us(MX_I2C_SW_BAUD);
#endif
#endif
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
-
- Posts: 139
- Joined: Tue Jan 05, 2010 10:07 am
- Has thanked: 20 times
- Been thanked: 25 times
- Contact:
Re: Adding SSD1306 buffered optimization to the I2C component
Hi Ben et al,
For Flowcode 8, is there an SD1306 Buffered component for I2C at all? I have tried an I2C SSD1306 with an Arduino and it's got very slow referesh rate Especially when pushing some bitmaps onto the screen...
Thanks,
R
For Flowcode 8, is there an SD1306 Buffered component for I2C at all? I have tried an I2C SSD1306 with an Arduino and it's got very slow referesh rate Especially when pushing some bitmaps onto the screen...
Thanks,
R
- 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: Adding SSD1306 buffered optimization to the I2C component
Hello,
Yes there is a buffered SSD1306 component in Flowcode 8 you can use the free 30 day trial to test it out.
As for only writing pixel values that change. On a monochrome display you usually control 8 pixels in one write operation. So all 8 pixel values would have to be unchanged to get any speed optimisation.
Yes there is a buffered SSD1306 component in Flowcode 8 you can use the free 30 day trial to test it out.
As for only writing pixel values that change. On a monochrome display you usually control 8 pixels in one write operation. So all 8 pixel values would have to be unchanged to get any speed optimisation.
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