Tested on NHD-2.8-25664UCB2: 256 x 64 pixels, 16 shades. Other displays with ssd1322 controller should also work.
This repo demonstrates the ssd1322 display driver on hardware (CMODA7). It's secondary use is to develop the GUI and GUI library for the AR analog chassis.
The actual re-usable library files are in firmware/lib
. Everything else is just for demonstration / testing.
- draw pixel
- draw rectangle (outline or filled)
- draw line (anti aliased)
- draw text (anti aliased, variable or fixed width bitmap fonts, UTF-8 support, emojis!)
The font engine is a stripped down version of the one used in LVGL.
Only 4 bit / pixel, no kerning, no compression, no bidirectional mode.
The LVGL Font Converter can be used to generate a .c
file with custom font data.
The demo app can be previewed and developed on a PC using the SDL library for graphics output. See sdl_sim/test.c
.
See psu_board_gui.c
for a practical example on how to use this library to draw a GUI.
See cmod/synth
directory for a synthesizable demo which runs on the Cmod A7 + ui_board.
It demonstrates drawing to the display, setting the LED color and reading the rotary encoder.
This assumes the ui_board is directly, without cable, plugged into the Cmod A7 PMOD header.
OLED Display Driver (oled) Copyright (c) 2025, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at [email protected].
NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.