One reason could be, that the SPI mode is not enabled. In fact i wonder how this is done. Often there are jumpers or solder pads to enable SPI mode. Maybe you can attach a picture of the back side of the display to verify this.

The SPI pins are shared with the lines for 8-Bit parallel mode. You can find this information in the datasheet of the controller.

@TheCoolestIn the initial thread it was written that the display is from aliexpress, but the datasheed given is from dfrobot. So i do not think that the datasheet is helpfull in this case.

@liming

Quote

Do I need to remove R20 to R21 and R18 to R19?

Exactly. Setting BS1 and BS2 to zero (that means resoldering both resistors to the 0 position) will put the display into SPI mode. The datasheet of the controller and also the datasheet from dfrobot will tell you where to find the SPI pins.D0 = CLKD1 = Data InD/C = A0

@TheCoolestIn the initial thread it was written that the display is from aliexpress, but the datasheed given is from dfrobot. So i do not think that the datasheet is helpfull in this case.

@liming

Quote

Do I need to remove R20 to R21 and R18 to R19?

Exactly. Setting BS1 and BS2 to zero (that means resoldering both resistors to the 0 position) will put the display into SPI mode. The datasheet of the controller and also the datasheet from dfrobot will tell you where to find the SPI pins.D0 = CLKD1 = Data InD/C = A0

Oliver

Thanks a lot! OLED displayed "Hello World"!But another question is that the backlight is dark, should I need to add another power to some pins(V0)? my arduino only supply 5V.thanks!

Sorry, my mistake. I means that the light of font is dark blue. When I power on my uno, the font is white and bright and then it becomes dark blue. By the way, I use the "hello world" sample code without any modify. Thanks.

OLEDs require some power. OLEDs of that size can easily draw 100mA and more (up to 400mA). The question is, how do you power your OLED. If the OLED is powered by the 3.3V output of the Arduino, then the power could break down after some (short) time. As far as i remember, the Arduino 3.3V can only provide 50mA. Maybe enough as long as the OLED is black, but insufficient as soon as something is displayed. I suggest to power the OLED by some external source (I often use 2x AA in my projects).

Another option might be, that the init sequence for the OLED is incorrect. The init sequence in u8glib has been written for the NHD OLED, so it might be different for your OLED. But from your description, i assume, that your power source can not provide enough current.

Yes, I use the UNO for my OLED power supply, but I use 5V not 3.3V. I also try use 3.3V on UNO as you said, but there is no words appeared.

I try to use 2X AA as you said for external source, the OLED screen flash once(font is white and bright) and then disappear.

I use another power bank(0.5A) and plug a USB FTDI(3.3V and GND pins to OLED) for OLED power supply, the screen is fine. But, if I press reset button on UNOat this time, the screen will be become no words on OLED.

Does it mean that OLED needs to reset with UNO at the same time? All my testings above are power on UNO first and then power on OLED, if there are words appear, I will press reset button once on UNO.

OLEDs require some power. OLEDs of that size can easily draw 100mA and more (up to 400mA). The question is, how do you power your OLED. If the OLED is powered by the 3.3V output of the Arduino, then the power could break down after some (short) time. As far as i remember, the Arduino 3.3V can only provide 50mA. Maybe enough as long as the OLED is black, but insufficient as soon as something is displayed. I suggest to power the OLED by some external source (I often use 2x AA in my projects).

Another option might be, that the init sequence for the OLED is incorrect. The init sequence in u8glib has been written for the NHD OLED, so it might be different for your OLED. But from your description, i assume, that your power source can not provide enough current.

If there are no other solutions, I maybe power on arduino first and then power on OLED. The steps I tested are fine.wdt_reset() can reset arduino and didn't affect OLED, so I didn't worry about the HW button on arduino.