You are here

JAL library for the SSD1306 graphic display module

The JAL library glcd_ssd1306.jal supports the graphic display module using the SSD1306 display controller with a resolution of 128 pixels horizontal and 64 pixels vertical. Text and graphics can be shown on the display where for text the JAL font libraries are used. For the graphics features, the JAL glcd_common.jal library is used.

This module comes in 2 variants, an IIC version and an SPI version. The library supports both versions by setting certain constants in the main program. Next to that the use of hardware IIC or software IIC/ hardware SPI or software SPI can be set by the main program.

The module operates on 3.3 Volt but according to the supplier it also works well on 5 Volt. The latter is a bit surprising since the absolute maximum Voltage of the SSD1306 IC is 4 Volt. It may therefore be safe to use the module on 3.3 Volt.

The total memory of the display controller is 128 * (64 / 8) = 1024 bytes. Since this memory can only be written via the IIC or SPI interface a local copy has to be maintained in the PIC when using the graphics features. For text only use this is local copy is not needed. By using a setting in the main program, the text only feature can be activated. This makes it possible to use the library by PICs with a limited data memory space. When using the graphics features the PIC must have a free data space of at least 1024 bytes.

Two sample programs are delivered with the library showing all features:
• 16f1825_glcd_ssd1306_font.jal. This library shows all module features for text only use
• 16f18857_glcd_ssd1306_font_graphics.jal. This library shows all module features for text and graphics

The following video demonstrates all text and graphics features of the module and the library using the 16f18857_glcd_ssd1306_font_graphics.jal sample program: https://youtu.be/Tx-RCtyAqUk