Data Sheet
1.5inch OLED Module User Manual
2. Files description
Under the folder /User/Fonts of project, there are five fonts provided
Under the folder /User/OLED of project, there are:
DEV_Config.c: Define the GPIOs used and the communication type.
OLED_Driver.c: Drive code of OLED.
OLED_GUI.c: Provide drawing functions and display functions.
3. Using
It defines two macros in DEV_Config.h: USE_SPI_4W and USE_IIC. If use I2C interface, you
need to set USE_IIC as 1 and USE_SPI_4W as 0; Otherwise, set USE_IIC as 0 and USE_SPI_4W as 1.
4. Expected result
Download the code and reset board, relative information are printed via UART interface,
and the OLED will display figures for 2s after a full refresh. Then display bitmap, 16-bits grayscale
and finally display time.
ARDUINO
1. Hardware connection (Based on UNO PLUS)
PIN
UNO PLUS
VCC
3V3/5V
GND
GND
DIN
11
CLK
13
CS
10
DC
7
RST
8
2. Files description
Two kinds of examples are provided: EXT_RAM and INI_RAM. In INI_RAM project, it use
internal RAM of Arduino and the EXT_RAM project use external SRAM (23K256).
Note: If you EXT_RAM, you need to buy an SRAM module and connect to Arduino separately.
SRAM module is not included in our product.
/Fonts: Provide five common fonts. You need to copy this folder to the libraries directory of
Arduino IDE.
/OLED:
DEV_Config.cpp: Defines the GPIOs and communication type.
OLED_Driver.cpp: Drive code of OLED
OLED_GUI.cpp: Functions for GUI drawing and displaying.
SPI_RAM.cpp: Because of the little flash of Arduino, we use an external SRAM as
buffer.
3. Using
Configure the communication type: