Hello,
Will the SSD1306 respond correctly to multiple commands between start and stop?
I do not mean using the 'repeated start' method, since this does not achieve anything useful on the SSD1306. I am trying to eliminate prepending every command with the address, to speed up the comms. I've tried several variations, but my failures do not mean it is not possible.
Aleksander
SSD1306 I2C multiple commands between start and stop
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 5
- Joined: Sat Nov 09, 2013 5:14 am
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: SSD1306 I2C multiple commands between start and stop
The way I read the datasheet, you should be able to send multiple data and/or control bytes between the start and stop.
See section 8.1.5.2 item 5)
See section 8.1.5.2 item 5)
-
- Posts: 5
- Joined: Sat Nov 09, 2013 5:14 am
Re: SSD1306 I2C multiple commands between start and stop
Agreed, this, plus not being able to get it to work, is the inspiration for the question. Can anyone confirm it works?
-
- Posts: 5
- Joined: Sat Nov 09, 2013 5:14 am
Re: SSD1306 I2C multiple commands between start and [SOLVED]
Getting rid of the address byte on every transaction will DOUBLE the communication speed, in case anyone's not clear of the advantage of this. On a 1MHz micro, this is an important advantage, even a requirement.
Further testing shows that the control bytes must be sent individually (AFAIKT), and the CGRAM data bytes can be grouped into one transaction. The Adafruit library already does this to some extent, using 16 bytes per transaction (I don't know why Adafruit chunks it like this; in my tests, I send the whole screen in one transaction and this works).
The SSD1306 confuses the issue with poor language in the documentation, and by sending ACK to all bytes in a transaction of multiple config commands, even though it isn't going to do what you expect with them. Or I've bungled it somehow.
So this is a partial solution, but good enough, since the bulk of the bytes is in the CG data, and you only have to configure once at power-up.
Further testing shows that the control bytes must be sent individually (AFAIKT), and the CGRAM data bytes can be grouped into one transaction. The Adafruit library already does this to some extent, using 16 bytes per transaction (I don't know why Adafruit chunks it like this; in my tests, I send the whole screen in one transaction and this works).
The SSD1306 confuses the issue with poor language in the documentation, and by sending ACK to all bytes in a transaction of multiple config commands, even though it isn't going to do what you expect with them. Or I've bungled it somehow.
So this is a partial solution, but good enough, since the bulk of the bytes is in the CG data, and you only have to configure once at power-up.
Please be positive and constructive with your questions and comments.