3

I can't remember for the life of me how exactly I set up this screen in previous models, partially because the references I'm using in my code have different names from the pins on the Adafruit display.

My code identifies the following digital pins for the following display pins:

OLED_MOSI = 12
OLED_CLK = 11
OLED_DC = 10
OLED_CS = 8
OLED_RESET = 9

My Arduino is then attached from the following pins to those labelled on the OLED display as:

12 -> SDA
11 -> SCK
10 -> DC
8 -> CS
9 -> RES
5V -> VDD
GND -> GND

In other words, I am interpreting the following as being equivalent:

RES = RESET
SCK = SCK
MOSI = SDA

Is there anything within the information I've provided that is wrong or may cause the screen to malfunction?

ocrdu
  • 1,795
  • 3
  • 12
  • 24

1 Answers1

0
  • DC selects between Data and Commands.
  • CS is the Chip Select
  • SDA is the Serial DAta.
  • SCL is the Serial CLock.

These four together form what the documentation calls the "4-wire serial interface". It's not quite like SPI, owing to the presence of the DC pin (which is why it doesn't use SPI terminology), but close enough that SPI can be used to communicate with it.

In SPI the pin that sends data from the Arduino to the slave is known as the MOSI - Master Out Slave In. Some microcontrollers also call this SDO - Serial Data Out, where it's "out from the master's perspective".

Majenko
  • 105,851
  • 5
  • 82
  • 139