SH1106 I2C Display usage help.
Kraken767
Posts: 5
I bought a 1.3" display off amazon and am having trouble getting anything to show on it. I have the QuickStart and the IC driver for the display is the SH1106, but i cant figure out how to send the right commands to get something to show. I've tried sending the device address as write using the simplei2c lib, then a control byte set as last control byte and write to ram, then several bytes filled with a mix of 0xFF and 0x00's. I'm really at a loss even after a couple nights going over and over and over the datasheet. Id really appreciate it if someone could show me how to pick a pixel and make it work. My last test code is below. I did try setting the page address and columns, but honestly i have no idea what the x and y coordinates of say page 3 column 4 line 5 are or how they relate, so i probably did it wrong. The page concept is whats really throwing me off.
i2c bus; i2c_open(&bus, 9, 8, 0); i2c_start(&bus); i2c_writeByte(&bus, 0x78);//device address, write i2c_writeByte(&bus, 0x40);//control byte, last control byte, ram i2c_writeByte(&bus, 0xFF);//data.... i2c_writeByte(&bus, 0x00); i2c_writeByte(&bus, 0xFF); i2c_writeByte(&bus, 0x00); i2c_writeByte(&bus, 0xFF); i2c_stop(&bus); pause(10000);
Comments
it'd be great if anyone could help me find out what im doing wrong.
my latest test code: