Just out of curiosity I would like to write my own oled display SSD1306 I2C driver using arduino nano board and atmel studio 7.
I analyzed the Adafruit I2C initialization which sends byte 0x00 after sending slave address 0x78.
I read the SSD1306 datasheet but something still is not clear to me. It's about bit7 and bit6 of each received byte.
The datasheet states:
If the Co bit (bit7) is set as logic “0”, the transmission of the following information will contain data bytes only.
The D/C# bit (bit6) determines the next data byte is acted as a command or a data. If the D/C# bit is set to logic “0”, it defines the following data byte as a command. If the D/C# bit is set to logic “1”, it defines the following data byte as a data which will be stored at the GDDRAM. The GDDRAM column address pointer will be increased by one automatically after each data write."
My question is: what happens if both bits are set to zero? It seems like a contradiction.
- bit7 is zero : so next databytes should be non display memory related databytes
- bit6 is zero : so next databyte will be a command
It seems from the Adafruit initialization that the next byte will be a command...
I Hope someone can help me out.