Module – ST7920 – 128×64 LCD Display



Dit is een 12864 128 x 64 pixel LCD-scherm met een blauwe achtergrondverlichting en witte voorgrond. Het scherm is volledig programmeerbaar en kan een combinatie van afbeeldingen en tekst weergeven.
– Controller: ST7920
– Serieel en parallel (8bits) aan te sturen, oa. d.m.v. SPI met een Arduino
– Werkt op 5V.
Meer informatie (ENG)
When you start writing your own code/library for a device, the first place to look is the device datasheet. ST7920 is a chip manufactured by Sitronix and has support for Chinese alphabet. Don’t worry, it can display also the English alphabet with 8×16 characters.
This is enough for most users and keep in mind that while you are in graphic mode, you can draw any character you want, anywhere on the display. In text mode, the LCD has 4 rows of 16 characters.
According to datasheet, SPI clock cycle should be at least 600ns. This means a maximum frequency of 1.66 MHz. However, I couldn’t get output on display with frequencies higher than 400 kHz. I don’t know if it’s ATmega328 or ST7920 fault.



Bij deze versie van het display is de communicatie standaard op PARALLEL gezet, wil je seriële gegevensoverdracht gebruiken?, soldeer dan de weerstanden R9 en R11 eraf.

Informatie (ENG)
The reason is, VDD is actually connected to PSB through the 0Ω resistors (R9 and R11), making PSB always HIGH, putting the LCD always in parallel bus mode. Connecting GND to this could end badly to your LCD and Arduino as you are basically connecting 5V to GND directly. So, just de-solder it. Don’t worry, you can still connect it in parallel bus mode by connecting PSB to 5V.


Bij deze versie van het display kan je door middel van de S(erial) en P(arallel) Jumperbrug JP2 seriële of parallelle communicatie instellen, maar dit hoeft niet, want je kan dit “selecteren” door Pin PSB laag te maken voor seriële overdracht.




Sluit de module aan volgens onderstaand overzicht (Seriële modus SPI):


Script #1, met U8GLIB v1.x


Script #2, met U8GLIB v2.x


Arduino Library

Installatie van Arduino IDE libraries: Arduino info


A graphics library with support for many different monochrome displays.


U8g2: Library for monochrome displays, version 2

U8g2 is a monochrome graphics library for embedded devices. U8g2 supports monochrome OLEDs and LCDs, which include the following controllers: SSD1305, SSD1306, SSD1309, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1108, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1701, ST7565, ST7567, ST7588, ST75256, NT7534, IST3020, ST7920, LD7032, KS0108, SED1520, SBN1661, IL3820, MAX7219 (see here for a full list).

The Arduino library U8g2 can be installed from the library manager of the Arduino IDE. U8g2 also includes U8x8 library:

  • U8g2
    • Includes all graphics procedures (line/box/circle draw).
    • Supports many fonts. (Almost) no restriction on the font height.
    • Requires some memory in the microcontroller to render the display.
  • U8x8
    • Text output only (character) device.
    • Only fonts allowed with fit into a 8×8 pixel grid.
    • Writes directly to the display. No buffer in the microcontroller required.