Skip to content

halbrd/st7920-lcd-arduino-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ST7920-chipset LCD with Arduino test

This is a proof of concept for controlling an LCD dot matrix with an Arduino. The screen displays a spinning line. The wiring is quite neat and the code, when properly abstracted, will be easy to work with.

spinning

Hardware

  • 128 x 64 LCD dot matrix display, with ST7920 chipset
  • Arduino board (Arduino Uno and Wemos D1 Mini were tested and are provided as examples)

Any 128 x 64 LCD that uses the ST7920 chipset should work interchangably with this code, and similar chipsets may work equally well if the constructor is modified accordingly.

Wiring

The wiring of the numerical pins (E, R/W, RS, RST) can be connected to whichever GPIO pins you wish - just change the pin definitions to match your setup. The ones provided here are (tested and recommended) examples. Obviously, the LCD pins that go to +5V/GND must go to those places.

LCD Uno D1 Mini
1 GND GND GND
2 VCC +5V +5V
4 RS 10 0 (labelled D3)
5 R/W 11 4 (labelled D2)
6 E 13 5 (labelled D1)
15 PSB GND GND
17 RST 8 2 (labelled D4)
19 BLA +5V +5V
20 BLK GND GND

Software

This code uses the u8g2 library. This needs to be installed for the code to run. To install it, open the Arduino IDE, and navigate to Sketch > Include Library > Manage Libraries..., then search for "u8g2" and install it.

These pages from the u8g2 documentation will likely be useful to varying degrees:

To Do

  • Replace absolute coordinates with values relative to screen size

Pictures

Arduino Uno

uno wiring

Wemos D1 Mini

d1 mini wiring

About

Controlling a 128x64 LCD with a ST7920 chipset using an Arduino

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%