Blue 2.8 inch OLED Display Module 256x64 Graphic w/Breakout Board

Hi, i have this OLED module that i bought from buyDisplay.com which i cannot get to run from my arduino uno. It is a 4 wire SPI module. Could anyone help me out with the wiring part?

BuyDisplay give clear instructions on how to interface 3.3V displays with 5V Uno.
BuyDisplay sell adapter shields with the level shifters.

BuyDisplay generally supply software too. But it is not always as convenient as regular Arduino libraries.

Please supply a link to the actual display that you have bought e.g. Ebay sale or EastRising part number.

David.

Hi David. This is the link of the oled that i have https://www.buydisplay.com/default/blue-2-8-inch-oled-display-module-256x64-graphic-breakout-board.

Your module has a SSD1322 controller. Olikraus supports SSD1322 with u8glib and u8g2 which can be installed via the IDE Library Manager.

BuyDisplay give you manuals, datasheets, example programs, ...

The Controller requires 3.3V logic. You should use level shifter or resistors with your 5V Uno.

David.

I have tried to hook it up David but it is not working out for me. If you could post that, it would be really helpful. I have had a look at the data sheets but they specify connections for parallel, 8051 etc but ardiuno/ Rpi. Thanks

  1. Install u8g2 library via IDE Library Manager.
  2. Select 4-Wire SPI interface as shown in the Interfacing schematic. e.g. R19 link. R18 n.c.
  3. Connect DB0, DB1, DC, /RST, /CS via 4k7 series resistors to your Uno GPIO pins. (DB0=clock, DB1=date)
  4. Select the SW (bit-bang) constructor e.g.

Edit. I have corrected the constructor(s) from F to 1 type. These use less SRAM in a Uno.

U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h
//U8G2_SSD1322_NHD_256X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h

Run every u8g2 example.

When this is all working ok, change to the HW (hardware SPI) constructor.

This strategy is applicable to any "unusual" controller i.e.
10. Determine the controller from the documentation. e.g. SSD1322
11. Search Library Manager for supporting libraries
12. Install library
13. Select bit-bang constructor first.
14. Run library examples.

I do not own a SSD1322. But I used this approach for ST7920, SSD1306, SSD1351, ...

It should get you going on a new target e,g. SAMD, STM32, ...
When working, you can try the proper hardware interface.

Life is much easier with proper 3.3V Arduinos. You do not need the 4k7 series resistors.
The Interfacing schematic shows AT89C52 which can run at 3.3V. I would still use series resistors with a 5V AT89C52. The actual value is not too critical e.g. 2k - 10k. 4k7 is a typical value.

David.

Thanks David. Unfortunately i am outstation, so will get it going as you instructed as and when i am back home. Thank you again for all the help.

@David: Thanks for all the answers here.

Oliver

Hi David, back again! I tried connecting the way you mentioned but it is still not working for me. The oled just does not switch on. I think i am still not getting the connections right. I have tried to connect after reading the data sheet but the results are the same. Really need help!!!

There are several thinks to consider. As David mentioned the communication must fit to the interface configured on the display. So the best would be if you start to describe your setup. Pictures will always help here.

Important information is this: What kind of interface do you want to use? Did you configure the interface correctly on the PCB?
Did you provide proper power supply?

Oliver

Edit: The interface guide is a little bit tricky for download, so it is linked here:

Note that you need to connect R19 and R23 for 4-Wire-SPI.

My apologies. You have a Uno with limited SRAM. You will need to use a "paged" constructor e.g.

U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);	// Enable U8G2_16BIT in u8g2.h
  1. Configure your pcb for 4-wire SPI according to the East Rising schematic.
  2. Connect your display according to the constructor
  3. Use this constructor in every library example.

If you have a problem:
10. Post a photo of the interface setting on the pcb
11. Post a photo of your wiring from the Arduino to the display.
12. Paste the constructor statement that you are using in the example(s)
13. Quote which example(s) you are using.

I will edit #5 to correct the constructors

David.

Hello David, it worked :slight_smile: . I am able to switch on the oled but now i have this error
Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.
Error compiling for board Arduino/Genuino Uno.
So why is this happening?
Thanks so much for the help......

Sorry, I don't have much experience with u8g2lib.

The normal tips for displays are:

  1. reduce different fonts
  2. choose appropriate version e.g. use a _tn type for numbers only
  3. reduce images, icons, graphics

and general programs:
4. avoid f-p maths
5. choose appropriate types for variables and size of arrays

If unsure,
6. format your code neatly with crl-T
7. copy-paste your complete program to a CODE window or attach the project e.g. as ZIP

Have you tried every library example?
Was any of them too big?

David.

All are too big for the board. I cant get around it. And its not even much as in, i am just printing one Word on the OLED screen.

I don't believe you. I used the constructor from #10 in the GraphicsTest example from U8g2lib library.
And built for a Uno:

Using library U8g2 at version 2.22.18 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\U8g2 
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.1\hardware\arduino\avr\libraries\SPI 
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.1\hardware\arduino\avr\libraries\Wire 
Sketch uses 24224 bytes (75%) of program storage space. Maximum is 32256 bytes.
Global variables use 1119 bytes (54%) of dynamic memory, leaving 929 bytes for local variables. Maximum is 2048 bytes.

So there is plenty of space for both Flash and SRAM on a Uno.

Obviously it is too big for a 16kB Duemilanove but should fit on a 32kB Duemilanove.
It should even fit on a Leonardo i.e. 27258 bytes (95%) of program storage space, 1258 bytes (49%) of dynamic memory.

Make sure that you use the correct constructor e.g.

U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);	// Enable U8G2_16BIT in u8g2.h

Note that you should edit src/clib/u8g2.h in the library to define U8G2_16BIT

Make sure that you get the Library examples working first.

Then ZIP up your program and attach it. We can probably help.

David.

Thanks so much David. It works perfectly fine and more so after referring to the U8G2 lib documentation. Now its working perfectly fine.