• Stars
    star
    154
  • Rank 241,692 (Top 5 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created over 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A very fast and full featured driver for SSD1331/22/32/51 Oled's compatible with Teensy's and many other MCU's

SSD_13XX

A very fast and full featured driver for Solomon Systech SSD1331, SSD1332, SSD1322 and SSD1351 drivers designed mainly for Oled's compatible with Teensy's and many other MCU's. I have other 2 libraries here in github but have some issues and are quite old, this will replace both.

Current Version:

  • 1.0r2: SSD1331/SSD1332/SSD1351 tested only with various Teensy's and ESP8266 (Have to set SPI at 79.999.999!). If not work with other CPU please report only, I NEVER tested the code with other CPU's so I expect this, but remember that is a preview and things gonna change soon.

Driver description (what I should choose?):

  • SSD1331 is a full featured driver for 96x64 oled with a lot of useful registers and an hardware accellerated standalone scroll that I never seen in other drivers. This controller is currently supported.
  • SSD1332 is the 'low cost' version of SSD1331, much less features, less fast (but use some Hardware Accellerated primitives), no scrolling. This controller is currently supported.
  • SSD1322 used in some wide oled's.(in development)
  • SSD1351 Can drive 128x128 Oled's, doesn't have any Hardware Accellerated primitive (apart scrolling as SD1331), pretty featured. This controller is currently supported.

SSD1331 Currently my preferred one...

Uncomment in settings file: #include "../_display/SSD_1331_96x64.h" SSD1331
NOTE:works out of the box, no hardware configurations, very bright


SSD1331 RED PCB 0.96" Color Oled

Uncomment in settings file: #include "../_display/SSD_1331_REDPCB.h" SSD1331b
NOTE:This Oled needs to be configured for SPI (jumpers on the back) and you should connect D2,D3,D4,D5,D6,D7 to GND!


SSD1332

Uncomment in settings file: #include "../_display/SSD_1332_96x64.h" SSD1332
NOTE:This Oled needs to be configured for SPI (jumpers on the back) and you should connect D2,D3,D4,D5,D6,D7 to GND! I will not raccomand this, red color is still orange to me.


SSD1351 128x128

Uncomment in settings file: #include "../_display/SSD_1351_128x128.h" SSD1332


How to set driver:

You need to open _settings/SSD_13XX_settings.h with a text editor and uncomment the driver you want to use:
Es. #include "../_display/SSD_1331_96x64.h"

Driver that will never supported:

  • SSD_1306: This device need a completely different library since it have no internal framebuffer.

CPU Supported:

  • Teensy 3.0, 3.1, 3.2, 3.4, 3.5, LC
  • Teensy 2.0 and variant
  • Any AVR 8 bit (UNO, etc.)
  • Arduino DUE
  • ESP8266
  • SPARK (next versions)
  • Several ST (next versions)

Note: I currently will not support Arduino Zero, it's currently poor documented and it cost a fortune, I suggest a Teensy that is much cheaper, more featured and smaller!
However, this is open source an released with GNU V3 so you can fork library and add Zero support yourself as you respect the GNU licence and leave intact any comment.


Background:
I got my first SSD_1331 on Ebay, find a library compatible at Adafruit but I was extremely disappointed about performances/features and bugs, so I decided to write a new one from scratch based on my popular TFT_ILI9163C. Since this devices are very similar I have decided to build up an unique library.
I have 2 old libraries here on github, but digging inside datasheet I discover that I can get much more by rewrote almost everithing. As result I got all chip features enabled and it's probably the faster driver around, much more than adafruit and works with all features at any screen rotation by using all the time his hardware accellerated primitives
Commands and features are pretty similar to TFT_9163C,TFT_7735,TFT_ILI93XX last libraries here on github, of course there's differences related to hardware (OLED don't have backlight pin, etc.)


