OLED burn-in
Posted: Sun Dec 19, 2021 2:32 pm
I use the small I2C OLED displays for a few projects and one of them has been powered on for probably a couple of years.
I noticed that some pixels were dimmer than others so I removed the OLED and connected it on the bench with a test program displaying ONLY a white rectangle.
The result shows the effect of long use.
The dark bars (and poor focus) are due to the camera.
I should have used a "press to display" pushbutton.
The SSD1306 has a register which allows a small amount of brightness control so I will add a few extra lines to the program to set the level to zero. This does not dim the screen very much. The attached program demonstrates the default level (&H7F) and the max and min (255 and 0).
CODE: xxxx.bas
--------------------------------------------------------------------------------
'Brightness variation demo for SSD1306 OLED display
'at I2C address $3C
'------------------------------------------------------
' this section could be in the setbright sub routine
Dim MyArray(2)
MyArray(0) = &h81 ' SSD1306 brightness register
MyArray(1) = &H7f 'default brightness
i2c_addr = &h3c : register = &h00: length = 2
'-----------------------------------------------------
OLED.INIT 0 ,1 ' init the OLED upside-down
OLED.CLS ' clear the screen
OLED.FONT 2
OLED.COLOR 1
OLED.PRINT 10,10, "HELLO WORLD"
pause 2000
do
demobright 255 'maximum level
demobright &H7f 'default level
demobright 0 'minimum level
loop
end
sub demobright(bright)
OLED.COLOR 1
setbright bright
oled.rect 0,0,127,63,1 'fill screen with white
OLED.COLOR 0
OLED.PRINT 10,10,str$(bright)
pause 2000
end sub
sub setbright(bright) 'this puts the specified byute into the correct SSD1306 register
MyArray(1) = bright
I2C.WriteRegArray i2c_addr , register, length , MyArray()
end sub
I noticed that some pixels were dimmer than others so I removed the OLED and connected it on the bench with a test program displaying ONLY a white rectangle.
The result shows the effect of long use.
The dark bars (and poor focus) are due to the camera.
I should have used a "press to display" pushbutton.
The SSD1306 has a register which allows a small amount of brightness control so I will add a few extra lines to the program to set the level to zero. This does not dim the screen very much. The attached program demonstrates the default level (&H7F) and the max and min (255 and 0).
CODE: xxxx.bas
--------------------------------------------------------------------------------
'Brightness variation demo for SSD1306 OLED display
'at I2C address $3C
'------------------------------------------------------
' this section could be in the setbright sub routine
Dim MyArray(2)
MyArray(0) = &h81 ' SSD1306 brightness register
MyArray(1) = &H7f 'default brightness
i2c_addr = &h3c : register = &h00: length = 2
'-----------------------------------------------------
OLED.INIT 0 ,1 ' init the OLED upside-down
OLED.CLS ' clear the screen
OLED.FONT 2
OLED.COLOR 1
OLED.PRINT 10,10, "HELLO WORLD"
pause 2000
do
demobright 255 'maximum level
demobright &H7f 'default level
demobright 0 'minimum level
loop
end
sub demobright(bright)
OLED.COLOR 1
setbright bright
oled.rect 0,0,127,63,1 'fill screen with white
OLED.COLOR 0
OLED.PRINT 10,10,str$(bright)
pause 2000
end sub
sub setbright(bright) 'this puts the specified byute into the correct SSD1306 register
MyArray(1) = bright
I2C.WriteRegArray i2c_addr , register, length , MyArray()
end sub