1.5" & 2.1" Monochrome 128x64 OLED Display Module



Similar documents
2.3" Monochrome 128x32 OLED Display Module

2.2" TFT Display. Created by Ladyada. Last updated on :15:09 PM EDT

1.8" TFT Display Breakout and Shield

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Adafruit SHT31-D Temperature & Humidity Sensor Breakout

Adafruit BME280 Humidity + Barometric Pressure + Temperature Sensor Breakout

TSL2561 Luminosity Sensor

Adafruit Music Maker Shield

Adafruit LED Backpacks

Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF Breakouts

DS1307 Real Time Clock Breakout Board Kit

Adafruit Proto Shield for Arduino

Adafruit ATWINC1500 WiFi Breakout

Adafruit Si4713 FM Radio Transmitter with RDS/RDBS Support

2.8" TFT Touchscreen. Created by lady ada. Last updated on :00:25 PM EST

A REST API for Arduino & the CC3000 WiFi Chip

PolyBot Board. User's Guide V1.11 9/20/08

PN532 NFC RFID Module User Guide

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Character LCDs. Created by Ladyada. Last updated on :45:29 PM EDT

DATASHEET. ADAM Arduino Display Adaptor Module. Arduino Compatible Shield P/N: 4Display-Shield-FT843 For the 4D Systems 4DLCD-FT843 Display

3.2 inch QVGA TFT Color LCD User s Guide Version 1 & 2

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

Designing VM2 Application Boards

Matrix and 7-Segment LED Backpack with the Raspberry Pi

Arduino Lesson 0. Getting Started

3.2 inch Arduino LCD Shield User Guide

ARDUINO SEVERINO SERIAL SINGLE SIDED VERSION 3 S3v3 (REVISION 2) USER MANUAL

Arduino DUE + DAC MCP4922 (SPI)

DIY Pocket LED Gamer - Tiny Tetris!

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Tiny Arduino Music Visualizer

LCD I 2 C/Serial RX Backpack. Data Sheet. LCD to I2C/Serial RX Backpack I2C or Serial RX communication with Standard 16 Pin LCD modules

NB3H5150 I2C Programming Guide. I2C/SMBus Custom Configuration Application Note

CAN-Bus Shield Hookup Guide

Arduino Lesson 4. Eight LEDs and a Shift Register

Touch Screen for Pictiva OLED display. Application Note. Introduction

Introducing AVR Dragon

Embedded Systems Design Course Applying the mbed microcontroller

The $25 Son of a cheap timer This is not suitable for a beginner. You must have soldering skills in order to build this kit.

MCP4725 Digital to Analog Converter Hookup Guide

INTRODUCTION TO SERIAL ARM

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

Adding a Real Time Clock to Raspberry Pi

Board also Supports MicroBridge

CHAPTER 11: Flip Flops

All About Arduino Libraries

AR1100 Resistive Touch Screen Controller Guide

8 by 8 dot matrix LED displays with Cascadable Serial driver B32CDM8 B48CDM8 B64CDM8 General Description

Copyright 2012 by Fen Logic Ltd. All rights reserved.

System theremino MasterDIL-V3

Electronic Rotary Table Divider V2.1 Construction

Arduino Lesson 1. Blink

0832 Dot Matrix Green Display Information Board User s Guide

Using the Siemens S65 Display

WICE-SPI Hardware Operation Manual

TEECES DOME LIGHTING SYSTEMS

UniPi technical documentation REV 1.1

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

RGB LED Strips. Created by lady ada. Last updated on :00:18 PM EST

Creating a Project with PSoC Designer

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL

DOGS GRAPHIC SERIES 102x64 DOTS

ECEN 1400, Introduction to Analog and Digital Electronics

Work with Arduino Hardware

- 35mA Standby, mA Speaking pre-defined phrases with up to 1925 total characters.

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22.

AXE033 SERIAL/I2C LCD

SainSmart UNO R3 Starter Kit

Arduino Lesson 13. DC Motors. Created by Simon Monk

IR Communication a learn.sparkfun.com tutorial

SRF08 Ultra sonic range finder Technical Specification

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

MARTECH SPI Tools. MARTECH SPI Tools User Manual v1.0. User Manual

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Arduino Lesson 14. Servo Motors

FLYPORT Wi-Fi G

AXE114S BINARY CLOCK. revolution Revolution Education Ltd. Web: Version /09/08 AXE114.PMD.

