Go Down

Topic: [SOLVED] Getting started with OLED 2002 on I2C (Read 3815 times) previous topic - next topic


Feb 14, 2015, 06:44 am Last Edit: Feb 22, 2015, 07:17 pm by tomahawk66

I purchased a couple of 2002 character OLED displays (ER-OLEDM2002-1_Series) and I2C 'backpack' adaptors. The displays use the US2066 controller.

I set the BS0/BS1/BS2 bus interface pins behind the OLED displays to the required 010 to interface with I2C, and connected the I2C backpacks using 16 jumper wires in the same way that I have connected to 1602 LCD's. I checked the I2C address as 0x27 using the I2C scanner.

Now I need to find some sample code to get this started. So far I have not had much success getting information about this controller.

I wonder if there is someone in our community who has experience with this display, and would be able to help me get this up and running. I am a beginner with Arduino (but I can follow instructions  :smiley-wink: ). I have previously successfully connected 1602 and 4002 LCD modules with I2C backpacks to my Arduino Mega 2560 R3.

I have attached photos of the modules and the relevant datasheets.

Thank you so much!



And here is the ER-OLEDM2002-1_Series_Datasheet


Feb 14, 2015, 06:49 am Last Edit: Feb 14, 2015, 06:59 am by tomahawk66
And here is the US2066 datasheet.

Thank you!  :)



Feb 14, 2015, 07:23 am Last Edit: Feb 14, 2015, 12:06 pm by tomahawk66
And here are the datasheets for the PCF8574 controller on the I2C backpack.
I am not certain that these I2C adaptor 'backpacks', which I used successfully with 1602 and 4002 LCD's, are in fact compatible with these 2002 OLED's. If they aren't compatible, I'd like to find out where one could source compatible adaptors.


You have misunderstood how to use the display. There is /NO/ need for the "Backpack" you have - the I2C controller inside the display is meant to be wired directly to your Arduino.

// Per.


Thank you, Per, for taking time out to clarify this for me!  :)

So I followed the instructions on the datasheet page 3, and connected GND to GND, VDD to 3.3 V, tied D2 and D1 together and connected to SDA, and connected D0 to SCL.

Then I ran the I2C scanner and it successfully detected an I2C device at address 0x3D.  :)

Then, I uploaded the following sketch but nothing showed up on the display:

Code: [Select]
#include <Wire.h>
void setup(){

void loop(){
Wire.beginTransmission(0x3D); // I2C address found
Wire.endTransmission(); // stop transmitting

Perhaps the sketch is not appropriate. Would you be able to guide me in the direction of some workable code?

Thank you ever so much for your time and patience!



Okay, finally got this to work!
I modified the library and sample sketch I found at https://github.com/gadjet/1602-OLED-Arduino-Library
Many thanks to the author: Phil Grant.
The US2066 controller is clearly similar to the SSD1311.


Feb 22, 2015, 08:16 am Last Edit: Mar 02, 2015, 12:01 pm by tomahawk66

This is a follow-up, just in case it can be of use to anyone else getting started with these displays.

Initially I made only 5 connections (GND-GND,VDD-3.3V,D1+D2-SDA, D0-SCL), between the OLED and Arduino, and faced problems of intermittency and instability.

Then a more thorough reading of the US2066 datasheet showed I needed to make several additional connections in order to make these work stably in I2C mode, so:

(1) First, I created a GND bus (0 V = Vss) on the breadboard by connecting a jumper to the Arduino Mega GND pin.
Then, created a Vdd bus (3.3 V = Vdd) on the breadboard by connecting a jumper to the Arduino Mega 3.3 V pin.
Also inserted a 10 uF electrolytic capacitor between Vdd and GND.

(2) Then made the following connections between the OLED display pins and the Arduino:

GND: to GND bus (Vss)
Vdd: to 3.3 V bus
D7, D6, D5, D4 and D3: all to GND bus (Vss)
D2 and D1: tied together and to SDA pin
D0: to SCL pin
RD: to GND bus (Vss)
RW: to GND bus (Vss)
DC: to GND bus (Vss) or 3.3 V bus (Vdd)
RES: to 3.3 V bus (Vdd) as datasheet advises pulling it HIGH during normal operation.
CS: to GND bus (Vss)

I found I could toggle the address between 0x3C and 0x3D by pulling DC either high or low. This is also in accordance with the information in the US2066 datasheet.

When connected, these displays work stably without any problems of intermittency, etc. However, if there is anyone else here who has experience with these displays, or who could advise me on better/safer ways of doing things, I am all ears!  :)

So far I have been working with the RES pin permanently HIGH, and have not experienced any problems. But I do wonder whether I need to implement a reset  procedure which involves pulling the RES pin to LOW, as the datasheet advises. Would it then be necessary for me to connect this pin to an Arduino output pin (via a Resistor/Capacitor) and bring it to low/high at appropriate stages?

I have been able to use the limited functionality provided by the library referred to in my previous post, to achieve most of what I need for my MS-FSX autopilot displays. I have even attached 2 OLED's (with different addresses 0x3C and 0x3D) in parallel as shown in the photo.



Here you can find several ways to connect one display US2066-based.


Go Up