OLED SH1106_SPI Contrast

For general Flowcode discussion that does not belong in the other sections.
Abhijit
Posts: 26
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 6:26 am
Has thanked: 3 times

Re: OLED SH1106_SPI Contrast

Post by Abhijit »

Hi! Martin

I forgot to share the information i got from the manufacture, below for your reference.

https://files.waveshare.com/upload/0/08/SH1106_V2.3.pdf

OLED.jpg
OLED.jpg (75.18 KiB) Viewed 641 times
Thank you.

Abhi

medelec35
Matrix Staff
Posts: 1988
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 660 times

Re: OLED SH1106_SPI Contrast

Post by medelec35 »

Hello.
Many thanks for letting me know.
I spotted a mistake I made.
Can you try again with the attached component.
Don't forget you will need to reload your project after updated with the attached component.
Attachments
gLCD_SH1106_SPI.fcpx
(16.77 KiB) Downloaded 6 times
Martin

Abhijit
Posts: 26
Joined: Thu Dec 03, 2020 6:26 am
Has thanked: 3 times

Re: OLED SH1106_SPI Contrast

Post by Abhijit »

Hello! Martin
good morning

Thank you for writing back my friend.

I followed yesterdays procedure, delete the previous component and paste the new one, restart FC.

To be honest the difference of contras or brightness is very prominent in simulation but in hardware I see some difference but do not really understand if there is any change or may be my mind is expecting some change so could see :o but honestly not like simulation.

By the way the fonts "Character Spacing" and "Space Width" do not show the drop down menu in this component too.

I tried to check the change on 3 displays (I have 10-15 new displays) considering if any was faulty but no change. The displays which I am using were purchased in 2022, is there any probability this function did not exist then and is available in recent displays, a bit confused speculating.

Do suggest me if you have or want any different method to test.

Thank you again for your time.

Abhi

medelec35
Matrix Staff
Posts: 1988
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 660 times

Re: OLED SH1106_SPI Contrast

Post by medelec35 »

I have spotted that the fonts available was only 4, when it should have been 8, which updated displays show
The Write_Command was exposed to the top level, but Write_Data was not.
I have fix those.
Looking at the datasheet the charge pump was set at the minimum = 6.4V.
This would give the minimum contrast range
Power on the the flowochet you shon has it set to 8V.
Since you want a good contrast rage I has set it to 9V
Abhijit wrote:
Wed Jun 18, 2025 9:32 am
By the way the fonts "Character Spacing" and "Space Width" do not show the drop down menu in this component too.
The way the fonts are now used has automated the process.
There should not be a drop down for them.
If there is then again the display has not been updated.
Can you try again with the attached.
You will know if its the updated version as font count will be increased to 8.

First try toggling between contrast values of 1 an 255

If it does not work can you send the commands 0x81 then the contrast value.
Attachments
gLCD_SH1106_SPI.fcpx
(17.05 KiB) Downloaded 5 times
Martin

medelec35
Matrix Staff
Posts: 1988
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 660 times

Re: OLED SH1106_SPI Contrast

Post by medelec35 »

I have found SPI display, and checking it myself as I have got a logic analyser I can check if the data is set correctly.
Martin

Abhijit
Posts: 26
Joined: Thu Dec 03, 2020 6:26 am
Has thanked: 3 times

Re: OLED SH1106_SPI Contrast

Post by Abhijit »

Hi! Martin

The latest file works, no doubt there is some action happening in the display but it is not visible like some other displays where one could make out the difference, i checked two values 1 and 251, at 1 the display do not get completely dim but no doubt the intensity of the LED's get less, and at 251 pretty bright.

To get sure i checked the current consumption of the entire ckt at 1 and 251 values, and for my surprise there is a difference of 5.5mA so i think your contras property is working well.

I hope you too will get correct readings from analyzer.

Thank you again for your time.

Abhi

medelec35
Matrix Staff
Posts: 1988
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 660 times

Re: OLED SH1106_SPI Contrast

Post by medelec35 »

I have found the same results as you.
There is dimming, but its not as much as I assumed it could be.
I have changed the simulation to roughly match what the hardware does and you can use any value 0 to 255.
I have also attached a simple demo I used.

If you are happy with the updated component, I will get it added to the component database
Attachments
SH1106 Test2.fcfx
(14.07 KiB) Downloaded 8 times
gLCD_SH1106_SPI.fcpx
(17.23 KiB) Downloaded 7 times
Martin

Abhijit
Posts: 26
Joined: Thu Dec 03, 2020 6:26 am
Has thanked: 3 times

Re: OLED SH1106_SPI Contrast

Post by Abhijit »

Hi! Martin
good afternoon

Many many thanks for all the efforts, I am obliged. The component is working perfect now, thank you for the concern too.

Abhi

medelec35
Matrix Staff
Posts: 1988
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 660 times

Re: OLED SH1106_SPI Contrast

Post by medelec35 »

Hi Abhi.
You're welcome,
I will request for it to be pushed to updates.
Thanks for your help in testing, it is appreciated.
Martin

Post Reply