LCD Display 128×64, ST7920, Connection Test

The 128×64 resolution blue-white graphic LCD module is slightly better for many projects compared to character LCD displays. Here, I note simple information on how to connect it to an Arduino to test the LCD functionality. The LCD-207 module, which we are discussing, is quite easy to use with Arduino. We will simply connect it in SPI mode:

  • BLK <-> GND
  • BLA <-> 3.3V
  • VSS <-> GND
  • VDD <-> 5V
  • PSB <-> GND
  • E <-> D13 (SCK)
  • R/W <-> D11 (MOSI)
  • RS <-> D10 (CS)
  • RST <-> D8

Now, to test it, we will upload a sample sketch. Install the U8g2 library (project wiki here). Let’s try uploading the example from Examples/U8g2/games/SpaceTrash. The program is ready; you just need to properly define the display object. There are over a hundred ready-made patterns for different modules. When connecting to SPI, the proper initialization should look like this:

U8G2_ST7920_128X64_1_HW_SPI u8g2(U8G2_R0, /* CS=/ 10, / reset=*/ 8);

Find this line and uncomment it or copy and paste it. Compile and upload. The result should be similar to the one in the photo.

If you look closely at the photo, you will notice that the LCD has additional connectors. Some time ago, part of the LCD-207 modules had them – these are the SPI connector (at the bottom right) and all the connectors brought out at the top in the form of a double row (you can use an IDC socket). That was one shipment; now all LCDs have connectors/appearance as in the product photos.