1

I have an OLED with this 7 pin pinout:

My OLED

I want to use an existing code i found that makes use of U8Glib. But in the example, use uses 4 pins to control the OLED via I2C. This is the pinout he uses:

Pinout

Is it possible to control my OLED via 4 pins and use U8Glib to simplify my project by making use of the example code i found?

EDIT: Here is also a picture of the back of the OLED PCB that mentions how to use IIC but i do not understand it! back of pcb

asked Jul 8, 2017 at 13:36
3
  • 2
    That looks like it may be an SPI interface, not I2C, so no. You can't. Commented Jul 8, 2017 at 13:45
  • Unless of course U8Glib has an SPI example for that board. I assume it's an SSD1306? Most small OLEDs are... Commented Jul 8, 2017 at 14:10
  • Looks configurable to I2C / 3-wire SPI / 4-wire SPI depending on the presence / absence of R1-R4. Commented May 10, 2019 at 16:46

4 Answers 4

2

This page has the answer to your questions. For reference:

Setting up SPI/I2C Connection with GMS096A OLED Module

Being a new entry to the market, only limited resources are available on this small piece of miracle (GMS096A). I2C/SPI configuration always demands helpful resources as in any case. For the SPI setup, the module comes in 4 wire SPI configuration by default and to make it work with the arduinos you can use these libraries from Adafruit.

For the I2C setup it demands a little bit of work on the module. Actually it was one of our customers who shared these simple configuration steps with us, start with resoldering the resistor from position R3 to R1 and then short the R8 resistor with some solder tin (0 Ohm resistor). The R6 and R7 pullup resistors are already soldered, nothing to do there. Once done, the module is ready for I2C communication! The CS Pin is not necessarily needed, so just connect it to GND. The DC Pin selects the address. For standard address wire it to GND. The RES-pin needs a low pulse at startup and high voltage during operation (as in SPI mode), a 100nF capacitor to GND and a 10k res to VCC would be ideal!

Your module might differ sightly. But you should be able to figure it out from there. The pulse on the RES-pin needed at startup took me a while to figure out!

answered Oct 31, 2017 at 19:57
2

Yes, it works IIC as described above, with my Arduino MEGA. You can also connect RST Pin at Arduino RESET signal, so no need of extra R and C components

answered May 10, 2019 at 15:46
1

That is a SPI interface. Often the CS is missing, but you seem to have that pin. I suggest to start with the software PCI mode of the U8Glib.

This is the best explanation that I can find: Github: SSD1306 based OLED connected to Arduino

Would you consider using the newer U8g2 library ?
It is easier to use with Arduino boards that have more memory. But it has also the same mode for low memory usage, just like the U8Glib.

answered Jul 8, 2017 at 19:18
0

Is it possible to control my OLED via 4 pins and use U8Glib to simplify my project by making use of the example code i found?

i'm sure somewhere there is an i2c->spi bridge. if not, you can always code your arduino to behave like one.

short of that, you can simply code to control the board via spi.

answered Jul 9, 2017 at 11:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.