Your Multimeter. The Arduino Uno 10/1/2012. Using Your Arduino, Breadboard and Multimeter. EAS 199A Fall Work in teams of two!

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

DS1307ZN. 64 x 8 Serial Real-Time Clock

Annex: VISIR Remote Laboratory

The self-starting solar-powered Stirling engine

Raspberry-Pi VGA Fen Logic Ltd. 8 September 2014 G.J. van Loo

Hardware Connections between Arduino and IMU Nori Wilkins Apr. 5, 2013

7 OUT1 8 OUT2 9 OUT3 10 OUT4 11 OUT5 12 OUT6 13 OUT7 14 OUT8 15 OUT9 16 OUT10 17 OUT11 18 OUT12 19 OUT13 20 OUT14 21 OUT15 22 OUT16 OUT17 23 OUT18

Part 1. MAX BIT DAC with an Arduino Board. MIDI to Voltage Converter Part1

AC-PG-USBASP USBASP AVR Programmer

Lab 3: PCB design with EAGLE

128x64 DOTS. EA DOGL128x-6 EA LED68X51-RGB

An Introduction to MPLAB Integrated Development Environment

BUILDING INSTRUCTIONS

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax:

BV4512. I2C-LCD- 128 x 64 Graphic Controller. Product specification. November 2008 V0.a. ByVac Page 1 of 14

GTS-4E Hardware User Manual. Version: V1.1.0 Date:

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Setting up IO Python Library on BeagleBone Black

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

Pololu DRV8835 Dual Motor Driver Shield for Arduino

Transcription:

1.5" & 2.1" Monochrome 128x64 OLED Display Module Created by lady ada Last updated on 2016-02-16 11:27:52 AM EST

Guide Contents Guide Contents Overview Pinouts Power Pins Signal Pins Remaining Pins Assembly Changing "modes" SPI Mode I2C mode 8-Bit "6800" mode Wiring & Test SPI Wiring Level Shifter Wiring 3.3V Capacitor Download Adafruit_SSD1305 library Installing Adafruit_GFX Adjust display size Running the Demo Changing Pins Using Hardware SPI I2C Wiring 3.3V Capacitor I2C code changes Using Adafruit GFX F.A.Q. Downloads Datasheets 2 3 7 7 7 8 9 9 9 10 10 12 12 14 14 14 14 15 15 16 17 17 19 19 20 22 23 23 Page 2 of 23

