# Need Help to manage OLED with Arduino UNO

**URL:** <https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414>\
**Category:** Displays\
**Created:** [April 21, 2015, 10:56pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414 "2015-04-21T22:56:35Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![vicentesai](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@vicentesai](https://forum.arduino.cc/u/vicentesai)\
**Post date:** [April 21, 2015, 10:56pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/1 "2015-04-21T22:56:35Z")

</div>

Good night everybody.

My name is Vincent. I have some problems to wire and setup my OLED Display with arduino.

I bought a OLED Display ( [http://www.buydisplay.com/default/serial-oled-module-price-3-2-inch-display-256x64-screens-white-on-black](http://www.buydisplay.com/default/serial-oled-module-price-3-2-inch-display-256x64-screens-white-on-black) )

I´ve connect wires as here shows:

> **[ER-OLEDM032-1\_Interfacing.pdf](https://www.buydisplay.com/download/interfacing/ER-OLEDM032-1_Interfacing.pdf)**
>
> 182.57 KB

" The Serial 4 Line SPI Reference Example "

Then, I download the " u8glib\_arduino\_v1.17pre2" that linked in other chat.

And, It doesn´t work, the display make nothing... I´ve tried with other display (the same model), and nothing...

I don´t know what to do... and, as you can see, I don´t have so knowledge of this kind of things, but I have to do.

Hope don´t bother you, and thanks for your time.

Vincent

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 22, 2015, 8:37pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/2 "2015-04-22T20:37:06Z")

</div>

First we need to check your connections. Which Arduino board are you using and what connections have you made between the Arduino board and the display? I need a simple net list, I. E. Connected Arduino pin 13 to display pin x, etc etc

How are you powering the display?

Also attach the sketch for checking, since you may not be using the correct one.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 22, 2015, 8:45pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/3 "2015-04-22T20:45:42Z")

</div>

Also please confirm you have set the configuration links on the display board for 4 wire SPI as per pdf document. This may involve fitting or removing links or resistors.

---

<div class="post-metadata">

**Author:** ![vicentesai](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@vicentesai](https://forum.arduino.cc/u/vicentesai)\
**Post date:** [April 23, 2015, 9:32am UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/4 "2015-04-23T09:32:40Z")

</div>

Hi rowboteer.

I connected like this:

OLED ARDUINO UNO

1 GND  
2 5V  
3 ------  
4 SCLK A1  
5 SDIN A2  
6 ------  
7 GND  
8 GND  
9 GND  
10 GND  
11 GND  
12 GND  
13 GND  
14 DC A0  
15 RESET  
16 CS A3

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 23, 2015, 12:28pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/5 "2015-04-23T12:28:18Z")

</div>

Ok, and what configuration links are fitted/not fitted to the display circuit board in positions R18, R19, R20 and R21?

---

<div class="post-metadata">

**Author:** ![vicentesai](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@vicentesai](https://forum.arduino.cc/u/vicentesai)\
**Post date:** [April 23, 2015, 6:57pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/6 "2015-04-23T18:57:39Z")

</div>

I attached the pic, better.

Thanks.

 ![image.jpg](https://europe1.discourse-cdn.com/arduino/original/4X/a/8/0/a807087496efd8583a6febe1a63921dc788c82aa.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 23, 2015, 11:51pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/7 "2015-04-23T23:51:22Z")

</div>

Okay, great photo!

I see that R18 and R21 are fitted, this means the display is configured for the parallel interface (8080 MCU mode) in the diagram you provided a link to.

If you want to use the 4 wire SPI interface you will need to unsolder the link resistor from position R18 and refit it in position R19. Then try your sketch again.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 24, 2015, 9:17am UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/8 "2015-04-24T09:17:45Z")

</div>

Based on the discussion in the thread you mention, and after examining the "Hello world" example sketch, the constructor line you should use for the SPI 4 line interface is:

U8GLIB\_NHD31OLED\_2X\_GR u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9

If you have changed the pin allocations in that constructor to the ones you have wired up then it may work, but the SPI data and clock lines will then be "bit bashed" by software hence display updates will be relatively slow. It would be advisable to use the hardware SPI pins as listed in the constructor above.

Looking at the data sheet indicates the display has 3.3V input logic levels, the 5V levels from the UNO may damage it, thus you should add protection resistors in line with some connections. I have no way of testing this but I would try the connections as follows:  
be:  
OLED ARDUINO UNO

1 GND  
2 5V  
3 ------  
4 through 1K2 resistor to pin 13 (SCLK)  
5 through 1K2 resistor to pin 11 (SDIN)  
6 ------  
7 ------  
8 ------  
9 ------  
10 ------  
11 ------  
12 ------ (or connect to 3.3V, or via 10K resistor to 5V)  
13 ------ (or connect to 3.3V, or via 10K resistor to 5V)  
14 through 1K2 resistor to pin 9 (/DC)  
15 through 1K2 resistor to RESET  
16 through 1K2 resistor to pin 10 (/CS)

The 1K2 resistors should protect the display logic inputs from damage.

Report back on your findings!

---

<div class="post-metadata">

**Author:** ![vicentesai](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@vicentesai](https://forum.arduino.cc/u/vicentesai)\
**Post date:** [April 24, 2015, 5:24pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/9 "2015-04-24T17:24:00Z")

</div>

Ok, Thanks !!!

I'm gonna do it and try again, and let you know if it runs.

---

<div class="post-metadata">

**Author:** ![vicentesai](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@vicentesai](https://forum.arduino.cc/u/vicentesai)\
**Post date:** [May 9, 2015, 5:40pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/10 "2015-05-09T17:40:49Z")

</div>

Hi Rowboteer.

Sorry cause I was on vacation, and I didnt answer.

IT RUNS when I did the changes that you wrote.

Thanks a lot !!!

---

<div class="post-metadata">

**Author:** ![vicentesai](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@vicentesai](https://forum.arduino.cc/u/vicentesai)\
**Post date:** [May 10, 2015, 9:11am UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/11 "2015-05-10T09:11:24Z")

</div>

Hi Rowboteer.

I did the changes that you told me, and IT RUNS !!!

Thanks a lot for your time and knowledge. 😉

I attached the picture !!!

 ![image.jpg](https://europe1.discourse-cdn.com/arduino/original/4X/b/1/8/b188758cad42f1dbec9297ba68dcaaff89eefc99.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 10, 2015, 9:19pm UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/12 "2015-05-10T21:19:52Z")

</div>

Result!

Great to hear it is working. I like the picture 😃

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 3:37am UTC](https://forum.arduino.cc/t/need-help-to-manage-oled-with-arduino-uno/306414/13 "2021-05-06T03:37:54Z")

</div>


