0

FeatherWing Adafruit 128x64 OLED, Send Commands on I2C
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

FeatherWing Adafruit 128x64 OLED, Send Commands on I2C

by SGN on Wed Aug 04, 2021 7:28 pm

Hi,
How can I send Commands on I2C for the SH1107 128x64 OLED FeatherWing.
In in the SPI mode, we use the C/D input pin to choose between command or data. The I2C does not use the C/D pin.
thanks

SGN
 
Posts: 6
Joined: Sun Oct 18, 2020 10:07 pm

Re: FeatherWing Adafruit 128x64 OLED, Send Commands on I2C

by dastels on Wed Aug 04, 2021 9:41 pm

I2C devices have an address builtin, sometimes adjustable. I2C commands include the address of the device the command is intended for, in addition to register numbers and/or data. There's no command/data dichotomy.

This is one reason SPI is faster, but I2C lets you connect all your devices with just two lines (assuming they all have unique addresses).

You can look at the associated libraries to see how this is done, or just use the associated libraries if they do what you need.

Dave

dastels
 
Posts: 7278
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.