View previous topic :: View next topic |
Author |
Message |
hobby
Joined: 12 Apr 2004 Posts: 109 Location: Brussels
|
Posted: Mon Jul 13, 2015 7:05 pm Post subject: OLED with SH1106 in i2c |
|
|
Hi,
I try to modify the new lib glcdSSD1306-I2C.lib for working with the driver SH1106.
'Normaly' is very similar.
I have change only the init_lcd_data:
.db &H78, &HAE ; -,- DISPLAYOFF
.db &HD5, &H80 ; -,- SETDISPLAYCLOCKDIV , ratio 0x80
.db &HA8, &H3F ; *,- SETMULTIPLEX , 1f 128x32
.db &HD3, &H00 ; -,- SETDISPLAYOFFSET , 00
.db &H40, &H32 ; -,* SETSTARTLINE , CHARGEPUMP
.db &H14, &HA1 ; -,- vccstate 14, SEGREMAP
.db &HC8, &HDA ; -,- COMSCANDEC , SETCOMPINS
.db &H12, &H81 ; -,- 02 128x32 12 , SETCONTRAST
.db &HFF, &HD9 ; -,- constrast value 255, SETPRECHARGE,
.db &HF1, &HDB ; -,* vccstate f1 , SETVCOMDETECT
.db &H40, &HA4 ; -,- &H40 , DISPLAYALLON_RESUME
.db &HA6, &HAF ; -,- NORMALDISPLAY, Display ON
The change is mark by *
SETMULTIPLEX
CHARGEPUMP
SETVCOMDETECT
and delete MEMORYMODE and A0 upside down , not exist in sh1106.
i have change the value ldi r21,24 ; 26 bytes to 24 bytes.
But not works.
Any idea for what ?
Best regards
Olivier
(BASCOM-AVR version : 2.0.7.9 , Latest : 2.0.7.8 ) |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Jul 13, 2015 9:38 pm Post subject: |
|
|
you might want to try this :
_lcd_init_data:
.db &H78, &HAE ; DISPLAYOFF
.db &H20, &H10 ; MEMORY MODE, SETHIGHCOL
.db &HB0, &HC8 ; high col values
.db &H00, &H10 ; low col values
.db &H40, &H81 ; set contrast
.db &H7F, &HA1 ; contrast value, segmentremap
.db &HA6, &HA8 ; normal display, setmultiplex
.db &H3F, &HA4 ; mul value, displayallon resume
.db &HD3, &H00 ; SETDISPLAYOFFSET , 00
.db &HD5, &HF0 ; SETDISPLAYCLOCKDIV , ratio 0x80
.db &HD9, &H22 ; precharge, value
.db &HDA, &H12 ; setcompins
.db &HDB, &H20 ; setvcomdetect
.db &H8D, &H14 ; chargepump
.db &HA6, &HAF ; NORMALDISPLAY
and change to 30 _________________ Mark |
|
Back to top |
|
|
hobby
Joined: 12 Apr 2004 Posts: 109 Location: Brussels
|
Posted: Tue Jul 14, 2015 8:27 am Post subject: |
|
|
Thanks Mark,
I have tested the screen remains black.
Olivier |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Jul 14, 2015 3:52 pm Post subject: |
|
|
just check the i2c address of the lcd. maybe it is different?
use the i2cscanner sample app to test it _________________ Mark |
|
Back to top |
|
|
hobby
Joined: 12 Apr 2004 Posts: 109 Location: Brussels
|
Posted: Tue Jul 14, 2015 4:13 pm Post subject: |
|
|
It's the same 78h.
Thanks
Olivier |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Jul 15, 2015 12:33 pm Post subject: |
|
|
i do not have this controller. i advise to ask the manufacturer. it is a nice chip since this I2C supports the READ as well which would allow to use all graphic commands. _________________ Mark |
|
Back to top |
|
|
mpromark
Joined: 29 Jul 2004 Posts: 13 Location: Wroclaw , Poland
|
Posted: Wed Nov 30, 2016 3:04 am Post subject: |
|
|
Hi,
I have the same problem with SH1106 and I2C interface.
I have tried many settings and no succes...
The screen remains black
Best regards
Mark |
|
Back to top |
|
|
Hkipnik
Joined: 03 May 2010 Posts: 20
|
Posted: Sun Dec 04, 2016 4:13 pm Post subject: |
|
|
Hello
SSD1306 lib has changed something
The SH1106 chip is little different.
Hkipnik |
|
Back to top |
|
|
mpromark
Joined: 29 Jul 2004 Posts: 13 Location: Wroclaw , Poland
|
Posted: Mon Dec 05, 2016 2:19 am Post subject: |
|
|
thanks a lot...
I will check it of course .!
My OLED displays (smaller and bigger) with SSD1306 work
in Bascom perfect.!
..but the new one 1.3" OLED with SH1106 does not want to work.
mark |
|
Back to top |
|
|
mpromark
Joined: 29 Jul 2004 Posts: 13 Location: Wroclaw , Poland
|
Posted: Mon Dec 05, 2016 4:37 am Post subject: |
|
|
I see that it starts to work..!!
Thanks once again.!
mark |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|