Features:

  • A display file for each oled, easy to customize.
  • Blazing fast, near chip hardware limits, expecially with Teensy's.
  • Any feature enabled for any rotation, using native hardware accellerated primitives.
  • Standard SPI & SPI transaction compatible, play nice with other SPI devices.
  • Many CPU supported.
  • Ultrafast Teensy's 3.0,3.1,3.2,3.4,3.5 SPI FIFO.
  • Fully SPI Transaction (where applicable), play nice with other SPI devices.
  • Almost all chip features supported.
  • LGPO Font accellerated rendering.
  • Icon support.
  • Image support.
  • Gradients.
  • Icon support (as seen in my last other libraries, use same icon file format).
  • Image support (as seen in my last other libraries, use same image file format).
  • User Font support (as seen in my last other libraries, use same font file format).
  • Uses TFT_ILI9163C command format that have many features and covers commands used in many libraries so it will be easy convert code to work with this one.

SSD1331/32 Unique commands: (differs from other libraries due different chip features)

  • copyArea: copy a portion of screen into another location (hardware acc.)
  • dimArea: dim a selected area (only SSD1331)
  • scroll: this chip has an standalone hardware scroll (only SSD1331 and SSD1351)
  • defineScrollArea: since scroll is hardware, all is defined inside this function)
  • moveArea: It move a defined area into another place (hardware acc.)
  • setColorDepth:8 or 16bit
  • setColorOrder:RGB or BGR (only SSD1331)
  • drawRect: the standard drawRect is provided, but this advanced version have borders. (hardware acc.) (only SSD1331/32)
  • mode:PWRSAVE It's almost equal to sleep, display goes off
  • mode:DISP_DIM The display goes in Dim mode (only SSD1331)
  • mode:PROTECT The chip logic don't accept any commands, just mode:NORMAL to goes off of protect mode.(only SSD1331)

Connections:
Of course some oled has just SPI exposed but some can be configured for parallel, I2C and so on. I'm using ONLY SPI here (so don't ask for any other protocol please).

  • RST Connect to +3v3 using a 4k7->10k resistor.
  • scl, sclk -> SCLK
  • sda, sdin -> MOSI
  • DC,RS ->DC pin on MCU
  • some oled has WR, RD. Leave floating...
  • some oled has D0...D7. Most of the times D0 and D1 are used for SPI, connect D2...D7 to GND or will be unstable!
  • VIN. Most oled support 5v, internally they have regulators, but follow specifications of your particular oled!
  • 3v3. This is 99% of the times an OUT! So do not use it.

Some notes, please read this, will save your time:

  • Even if your OLED can work at 5V, it cannot accept logic levels at 5V!!! All OLED accept logic levels at 3v3 so if you plan to use an AVR (like UNO) you need a level converted (like CD4050 or HCF4050 powered at 3v3, very cheap).
  • Do not use logic converters based on mosfet or similar or bidirectional ones (Adafruit and Sparkfun sell a lot of these), they are crap, waveforms are distorted and DO NOT USE PARTITION RESISTOR's for that, it's a bad idea, you can damage oled and cpu in the same time.
  • Most of you know already this but remember that Arduino UNO or similar can provide 3v3 but the logic levels are always at 5V!!!
  • The RST pin is not strictly necessary but if not used must pullup to 3v3, never leave float! When is necessary? When you develop a library for example but if you change libraries you may need a complete power cycle if you are not using this pin.
  • ESP8266 has very weak SPI, should be 3v3 but most of the times is much less so better avoid use any logic chip between it and oled, I spend days around a circuit before discovering this.
  • On ESP8266, from April 2016 the pin GPIO16 misteriously doesn't works as CS, don't ask me why. I'm currently using GPIO2 or GPIO4.
  • Since I'm using the fast SPI possible, keep wires short and remember to provide a decoupling capacitor for your oled.
  • If you plan to use SPI for other devices as well it's a good idea pullup the CS with a 10K resistor to +3v3, this will keep oled disabled until your CPU access it for initialization and avoid interferences.
  • It's always a good idea provide a pullup for each CS if multiple SPI devices are used, when CPU start all devices are forced disabled and CPU is able to access one by one and initialize all of them correctly, keep in mind and you will happy in the future!

