# 12864 graphic LCD (ST7920): specs and pinout

> A 128 x 64 monochrome graphic LCD module that uses the ST7920 controller, which offers 8-bit, 4-bit and serial interfaces and a built-in character ROM.

[HTML version](https://soldr.ai/docs/components/st7920-12864-lcd)

[Docs](https://soldr.ai/docs) / [Components](https://soldr.ai/docs/components)

A 128 x 64 monochrome graphic LCD module that uses the ST7920 controller, which offers 8-bit, 4-bit and serial interfaces and a built-in character ROM.

Every value cites its sourceChip-level pinout

[Buy on Compoden](https://compoden.com/products/12864b-st7920-graphic-lcd-blue)

## Specs

| Spec | Value | Source |
|---|---|---|
| Operating voltage VDD | 2.7 V to 5.5 V | source Main Features (p.1); DC Characteristics (p.38-39) |
| Host interface | 8-bit parallel, 4-bit parallel or serial; pin PSB selects (0 = serial, 1 = parallel) | source Main Features (p.1); Pin Description (p.7) |
| Graphic display RAM | 64 x 256 bits (GDRAM) | source Main Features (p.1) |
| Drive capacity | 32 commons x 64 segments on the chip, extendable with the ST7921 segment driver | source Main Features (p.1); General description |
| LCD drive voltage V0 to VSS | 3.0 V to 7 V | source DC Characteristics (p.38-39) |
| Input high level | 0.7 x VDD min (inputs other than OSC1) | source DC Characteristics (p.38-39) |
| Absolute maximum VDD | -0.3 V to +6.0 V | source Absolute Maximum Ratings (p.37) |
| Operating temperature | -30 C to +85 C | source Absolute Maximum Ratings (p.37); DC Characteristics (p.38) |
| Built-in character ROM | 8192 Chinese characters (16x16) and 126 half-width characters (16x8) | source Main Features (p.1) |

## Power

| | Value | Source |
|---|---|---|
| Supply | Controller VDD 2.7-5.5 V. Backlight and contrast circuit of the module are not covered. | source DC Characteristics (p.38-39) |

## Chip pins
These are the pins of the chip on the module, from the chip datasheet. The module's own header may label or expose them differently.

These are ST7920 chip pins. The 12864B module board (header labels, contrast control, backlight pins) is not covered by an official document.

| Pin | Function | Voltage | Notes | Source |
|---|---|---|---|---|
| XRESET | System reset input, active low | | | source Pin Description (p.7) |
| PSB | Interface selection: 0 = serial mode, 1 = 8/4-bit parallel bus mode | | | source Pin Description (p.7) |
| RS(CS*) | Parallel mode: register select. Serial mode: chip select (1 = enabled) | | | source Pin Description (p.7) |
| RW(SID*) | Parallel mode: read/write control (0 write, 1 read). Serial mode: serial data input | | | source Pin Description (p.7) |
| E(SCLK*) | Parallel mode: enable trigger. Serial mode: serial clock | | | source Pin Description (p.7) |
| D0 to D3, D4 to D7 | Data bus; D4-D7 alone are used in 4-bit mode | | | source Pin Description (p.7) |
| VDD | Power supply | 2.7-5.5 V | | source Pin Description (p.8) |
| Vss | Ground | 0 V | | source Pin Description (p.8) |
| V0 to V4 | LCD bias voltage | Up to 7 V | | source Pin Description (p.8) |

## Build with it
Project ideas for the 12864 graphic LCD (ST7920). Each link opens Soldr with the prompt filled in; Soldr assigns the pins, checks power and shows how to wire every part.

- [Uno sensor panel](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20temperature%20and%20humidity%20panel%20with%20an%20Arduino%20Uno%20compatible%20board%2C%20a%20DHT22%20sensor%20and%20a%20128x64%20graphic%20LCD): The ST7920 chip accepts a 5 V supply and logic, matching the Uno; check the backlight resistor and the PSB jumper on your module before powering it.
- [Graphic clock](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20graphic%20clock%20with%20an%20Arduino%20Uno%20compatible%20board%2C%20a%20DS3231%20real-time%20clock%20module%20and%20a%20128x64%20graphic%20LCD): Serial mode keeps the number of wires low (PSB low selects serial); check the backlight resistor and the PSB jumper on your module.
- [ESP32 status screen (only if your module is rated for 3.3 V)](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20status%20screen%20with%20an%20ESP32%20and%20a%20128x64%20graphic%20LCD): Only if your module is rated for 3.3 V: whether this module&#x27;s contrast circuit (V0 / pot) and LED backlight work at 3.3 V is not documented, and the ST7920 DC table differs between 2.7-4.5 V and 4.5-5.5 V. At 3.3 V the ESP32 outputs meet the 0.7 x VDD input level; at 5 V module supply they would not. Check the backlight resistor and PSB jumper first.

## Common mistakes

- Leaving PSB in the wrong state: PSB low selects serial mode, PSB high selects 8/4-bit parallel mode, so the wiring and the library mode must match ([source](https://support.newhavendisplay.com/hc/en-us/article_attachments/4414880470295))
- Driving a controller powered at 4.5-5.5 V from a 3.3 V board: the input high level is at least 0.7 x VDD (3.15 V at 4.5 V, 3.5 V at 5 V), so 3.3 V outputs are marginal or too low; power the module at 3.3 V or shift the levels ([source](https://support.newhavendisplay.com/hc/en-us/article_attachments/4414880470295))
- Assuming the module header matches the chip pin names: these are chip pin names only and the module header is not covered by an official document, so check the silkscreen before wiring (source: [link](https://support.newhavendisplay.com/hc/en-us/article_attachments/4414880470295), Pin Description p.7-8)

## Not covered by the official source

- Module board (12864B V2.0): header order, contrast pot, backlight resistor and 3.3 V/5 V behaviour are not documented by an official source.
- The datasheet is a Newhaven Display copy of the unmodified Sitronix V4.0 specification.
- No supply current value is quoted.
- Page numbers refer to the 49-page PDF footer.

## Sources

- [link](https://support.newhavendisplay.com/hc/en-us/article_attachments/4414880470295) (Sitronix ST7920 specification V4.0, 2008/08/18)
