Adafruit I2C OLED display

rq3

Senior Member
Even though it has no data buffer, the tiny size of this display intrigued me. However, when you receive it, it requires initialization, and the data sheet is less than forthcoming.

http://adafruit.com/products/931

After struggling for a while, I finally managed to make it light up (note that it requires an i2cword):

Code:
#PICAXE 20M2
setfreq M32

disp_i2c:
hi2csetup i2cmaster,%01111000,i2cfast_32,i2cword

test:
hi2cout (0xAE)            ;turn off display
hi2cout 0xD5,(0x80)    ;oscillator frquency
hi2cout 0xA8,(0x1F)    ;mux ratio
hi2cout 0xD3,(0x00)    ;display offset
hi2cout (0x40)            ;start line
hi2cout 0x8D,(0x14)    ;enable charge pump
hi2cout (0xA1)            ;segment remap
hi2cout (0xC8)            ;COM output scan
hi2cout 0xDA,(0x02)    ;COM pins hardware config
hi2cout 0x81,(0x8F)    ;contrast
hi2cout 0xD9,(0xF1)    ;pre-charge period
hi2cout 0xDB,(0x40)    ;Vcom deselect
hi2cout (0xA5)            ;turn all on / ignore RAM
hi2cout (0xA6)            ;normal display

hi2cout (0xAF)            ;turn on display


Hope this helps someone thinking of using these displays.
 
Back
Top