Performances (SSD1331):
Early alpha was not working, only garbage on screen, it's here for just for reference
Alpha 1..2 was using absolute screen addressing (now abandoned)
Alpha 3..4 and beta's use hardware rotation addressing. (In Alpha 4 triangles rendering failed)
Beta 1..2 works and are usable, all function tested at any rotation.
CPU used for benchmarks: SSD1331, Teensy 3.2 at 96Mhz. Sketch:benchmarks_official.ino
Times are in Microseconds!

test Early alpha 1 alpha 2 alpha 3 alpha 4 beta 1 beta 2
Screen fill 409 809 807 809 808 507 406
Text 3983 3907 3963 3891 2357 2378 2270
Text2 9564 9368 9517 9332 5047 5057 4910
Lines 5576 10976 10978 10974 5561 299 277
Horiz/Vert Lines 6827 1800 1978 1964 1956 1954 1956
Rectangles (outline) 4508 8916 8919 8915 1126 1376 1123
Rectangles (filled) 4509 8924 8922 8920 1223 1499 1214
Circles (filled) 3635 18787 4488 4482 4481 4479 4481
Circles (outline) 4697 2851 2852 2849 2848 2847 2847
Triangles (outline) 517 505 508 504 503 204 183
Triangles (filled) 1916 11087 4284 4274 276 4274 4275
Rounded rects (outline) 1206 2942 1619 1586 1585 1587 1588
Rounded rects (filled) 10271 8184 5814 5807 5036 5241 5032
Icon Render 1404 1312

More or less, Beta 2 it's the release candidate, you can note how amazing fast in some operation, for example 406 microsec for a complete screen erase, 277 microsecs for the complete line test or the 183 microsec for the triangle test (remember that triangulation is used for 3d rendering as well, it should be fast), even text it's really fast. In comparison, for the Adafruit one I have to use milliseconds, it's amazing slow (even using the fast SPI mode). I will up a table comparison (for fun) whe I release out this one.


Licence:
Licensed under GNU V3.

More Repositories

1

TFT_ILI9163C

A library for ILI9163C displays for Teensy, Arduino, ESP82266 and more...
C++
162
star
2

RA8875

A library for RAiO RA8875 display driver for Teensy3.x or LC/Arduino's/Energia/Spark
C
75
star
3

gpio_expander

A library for drive a lot of GPIO chips with Arduino/Teensy3.x or LC
C++
65
star
4

TFT_ST7735

A fast driver for ST7735 displays that works with Arduino's /All Teensy's/ESP8266/SPARK
C
65
star
5

TFT_ILI93XX

Fast library for displays ILI9340,41,42,44 for all Teensy's,Arduino's,ESP8266
C
22
star
6

ArduCAM

A refractored version of ArduCAM, keeped away from distro because massive changes!
C
16
star
7

gpio_MCP23S17

A complete library for Microchip MCP23S17(teensy,avr,arm,esp8266)
C++
15
star
8

IntMatrixDisp

A universal Arduino/Teensy/Energia library for all Intelligent Led Matrix Displays
C++
15
star
9

OLED_SSD1331

Hyper Fast driver for SSD1331 for Teensy3, Arduino's and DUE
C++
14
star
10

PT2313

A simple library to drive Audio Chip PT2313L or E
C++
14
star
11

easyT6963

Library for Arduino's/Teensy's/Energia for LCD drived by T6963 with a GPIO (SPI)
C++
13
star
12

HPDL1414

A fast library for HPDL/DLG/DLR1414 displays and Teensy3/Teensy LC/Arduino's
C++
13
star
13

WebIOPi

Just experiments
Python
10
star
14

FT5206

Library for capacitive TouchScreen drived by FT5206xx chip
Arduino
10
star
15

GY953

A library for the Tilt compensated compass GY-953
C++
10
star
16

chatpadFirmware

Firmware for XBOX360 chatpad. Force serial,enable remote backlight, etc. For using with embedded and MCU's
9
star
17

TFT_ILI9340

Rocket fast SPI driver for Ilitek ILI9340/40C/41 TFT displays (8bit,Teensy's,ESP8266,DUE)
C++
9
star
18

LiquidCrystalNewV2

Universal Text LCD Library for Teensy3.x/Arduino/Energia
C++
7
star
19

Multiplexer4067

Hypereasy CD4067 multiplexer library
C++
6
star
20

OLED_SSD1306

Hyper Fast driver for SSD1306 for Teensy3, Arduino's and DUE
C++
6
star
21

screenkeys

Hardware & Software for drive 1..64 LCD Screenkeys LC button w Teensy3.x
C
6
star
22

OLED_SSD1332

Hyper Fast driver for SSD1332 for Teensy3, Arduino's and DUE
C++
6
star
23

OLED_SSD1351

A fast library for OLED drived by SSD1351
C++
6
star
24

OLED_pictivaWide

A library for the Pictiva OLED 288x48 that really works and fast
C
5
star
25

RFID

a simple lib for RC522 Rfid compatible with Arduino's 32bit and Teensy3 (OBSOLETE)
C++
5
star
26

stm32746g_discovery_lcd

A more complete BSP driver for STM32F7 discovery retro-compatible
C
4
star
27

commonFonts

Paul Stoffregen's Font Technology
C
3
star
28

servo_PCA9685

A custom version from adafruit that works with many cpu's included ESP8266
C++
3
star
29

Anarduino

An addon for Arduino IDE to better program Anarduino boards
Arduino
3
star
30

Extra_MCU_support_for_Arduino_IDE

ATmega1284p/ATmega644p/Tinys
C++
2
star
31

MeleF10Pro_for_Win_XBMC

An application to use Mele F10 Pro on XBMC in Win7,8,8.1
AutoHotkey
2
star
32

SPI_ESP

A fast SPI shared library for ESP8266
C++
2
star
33

TFT_S6D02A1

A fast library for drive Samsung S6D02A1 TFT displays with Arduino/Teensy
Arduino
2
star
34

gpio_MCP23SXX

Fast,Full featured library for Microchip MC23Sxx series for many CPU's
C++
2
star
35

CS3318

A Library for Cirrus CS3318 SPI/I2C 8 ch volume chip
1
star
36

simplyEncoder

A simple library for most encoders and micros, always works
C++
1
star
37

shiftRegister

A fast and basic library for Arduino/Teensy3.x/Energia for use shift registers
C++
1
star
38

gpio_PCF8574

A complete library for NTX PCF8574
1
star
39

SPIFlashDMA

An experimental DMA-SPI based driver for Flash Chip
Arduino
1
star
40

tulipallo

Automatically exported from code.google.com/p/tulipallo
C++
1
star
41

RF24

C++
1
star
42

LiquidCrystalNew

(outdated) A fast and Pin saver library for drive all standard text LCD with Arduino/Teensy3
Arduino
1
star
43

amarino

Automatically exported from code.google.com/p/amarino
Java
1
star
44

Studio_master_control

A complete studio master control for audio with mastering quality design
1
star
45

spark_ra8875

Porting on spark core of RA8875 library (test)
C
1
star
46

CAT9552

An Arduino/Teensy3.x or LC/Energia library for ON semiconductors CAT 9552 led driver
C++
1
star
47

Arduino_Universal_Programmer

An hardware board for program any compatible and not 8 bit processor for arduino IDE
1
star
48

Audio_Balanced_to_UnBalanced_receiver

A simple monochannel Audio Balanced to UnBalanced receiver
Eagle
1
star
49

Raspi_test

Some code test for my raspi
1
star