Skip to content
/ SSD1311 Public

Arduino library for SSD1311 screen controller

Notifications You must be signed in to change notification settings

n2j7/SSD1311

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSD1311 Library

I've searched for good library for my OLED 16x02 screen, but i haven't found anything! So i've tried to implement my own library! There were some pieces of code in different repositories without any(or poor) description what each part do, with strange method names and bad comments... I've started to search information about my OLED screen and have found a full SSD1311 controller datasheet on which my screen was based!

So, what i have:

ssd1311 16x02 screen

After some research i had:

  • controller SSD1311
  • OLED screen
  • 2 lines x 16 cells
  • 5x7 (5x8) char
  • 256 step contrast
  • i2c interface
  • character generator 256 * 5x8 CGROM
  • character generator 64 * 8 bits CGRAM
  • display data 80 * 8 bits
  • 3 sets of CGROM (ROM A / B / C)
  • Row Re-mapping and Column Re-mapping
  • Double-height Font characters
  • Bi-direction shift function
  • All character reverse display
  • Display shift per line
  • Screen saving fade in / out feature

Useful links:

More links with some basic information:

Notes about library core:

Frame consist of:

  • (1) i2c address is 7 bit long
  • (2) next bit is a direction (READ or WRITE)
  • (3) next byte define is it command or data packet
  • (4) next byte is the command|data byte

Datasheet contains some naming for important moments. There are some explanations:

IS, RE, SD is a logical bits which can be set by doing command requests to screen

D/C# is a (3) in frame. First Wire.write after Wire.beginTransmission in code

R/W# is a bit (2) in frame. You can "control" it by doing Wire.requestFrom() or Wire.beginTransmission()

  • R/W# = 0 when Wire.beginTransmission()
  • R/W# = 1 when Wire.requestFrom()

CGRAM is Character Generator RAM

DDRAM is Display Data RAM

PIN dependent features:

This controller features is preset by pin configuration and may be ignored in code if default values are suitable for you^

  • MCU bus interface selection
  • CGRAM
  • Slave address
  • Internal VDD regulator
  • OLED Characterization
  • Display Clock Divide Ratio
  • Oscillator Frequency
  • SEG Pins Hardware Configuration
  • V COMH Deselect Level

About

Arduino library for SSD1311 screen controller

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages