SSD1306 OLED display driver
1.4.6
This library is developed to control SSD1306/SSD1331 RGB i2c/spi OLED displays and spi PCD8544 LED display
|
This is SSD1306/SSD1331 OLED display driver implementation for Arduino, AVR, Extensa platforms. The driver supports i2c and spi displays, and is also capable to work with pcd8544 (nokia 5110) LCD over SPI.
SSD1306 OLED display driver is Arduino style library, AND it can be compiled with plain avr-gcc compiler without Arduino libraries. It is intended for use with very small microcontrollers (with a little of SRAM). It was developed to use as few resources as possible. Since ATTiny controllers have no division and multiply operations, the library uses shift operation to speed up calculations.
The default i2c pins for embedded implementation can be modified in ssd1306_i2c_conf.h file. For other controllers pins are defined by standard Wire library. The default spi SCLK and MOSI pins are defined by SPI library, and DC, RST, CES pins are configurable through API.
If you need to add new not supported interface for the library, just implement interface specific functions and assign them to function pointers:
Refer to SPI, I2C interfaces init function to understand required implementation.
The main requirements for LCD display to use it with this library are:
Each byte, sent to LCD, represents 8 vertical pixels After sending each byte LCD controller shifts GDRAM pointer to the right by 1 pixel LCD width should not exceed 128 pixels
To add new LCD type to the library, implement GDRAM address positioning functions and initialization function for you LCD:
Refer to SH1106 intialization implementation as reference code.