Hello everyone,
I'm having problems getting a OLED to work. It's an adafruit OLD that uses I2C for comms, and is controlled by a SSD1306 driver.(http://www.adafruit.com/products/931) All of my pins are correct, but I'm having problems deciphering all of the H2icsetup parameters, including the address. I2cout is also confusing me. I can't wrap my head around what my binary strings should look like to get it to listen.
Here is the datasheet:http://www.adafruit.com/datasheets/SSD1306.pdf
On page 20 the i2c protocol is described. I'm trying to use the "Entire display on", and "Set display on " commands, from pg.28, to get the display to just do something but have gotten zero out of it. I'm also curious if the "ACK" signals need to be handled as well.
My code follows. It's trashed due to me trying everything imaginable.
Thanks for anyone who looks into this. I already know that I'm getting myself into a mess with the huge amount of addresses the screen has, but I think getting the fundamental comms down will clear %90 of my problems.
I'm having problems getting a OLED to work. It's an adafruit OLD that uses I2C for comms, and is controlled by a SSD1306 driver.(http://www.adafruit.com/products/931) All of my pins are correct, but I'm having problems deciphering all of the H2icsetup parameters, including the address. I2cout is also confusing me. I can't wrap my head around what my binary strings should look like to get it to listen.
Here is the datasheet:http://www.adafruit.com/datasheets/SSD1306.pdf
On page 20 the i2c protocol is described. I'm trying to use the "Entire display on", and "Set display on " commands, from pg.28, to get the display to just do something but have gotten zero out of it. I'm also curious if the "ACK" signals need to be handled as well.
My code follows. It's trashed due to me trying everything imaginable.
Code:
'*********************************************
'OLED Example test.
Symbol Rst = B.3
Symbol DisplayAddress = %011110010
Init:
Low Rst
pause 1000
high Rst
hi2csetup i2cmaster, DisplayAddress,i2cfast,i2cbyte
do
hi2cout $0,($af,%1)
'hi2cout $0,(%1010111110101111)
loop
Last edited: