pimoroni-pico/drivers/st7567
Gee Bartlett 4f4b0b277c updated readme's 2022-11-07 18:07:48 +00:00
..
CMakeLists.txt started on converting pico display demo 2022-09-29 12:01:35 +01:00
README.md updated readme's 2022-11-07 18:07:48 +00:00
st7567.cmake Review of GfxPack code 2022-11-07 12:50:50 +00:00
st7567.cpp Review of GfxPack code 2022-11-07 12:50:50 +00:00
st7567.hpp Review of GfxPack code 2022-11-07 12:50:50 +00:00

README.md

ST7567 Display Driver for Pimoroni LCDs

The ST7567 driver supports Serial (SPI) ST7567 displays and is intended for use with:

  • Pico GFX Pack

Setup

Construct an instance of the ST7567 driver with SPI pins.

SPI:

ST7567 st7567(WIDTH, HEIGHT, {
    PIMORONI_SPI_DEFAULT_INSTANCE, // SPI instance
    SPI_BG_FRONT_CS,               // Chip-select
    SPI_DEFAULT_SCK,               // SPI Clock
    SPI_DEFAULT_MOSI,              // SPI Out
    PIN_UNUSED,                    // SPI In
    SPI_DEFAULT_DC,                // SPI Data/Command
    PIN_UNUSED                     // Backlight
});

Reference

Update

ST7567's update accepts an instance of PicoGraphics in 1 bit colour mode:

st7567.update(&graphics);

Set Backlight

If a backlight pin has been configured, you can set the backlight from 0 to 255:

st7567.set_backlight(128)