.5inch OLED Module User Manual 1.5inch OLED Module User Manual OVERVIEW This is a general OLED display module, 1.5inch diagonal, 128*128 pixels, 16-bit grey level, with embedded controller, communicating via SPI or I2C interface. FEATURES Driver: SSD1327 Interface: 4-wire SPI/I2C Pixels: 128*128 Display area: 1.5inch (diagonal) Dimension: 44.5mm*37mm Display color: White (16-bit grey level) Operating voltage: 3.3V/5V INTERFACES PIN Description VCC 3.
1.5inch OLED Module User Manual By default, the module is in 4-wire SPI communication mode, that is the BS is connected to 0. Not all the 0 and 1 stands for level, it just stands for the connecting options of the resister. The actual hardware connection for different communication mode is as below: BS CS D/C DIN CLK 4-wire SPI 0 Chip Selection D/C MOSI SCK I2C 1 NC 0/1 SDA SCL Description: 4-wires SPI (factory setting): BS (0) is connected to ground.
1.5inch OLED Module User Manual The OLED supports 8-bit 8080 and 8-bit 6800 parallel control, it also supports 3-wire SPI, 4-wires SPI and I2C control. Parallel interface requires too much IO pin and the 3-wire is less used, so this module we use 4-wires SPI and I2C interface for communication. The drive controller support 16-bit grey level display. 16-bit grey level is controlled by 4 bits.
1.5inch OLED Module User Manual The timing of SPI is composed of CPHA and CPOL. The timing controls the data transmission of SPI communication. CPOL (Clock polarity): Controls the steady state value of the clock when no data is transferred. CPOL=0, SCK pin is low at idle state. CPHA (Clock phase): Control when the first data is captured, at the first edge or the second edge. CPHA=0, data is captured at the first edge. The combination of CPOL and CPHA are the four communication modes of SPI.
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.
1.5inch OLED Module User Manual 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.
1.5inch OLED Module User Manual RST 2. 25 (BCM) Enable communication interfaces of Pi sudo raspi-config If you use SPI interface (by default): Choose Interface Options -> SPI -> yes to enable the SPI If you use I2C interfae: Choose Interface Options -> I2C -> yes to enable I2C 3. Libraries installation About how to install libraries for Raspberry Pi code, please visit this page: Libraries_Installation_for_RPi. The wiki page describe about how to install libraries for BCM2835, WiringPi and Python. 4.
1.5inch OLED Module User Manual 1. WiringPi oprates by read/write the device files of Linux OS. and the bcm2835 is library function of Raspberry Pi’s CPU, it operates registers directly. Thus, if you have used bcm2835 libraries firstly, the usage of WiringPi code will be failed. In this case, you just need to reboot the system and try again. 2. Due to the first difference, they underlying configuration are different. In DEV_Config.
1.5inch OLED Module User Manual otherwise probable need to reinstall the system (impossible terminate the process by pressing ctrl+c, impossible to login with pi user permission). CONVERT IMAGE TO ARRAYS 1. Convert Image data Open 16-bit grayscale by Image2Lcd software, and set: 输出数据类型(Output data type): C 语言数组(*.
1.