You can easily wire this breakout to any microcontroller - below, an Adafruit Metro is used. For another kind of microcontroller, as long as you have 4 available pins, it is possible to 'bit-bang SPI' or you can use two I2C pins, but usually those pins are fixed in hardware. Just check out the library, then port the code.

I2C Wiring

Use this wiring if you want to connect via I2C interface

  • Connect Vin (red wire on STEMMA QT version) to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V
  • Connect GND (black wire on STEMMA QT version) to common power/data ground
  • Connect the Clk (yellow wire on STEMMA QT version) pin to the I2C clock SCL pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A5, on a Mega it is also known as digital 21 and on a Leonardo/Micro, digital 3
  • Connect the Data (blue wire on STEMMA QT version) pin to the I2C data SDA pin on your Arduino. On an UNO & '328 based Arduino, this is also known as A4, on a Mega it is also known as digital 20 and on a Leonardo/Micro, digital 2

SPI Wiring

 

If you want to use the board in SPI. mode, you need to cut J1 and J2 first. See Pinouts for more details.

Since this is a SPI-capable display, we can use hardware or 'software' SPI. To make wiring identical on all Arduinos, we'll begin with 'software' SPI. The following pins should be used:

 

  • Connect Vin to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V
  • Connect GND to common power/data ground
  • Connect the Clk pin to the SPI clock SCK pin on your Arduino. On an UNO & '328 based Arduino, this is also known as 13. On boards such as the Metro M0/M4, you'll want to use the ICSP Header Pin 3
  • Connect the Data pin to the SPI data MOSI pin on your Arduino. On an UNO & '328 based Arduino, this is also known as 11. On boards such as the Metro M0/M4, you'll want to use the ICSP Header Pin 4.
  • Connect the DC pin to D8 on the Arduino and similar shaped boards. If you don't have this pin on your Microcontroller, feel free to use a different one and update the example.
  • Connect the CS pin to D10 on the Arduino and similar shaped boards. If you don't have this pin on your Microcontroller, feel free to use a different one and update the example.

Download Libraries

To begin reading sensor data, you will need to download Adafruit_SSD1327 and Adafruit_GFX from the Arduino library manager.

From the IDE open up the library manager...

nd type in adafruit EPD to locate the library. Click Install

If you would like to draw bitmaps, do the same with adafruit SSD1327, click Install

Do the same to install the latest adafruit GFX library, click Install

If using an earlier version of the Arduino IDE (pre-1.8.10), locate and install Adafruit_BusIO (newer versions handle this prerequisite automatically).

Run the Demo

Open up FileExamplesAdafruit_SSD1327→ssd1327_test

Make any necessary changes to the pins. If you are running in SPI mode, comment out the I2C Initializer and then either uncomment the hardware SPI or software SPI initializer depending on how you have it wired up and whether you want to use the hardware SPI pins or not.

Upload the sketch to your microcontroller and you should see a series of tests run concluding with some Adafruit flakes falling at the end.

This guide was first published on Nov 10, 2020. It was last updated on Nov 10, 2020.

This page (Arduino Wiring and Test) was last updated on Nov 02, 2020.

Text editor powered by tinymce.