Uncategorized

ssd1306 convert spi to i2c notes

#4
Nov 01, 2018, 02:21 pm Last Edit: Nov 01, 2018, 02:23 pm by Yakandu Reason: Quoting
#4
Nov 01, 2018, 02:21 pm Last Edit: Nov 01, 2018, 02:23 pm by Yakandu Reason: Quoting

This is an old topic, but it’s the first thing that popped up when I googled the same problem, so here’s the fix I ultimately found. I ordered a bunch of SPI-wired 0.96″ OLEDs and then decided I need to use I2C instead the next day. After beeping out the resistors on the back, I figured out you can convert them pretty easily:

1) Move the R3 resistor to the R1 position (leaving the R3 spot open).

2) Bridge the R8 resistor spot (which should be open for the SPI wiring).

On the front then, the wiring to my project was exactly as labeled on the board.
GND >> GND
VCC >> VCC
SCL >> SCL
SDA >> SDA
RES >> Digital reset pin
DC >> VCC or GND

Connect the “DC” input (which is SA0 on the SSD1306) to either VCC or GND to set the I2C address to what you want.

DC/SA0 >> VCC = I2C address 0x3C

DC/SA0 >> GND = I2C address 0x3D

If you’re playing with the Adafruit SSD1306 library like I am, the default address in the code is 0x3C, so connect DC/SA0 to VCC.

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.