Posted: 11:01pm 22 Feb 2016
Copy link to clipboard
Print this post
Quote I wondering if the I2C code could be adapted for this OLED
Looking at your picture it appears that every second line is missing so there must be something strange in the way this device is addressing.
It is a very cute display
I'm going to do some work on updating the i2c driver for the normal display then it may be possible to define a double height font to solve the issue
UPDATE
Just found on the web: try replacing lines 168-195 (block of initialisation commands) with the following
OLED.SCmd(&HAE) 'display off
OLED.SCmd(&H20) 'Set Memory Addressing Mode
OLED.SCmd(&H10) '00,Horizontal Addressing Mode01,Vertical Addressing Mode10,Page Addressing Mode (RESET)11,Invalid
OLED.SCmd(&Hb0) 'Set Page Start Address for Page Addressing Mode,0-7
OLED.SCmd(&Hc8) 'Set COM Output Scan Direction
OLED.SCmd(&H00) '---set low column address
OLED.SCmd(&H10) '---set high column address
OLED.SCmd(&H40) '--set start line address
OLED.SCmd(&H81) '--set contrast control register
OLED.SCmd(&Haf) '--contrast value
OLED.SCmd(&Ha1) '--set segment re-map 0 to 95
OLED.SCmd(&Ha6) '--set normal display
OLED.SCmd(&Ha8) '--set multiplex ratio(1 to 16)
OLED.SCmd(&H0f) '
OLED.SCmd(&Ha4) '&Ha4,Output follows RAM content&Ha5,Output ignores RAM content
OLED.SCmd(&Hd3) '-set display offset
OLED.SCmd(&H00) '-not offset
OLED.SCmd(&Hd5) '--set display clock divide ratio/oscillator frequency
OLED.SCmd(&Hf0) '--set divide ratio
OLED.SCmd(&Hd9) '--set pre-charge period
OLED.SCmd(&H22) '
OLED.SCmd(&Hda) '--set com pins hardware configuration
OLED.SCmd(&H02)
OLED.SCmd(&Hdb) '--set vcomh
OLED.SCmd(&H49) '&H20,0.83xVcc
OLED.SCmd(&H8d) '--set DC-DC enable
OLED.SCmd(&H14) '
OLED.SCmd(&Haf) '--turn on oled panel
Edited by matherp 2016-02-24