Overview If you've been diggin' our monochome OLEDs (http://adafru.it/eau) but need something bigger, this display will delight you! These displays are 1.5" and 2.4" diagonal, and very readable due to the high contrast of an OLED display. This display is made of 128x64 individual white OLED pixels, each one turned on or off by the controller chip. Because the display makes its own light, no backlight is required. This reduces the power required to run the OLED and is why the display has such high contrast; we really like this graphic display for its crispness! Page 3 of 23

The driver chip, SSD1305 can communicate in three ways: 8-bit, I2C or SPI. Personally we think SPI is the way to go, only 4 or 5 wires are required and its very fast. The OLED itself requires a 3.3V power supply and 3.3V logic levels for communication. We include a breadboard-friendly level shifter that can convert 3V or 5V down to 3V, so it can be used with 5V-logic devices like Arduino. Page 4 of 23

The power requirements depend a little on how much of the display is lit but on average the display uses about 50mA from the 3.3V supply. Built into the OLED driver is a simple switch-cap charge pump that turns 3.3V into a high voltage drive for the OLEDs. Each order comes with one assembled OLED module with a nice bezel and 4 mounting holes. The display is 3V logic & power so we include a HC4050 level shifter. We also toss in a 220uF capacitor, as we noticed an Arduino may need a little more capacitance on the 3.3V power supply for this big display! This display does not come with header attached but we do toss in a stick of header you can solder on. Also, the display may come in 8-bit mode. You can change modes from 8-bit to SPI or I2C with a little soldering, check out the Assembly page for how to do so. Page 5 of 23

Getting started is easy! We have a detailed tutorial and example code in the form of an Arduino library for text and graphics. You'll need a microcontroller with more than 512 bytes of RAM since the display must be buffered. The library can print text, bitmaps, pixels, rectangles, circles and lines. It uses 512 bytes of RAM since it needs to buffer the entire display but its very fast! The code is simple to adapt to any other microcontroller. Page 6 of 23

Pinouts The pins on these modules are not well marked, but the one on left is #1 and the pins increment in order until the one on the very right, #20 Power Pins Pin #1 is power and signal Ground Pin #2 is 3V Power In - provide 3V with 50-75mA current capability Pin #3 is not used, do not connect to anything Signal Pins Pin #4 is DC - the data/command pin. This is a 3V logic level input pin and is used for both SPI and 8-bit connections Pin #5 is WR - the 8-bit write pin. This is a 3V logic level input pin and is used for 8-bit connections. Do not connect if using SPI/I2C Pin #6 is RD - the 8-bit read pin. This is a 3V logic level input pin and is used for 8-bit Page 7 of 23

connections. Do not connect if using SPI/I2C Pin #7 is Data0 - this pin is the SPI Clock pin, I2C Clock pin and the 8-bit data bit 0 pin. This is a 3V logic level input pin when used with I2C/SPI, and an input/output when used in 8-bit. Pin #8 is Data1 - this pin is the SPI Data In pin, I2C Data pin and the 8-bit data bit 1 pin. This is a 3V logic level input pin when used with I2C/SPI, and an input/output when used in 8-bit. Pins #9-14 are Data2-7 - Used for 8-bit mode. These is a 3V input/output when used in 8-bit. Do not connect if using SPI or I2C Pin #15 is CS - the chip select pin. This is a 3V logic level input pin and is used for both SPI and 8-bit connections Pin #16 is RESET - the reset pin. This is a 3V logic level input pin and is used for I2C, SPI and 8-bit connections Remaining Pins Pins #17-19 are not connected, do not use Pin #20 is the 'frame ground' pin and is connected to the metal case around the OLED, you can connect to ground or leave floating. Page 8 of 23

Assembly Changing "modes" These modules can be used in SPI or 8-Bit mode. Somewhat annoyingly, the only way to switch modes is to desolder/solder jumpers on the back of the modules. SPI Mode This is the mode you likely want to be in. Your module may have come with this setting by default. On the 1.5" OLED module: Make sure the R12 and R10 resistors are soldered in and the R11 and R9 spots are blank On the 2.4" OLED module: Make sure the R19 and R21 resistors are soldered in and the R18 and R20 spots are blank Page 9 of 23

I2C mode On the 1.5" OLED module: Make sure the R12 and R9 resistors are soldered in and the R11 and R10 spots are blank On the 2.4" OLED module: Make sure the R18 and R21 resistors are soldered in and the R19 and R20 spots are blank 8-Bit "6800" mode This mode uses 8 pins + 4 or 5 control pins. We dont have support code for it but you could modify the library if you like to add it. Check the datasheet for more details! On the 1.5" OLED module: Make sure the R11 and R10 resistors are soldered in and the R12 and R9 spots are blank Page 10 of 23

On the 2.4" OLED module: Make sure the R19 and R20 resistors are soldered in and the R18 and R21 spots are blank Page 11 of 23

Wiring & Test We will demonstrate using this display with an Arduino UNO compatible. If you are using a 3V logic device you can skip the level shifter and connect direct from the microcontroller to display. You can also use another kind of level shifter if you like. Any microcontroller with I2C + 1 pin or 4 or 5 pins can be used, but we recommend testing it out with an UNO before you try a different processor. SPI Wiring Page 12 of 23

Don't forget you have to set the display to SPI mode, see the Assembly step on how to do that! 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 Pin #1 to common power/data ground line (black wires) Connect Pin #2 to the 3V power supply on your Arduino. (red wires) Skip pin #3 Connect Pin #4 (DC) to digital #8 via the level shifter (white wires) any pin can be used later Page 13 of 23

Connect Pin #7 (SCLK) to digital #13 via the level shifter (blue wires) any pin can be used later Connect Pin #8 (DIN) to digital #11 via the level shifter (green wires) any pin can be used later Skip pins #9-14 Connect Pin #15 (CS) to digital #10 via the level shifter (yellow wires) any pin can be used later Connect Pin #16 (RST) to digital #9 via the level shifter (orange wires) any pin can be used later Later on, once we get it working, we can adjust the library to use hardware SPI if you desire, or change the pins to any others. Level Shifter Wiring You will also want to power the HC4050 level shifter by connecting pin #1 to 3V (the red wire) and pin #8 to ground (the black wire) 3.3V Capacitor We also include a 220uF capacitor with your order because we noticed that the 3V line can fluctuate a lot when powered via an Arduino's 3.3V regulator. We really recommend installing it. Clip the leads on this capacitor and connect the negatve pin to GND and the positive pin to 3V Download Adafruit_SSD1305 library To begin reading sensor data, you will need to download Adafruit_SSD1305 (http://adafru.it/fld) from our github repository. You can do that by visiting the github repo and manually downloading or, easier, just click this button to download the zip Download Adafruit_SSD1305 Library from Github http://adafru.it/fle Rename the uncompressed folder Adafruit_SSD1305 and check that the Adafruit_SSD1305 folder contains Adafruit_SSD1305.cpp and Adafruit_SSD1305.h Place the Adafruit_SSD1305 library folder your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE. We also have a great tutorial on Arduino library installation at: http://learn.adafruit.com/adafruit-allabout-arduino-libraries-install-use (http://adafru.it/aym) Installing Adafruit_GFX You'll also need to download the 'underlying' graphics support library that does all the lines, text, Page 14 of 23

rectangle drawing for you. You can grab it from https://github.com/adafruit/adafruit-gfx- Library (http://adafru.it/fks) Or click on the button below and follow the same instructions you did for the Adafruit_SSD1305 library. Uncompress and rename the folder to Adafruit_GFX (contains Adafruit_GFX.cpp and.h). Then place them inside your Arduino libraries folder and restart the Arduino IDE. If this is all unfamiliar, we have a tutorial introducing Arduino library concepts and installation (http://adafru.it/aym). http://adafru.it/cbb Restart the IDE! Adjust display size Download Adafruit GFX library Before you compile and run the demo, you'll need to make sure you have the library configured to the right size. Open up the Adafruit_SSD1305.h file in your ArduinoSketchFolder/libraries/Adafruit_SSD1305 folder and look for the lines that have: #define SSD1305_128_32 //#define SSD1305_128_64 If you are running a 128x32 display, leave the second line commented If you are running a 128x64 size display, comment the first line and uncomment the second one. Then save the file Running the Demo After restarting the Arduino software, you should see a new example folder called Adafruit_SSD1305 and inside, an example called ssd1305test Page 15 of 23

Now upload the sketch to your Arduino. That's pretty much it! You should see immediate update of the display. If nothing shows up at all, make sure you have your wiring correct, we have a diagram above you can use. Also, check that you converted the module to "SPI" mode (see the Assembly) step on how to do that Changing Pins Now that you have it working, there's a few things you can do to change around the pins. If you're using Hardware SPI, the CLOCK and MOSI pins are 'fixed' and cant be changed. But you can change to software SPI, which is a bit slower, and that lets you pick any pins you like. Find these lines: // If using software SPI, define CLK and MOSI #define OLED_CLK 13 #define OLED_MOSI 11 // These are neede for both hardware & softare SPI #define OLED_CS 10 #define OLED_RESET 9 #define OLED_DC 8 Page 16 of 23

Change those to whatever you like! Using Hardware SPI If you want a little more speed, you can 'upgrade' to Hardware SPI. Its a bit faster, maybe 2x faster to draw but requires you to use the hardware SPI pins. SPI CLK connects to SPI clock. On Arduino Uno/Duemilanove/328-based, thats Digital 13. On Mega's, its Digital 52 and on Leonardo/Due its ICSP-3 (See SPI Connections for more details (http://adafru.it/d5h)) SPI DATA IN connects to SPI MOSI. On Arduino Uno/Duemilanove/328-based, thats Digital 11. On Mega's, its Digital 51 and on Leonardo/Due its ICSP-4 (See SPI Connections for more details (http://adafru.it/d5h)) To enable hardware SPI, look for these lines: // this is software SPI, slower but any pins Adafruit_SSD1305 display(oled_mosi, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS); // this is for hardware SPI, fast! but fixed oubs //Adafruit_SSD1305 display(oled_dc, OLED_RESET, OLED_CS); Comment out the top line and uncomment the bottom line I2C Wiring It is also possible to use the display in I2C mode. Its a little slower but uses way fewer pins. Page 17 of 23

Don't forget you have to set the display to I2C mode, see the Assembly step on how to do that! For I2C you will need to use the hardware I2C pins on your Arduino or microcontroller. The following pins should be used: Connect Pin #1 to common power/data ground line (black wires) Connect Pin #2 to the 3V power supply on your Arduino. (red wires) Skip pin #3 Connect Pin #4 (DC & I2C Addr0) to ground (black wire) to set the I2C address to 0x2C. If this is tied to 3.3V, it will set the I2C address to 0x2D Connect Pin #7 (SCL) to Arduino SCL (green wire) Connect Pin #8 (SDA) to Arduino SDA (blue wire) Connect Pin #9 (SDA2) to Pin #8 (small blue wire) Skip pins #9-15 Connect Pin #16 (RST) to digital #9 by using a resistive divider as shown, two resistors from 1K to 10K both the same value can be used. Any pin can be used later While its ideal to use level shifters on the I2C pins, you can sorta get away with this on an arduino, Page 18 of 23

because the I2C pins are open collector and there are very weak pullups on those two lines. If using with other I2C devices, we suggest using a 3V-logic arduino or an I2C-safe shifter. (http://adafru.it/757) Later on, once we get it working, we can adjust the library to use hardware SPI if you desire, or change the pins to any others. 3.3V Capacitor We also include a 220uF capacitor with your order because we noticed that the 3V line can fluctuate a lot when powered via an Arduino's 3.3V regulator. We really recommend installing it. Clip the leads on this capacitor and connect the negatve pin to GND and the positive pin to 3V I2C code changes In the test code, change the top area where you define the protocol used by commenting out the software and hardware SPI and uncommenting the I2C version // software SPI //Adafruit_SSD1305 display(oled_mosi, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS); // hardware SPI //Adafruit_SSD1305 display(oled_dc, OLED_RESET, OLED_CS); // I2C Adafruit_SSD1305 display(oled_reset); Everything else about the display is identical to SPI mode. By default we use I2C address 0x3C which is what we get by connecting DC/A0 to ground. If you tie that pin to 3.3V instead, the address will be 0x3D and all you have to do is call display.begin(0x3d) to initialize with that address. Page 19 of 23

Using Adafruit GFX The Adafruit_GFX library for Arduino provides a common syntax and set of graphics functions for all of our TFT, LCD and OLED displays. This allows Arduino sketches to easily be adapted between display types with minimal fuss and any new features, performance improvements and bug fixes will immediately apply across our complete offering of displays. The GFX library is what lets you draw points, lines, rectangles, round-rects, triangles, text, etc. Check out our detailed tutorial here http://learn.adafruit.com/adafruit-gfx-graphicslibrary (http://adafru.it/apx) It covers the latest and greatest of the GFX library! Since this is a 'buffered' display, dont forget to call the "display()" object function whenever you want to update the OLED. The entire display is drawn in one data burst, so this way you can put down a bunch of graphics and display it all at once. Page 20 of 23

2720.mp4 http://adafru.it/jc1 Page 21 of 23

F.A.Q. How come sometimes I see banding or dim areas on the OLED? These OLEDs are passively drawn, which means that each line is lit at once. These displays are fairly inexpensive and simple, but as a tradeoff the built in boost converter has to drive all the OLED pixels at once. If you have a line with almost all the pixels lit it wont be as bright as a line with only 50% or less lit up. The display works, because I can see the splash screen, but when I draw to the display nothing appears! Don't forget you must call.display() to actually write the display data to the display. Unlike many of our TFTs, the entire display must be written at once so you should print all your text and draw all your squares, then call display() How do I get rid of the splash screen? Open up Adafruit_SSD1305.cpp in the libraries/adafruit_ssd1305 folder and find these lines static uint8_t buffer[ssd1305_lcdheight * SSD1305_LCDWIDTH / 8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,... 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01 }; and delete everything after static uint8_t buffer[ssd1305_lcdheight * SSD1305_LCDWIDTH / 8] = { and before }; Page 22 of 23

Downloads Datasheets Datasheet for the SSD1305, the passive OLED driver chip in the modules. (http://adafru.it/flg) This is the chip in the module that converts I2C/SPI/8-bit commands to OLED control signals Diagram for 2.42" OLED submodule (http://adafru.it/jbx) Datasheet for the 2.42" OLED display (http://adafru.it/jby) Diagram for 1.54 OLED submodule (http://adafru.it/jbz) Datasheet for the 1.54" OLED display (http://adafru.it/jc0) Dimentional details for the 1.5" OLED module (dont have one yet for the 2.4" OLED) Last Updated: 2016-02-16 11:27:53 AM EST Page 23 of 23