S-0018
Double Color 0.96 Inch OLED Display
Descriptions
SSD1315 is a single-chip CMOS OLED/PLED driver with controller for organic/polymer light emitting diode dot-matrix graphic display system. It consists of 128 segments and 64 commons. This IC is designed for Common Cathode type OLED/PLED panel.
SSD1315 displays data directly from its internal 128 x 64 bits Graphic Display Data RAM (GDDRAM). Data/Commands are sent from general MCU through the hardware selectable I2C Interface, 6800-/8080- series compatible Parallel Interface or Serial Peripheral Interface.
The 256 steps contrast control and oscillator which embedded in SSD1315 reduces the number of external components. SSD1315 is suitable for portable applications requiring a compact size and high output brightness, such as set-top box, car audio, wearable electronics, etc.
Features
- Resolution: 128 x 64 dot matrix panel
- Power supply 3.3V
- Segment maximum source current: 240uA
- Common maximum sink current: 30mA
- Embedded 128 x 64 bit SRAM display buffer
- Pin selectable MCU Interfaces:
- 8 bits 6800/8080-series parallel Interface
- 3/4 wire Serial Peripheral Interface
- I2C Interface
- Screen saving continuous scrolling function in both horizontal and vertical direction
- Screen saving infinite content scrolling function
- Internal or external IREF selection
- Internal charge pump regulator
- RAM write synchronization signal
- Programmable Frame Rate and Multiplexing Ratio
- Row Re-mapping and Column Re-mapping
- Power On Reset (POR)
- Dynamic Grayscale
- On-Chip Oscillator
- Chip layout for COG, COF
- Wide range of operating temperature: -40°C to 85°C
Basic Specifications
Display Specifications
- 1) Display Mode: Passive Matrix
- 2) Display Color: Yellow and Blue
- 3) Drive Duty: 1/64 Duty
Mechanical Specifications
- 1) Outline Drawing: According to the annexed outline drawing
- 2) Number of Pixels: 128x64
- 3) Panel Size: 27.50x27.80x3.0 (mm)
- 4) Active Area: 21.744x10.864 (mm)
- 5) Pixel Pitch: 0.17x0.17 (mm)
- 6) Pixel Size: 0.154x0.154 (mm)
- 7) Weight: 6(g)
Development Documentation
- Datasheet: File:SSD1315 2R.pdf
- Drive-1306: File:Drive-1306.pdf
How to program it
Raspberry Pi
- Connect OLED display to Raspberry Pi GPIO as following Chart:
OLED | Raspberry Pi GPIO |
---|---|
GND | GND |
VCC | 3.3V |
SCL | GPIO 3 (I2C1 SCL) |
SDA | GPIO 2 (I2C1 SDA) |
- Full GPIO position
NOTE: We assume you are using the official operating system provided by the Raspberry Pi.
- Enable I2C function, open a terminal and typing:
sudo raspi-config
- Navigate to interface options and i2c item, enable it.
- Check if the OLED screen has been recognized.
i2cdetect -y 1
- Install dependencies libraries:
sudo apt -y install python3 python3-pip python3-pil libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libopenjp2-7 libtiff5
- Grant privilleges to user `pi`
sudo usermod -a -G gpio,i2c pi
- Download sample code from this repo:
git clone https://github.com/rm-hull/luma.examples.git cd luma.examples/
- Install the dependencies
sudo -H pip3 install -e .
- Entering into example folder and test it.
cd examples/ vim mydemo.py
- Paste following code.
#!/usr/bin/python3 import os import sys import time from demo_opts import get_device from luma.core.render import canvas from PIL import ImageFont import psutil import subprocess as sp def greetings(): return "GeeekPi HI-Tech" def get_temp(): temp = sp.getoutput("vcgencmd measure_temp") return "CPU Temp:%s" % temp def get_cpu_percent(): cpu_percent = psutil.cpu_percent(interval=2) return "CPU Percent: %.1f" % (cpu_percent) def get_cpu_count(): cpu_count = psutil.cpu_count() return "CPU Count: %s" % (cpu_count) def get_ip(): ip = sp.getoutput("hostname -I") return "IP: %s" % ip def stats(device): # use system font font_path = '/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf' font_size = ImageFont.truetype(font_path, 13) with canvas(device) as draw: draw.text((0, 0), greetings(), font=font_size, fill="white") if device.height >= 32: draw.text((0, 15), get_cpu_percent(), font=font_size, fill="white") if device.height >= 64: draw.text((0, 30), get_temp(), font=font_size, fill="white") try: draw.text((0, 45), get_ip(), font=font_size, fill="white") except KeyboardInterrupt: pass device = get_device() while True: stats(device) time.sleep(2)
- Save it and Execute it:
sudo python3 mydemo.py &
- You should seen this screen on OLED
Raspberry Pi Pico
Arduino
STM32
51 Series
Package Includes
- 1 x 0.96 inch OLED display kit
Keywords
- 0.96 inch OLED display, double color 0.96 inch OLED display