SSD1306 I2C multiple commands between start and stop

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
aleksolder
 
Posts: 5
Joined: Sat Nov 09, 2013 5:14 am

SSD1306 I2C multiple commands between start and stop

Post by aleksolder »

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

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: SSD1306 I2C multiple commands between start and stop

Post by adafruit_support_rick »

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)

aleksolder
 
Posts: 5
Joined: Sat Nov 09, 2013 5:14 am

Re: SSD1306 I2C multiple commands between start and stop

Post by aleksolder »

Agreed, this, plus not being able to get it to work, is the inspiration for the question. Can anyone confirm it works?

aleksolder
 
Posts: 5
Joined: Sat Nov 09, 2013 5:14 am

Re: SSD1306 I2C multiple commands between start and [SOLVED]

Post by aleksolder »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”