Skip to product information
1 of 2

Blue PCB Electronics

1C8B 5V 12x864 LCD Display Module 128x64 Dots Graphic Matrix LCD Blue

1C8B 5V 12x864 LCD Display Module 128x64 Dots Graphic Matrix LCD Blue

Regular price Dhs. 40.00
Regular price Sale price Dhs. 40.00
Sale Sold out
View full details

Description:

The ST7920 is a popular graphical LCD display that features a screen size of 128x64 pixels, providing a resolution that is suitable for displaying both text and graphics. The display is designed to be easy to use and offers a range of features that make it ideal for use in a wide range of electronic devices and applications. The ST7920 graphical LCD can be connected to a system using an 8-bit parallel interface or a 4-wire serial peripheral interface (SPI), which offers flexibility and ease of integration with a wide range of microcontrollers and other embedded systems. The display supports multiple display modes, including text mode, graphics mode, and mixed mode, which allows for a combination of both text and graphics. The ST7920 graphical LCD features an adjustable backlight, which allows for easy visibility in different lighting conditions. It also has a high contrast ratio, which provides clear and easy-to-read text and graphics. The display has a built-in character generator, which allows for easy creation of custom characters and symbols. The ST7920 graphical LCD has low power consumption, making it ideal for use in battery-powered devices. It can operate in a wide temperature range, making it suitable for use in both indoor and outdoor environments. The display is also durable and reliable, making it ideal for use in industrial applications and harsh environments.

Features:

  1. Screen Size: The ST7920 graphical LCD supports a screen size of 128x64 pixels, providing a resolution that is suitable for displaying graphical content.
  2. Communication Interfaces: The display can be connected to a system using either an 8-bit parallel interface or a 4-wire serial peripheral interface (SPI), which offers flexibility and ease of integration with a wide range of microcontrollers and other embedded systems.
  3. Display Modes: The ST7920 graphical LCD supports multiple display modes, including text mode, graphics mode, and mixed mode, which allows for a combination of both text and graphics.
  4. Backlight Control: The display features an adjustable backlight, which allows for easy visibility in different lighting conditions.
  5. Low Power Consumption: The ST7920 graphical LCD has low power consumption, making it ideal for use in battery-powered devices.
  6. High Contrast Ratio: The display has a high contrast ratio, which provides clear and easy-to-read text and graphics.
  7. Built-in Character Generator: The ST7920 graphical LCD has a built-in character generator, which allows for the easy creation of custom characters and symbols.
  8. Wide Operating Temperature Range: The display can operate in a wide temperature range, making it suitable for use in both indoor and outdoor environments.
 
Package Included:
  • 1 x 12864 LCD Display Module

Pinout of the Module:

 

  1. VSS: Ground
  2. VDD: Power supply (5V or 3.3V)
  3. VO: Contrast adjustment
  4. RS: Register to select (0 for instruction, 1 for data)
  5. R/W: Read/write (0 for write, 1 for read)
  6. E: Enable signal for the LCD controller
  7. PSB: Parallel/SPI mode select (0 for parallel, 1 for SPI)
  8. DB0: Data bus bit 0 (LSB)
  9. DB1: Data bus bit 1
  10. DB2: Data bus bit 2
  11. DB3: Data bus bit 3
  12. DB4: Data bus bit 4
  13. DB5: Data bus bit 5
  14. DB6: Data bus bit 6
  15. DB7: Data bus bit 7 (MSB)
  16. CS1: Chip select 1 for parallel mode, or SPI chip select for SPI mode
  17. CS2: Chip select 2 for parallel mode, or NC for SPI mode
  18. RST: Reset signal for the LCD controller
  19. LED-A: Anode for LED backlight
  20. LED-K: Cathode for LED backlight

Circuit:

  • Connect RS, RW, and E pins of the LCD to Digital IO pins 10, 11, and 13 of Arduino UNO
  • Connect PCB pin to GND to select the Serial Interface Mode
  • Connect VCC and GND to 5V and ground of the power supply respectively
  • Connect VO to the wiper of a 10KΩ POT, and connect the other two terminals of the POT to 5V and GND respectively
  • Connect BLA to 5V and BLK to GND to illuminate the LCD with a backlight
  • Note that the backlight color in this specific LCD is blue, but white and green are also common.


Library: 

You can install the U8g2lib library in your Arduino IDE by following these steps:

  1. Open the Arduino IDE and go to "Sketch" menu > "Include Library" > "Manage Libraries".
  2. In the Library Manager, search for "U8g2" in the search bar.
  3. Select the "U8g2 by Oliver" library from the search results and click on the "Install" button.
  4. Wait for the installation to complete.
  5. Once the installation is finished, you can include the library in your code by going to "Sketch" menu > "Include Library" > "U8g2".


Code:

This code is an example of how to use the U8g2lib library with an Arduino board. The U8g2lib is a graphics library for monochrome displays, and it provides a set of functions to draw shapes, text, and images on these displays.


#include "Arduino.h"
#include "U8g2lib.h"

#ifdef U8X8_HAVE_HW_SPI
#include "SPI.h"
#endif
#ifdef U8X8_HAVE_HW_I2C
#include "Wire.h"
#endif

// 'TheOffice', 128x64px
static const unsigned char myBitmap [] PROGMEM = {

   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   0xff, 0xff, 0xff, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x06, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7,
   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff,
   0xff, 0xff, 0xff, 0x9f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0,
   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0xb0,
   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3f, 0x00,
   0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x08, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xb0,
   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x7f, 0x00,
   0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x08, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xb0,
   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, 0x7f, 0x00,
   0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x08, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x08, 0xf8, 0xff, 0x07, 0x00, 0x00, 0x7c, 0xb0,
   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf8, 0xff, 0x07,
   0x00, 0x00, 0xfe, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x08, 0xf8, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xb0, 0x01, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x08, 0xf8, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xb0,
   0x81, 0xff, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf8, 0xff, 0x0f,
   0x00, 0x00, 0xfe, 0xb0, 0x81, 0xff, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x08, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0xfe, 0xb0, 0x81, 0xff, 0x1d, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x08, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0xfe, 0xb0,
   0x01, 0x38, 0xdc, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xfc, 0xff, 0x0f,
   0x00, 0x00, 0x7c, 0xb0, 0x01, 0x38, 0xfc, 0xf3, 0x03, 0x00, 0x00, 0x00,
   0x08, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0x38, 0xb0, 0x01, 0x38, 0xfc, 0xfb,
   0x07, 0x00, 0x00, 0x00, 0x08, 0xfc, 0xff, 0x0f, 0x00, 0x00, 0xfc, 0xb0,
   0x01, 0x38, 0x9c, 0x3b, 0x07, 0x00, 0x00, 0x00, 0x08, 0xfc, 0xff, 0x07,
   0x00, 0x00, 0xfe, 0xb0, 0x01, 0x38, 0x9c, 0xfb, 0x07, 0x00, 0x00, 0x00,
   0x08, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xb7, 0x01, 0x38, 0x9c, 0xfb,
   0x07, 0x00, 0x00, 0x00, 0x08, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xb7,
   0x01, 0x38, 0x9c, 0x3b, 0x07, 0x00, 0x00, 0x00, 0x08, 0xfc, 0xff, 0x07,
   0x00, 0x00, 0xfe, 0xb7, 0x01, 0x38, 0x9c, 0xfb, 0x07, 0x00, 0x00, 0x00,
   0x08, 0xfe, 0xff, 0x07, 0x00, 0x00, 0xff, 0xb7, 0x01, 0x38, 0x9c, 0xf3,
   0x03, 0x00, 0x00, 0x00, 0x08, 0xfe, 0xff, 0x07, 0x00, 0x80, 0xff, 0xb7,
   0x01, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xff, 0xff, 0x00,
   0x00, 0xc0, 0xff, 0xb6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xc8, 0xff, 0xff, 0x00, 0x00, 0xe0, 0xff, 0xb6, 0x01, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0xc8, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xff, 0xb6,
   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xff, 0xff, 0x00,
   0xc0, 0xff, 0xff, 0xb6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xc8, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0xb6, 0x01, 0xf8, 0x07, 0xbe,
   0xff, 0x00, 0x00, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xe0, 0x7f, 0xff, 0xb7,
   0x01, 0xfc, 0x1f, 0xbf, 0xff, 0x00, 0x00, 0x00, 0xc8, 0xff, 0xff, 0xfc,
   0xff, 0x0f, 0xff, 0xb7, 0x01, 0xfe, 0x1f, 0xbf, 0xff, 0x00, 0x00, 0x00,
   0xc8, 0xff, 0xff, 0xfc, 0xff, 0xef, 0xff, 0xb7, 0x01, 0x1f, 0x3e, 0x8f,
   0x03, 0x00, 0x00, 0x00, 0xc8, 0xff, 0xff, 0xc0, 0x01, 0xfe, 0xff, 0xb7,
   0x01, 0x0f, 0xbc, 0xff, 0xef, 0xf0, 0x87, 0x1f, 0xc8, 0xff, 0xff, 0xc0,
   0x01, 0xff, 0xff, 0xb7, 0x01, 0x0f, 0xbc, 0xff, 0xef, 0xf8, 0xcf, 0x3f,
   0xc8, 0xff, 0xff, 0xc0, 0x01, 0xff, 0xff, 0xb7, 0x01, 0x0f, 0xb8, 0xff,
   0xef, 0xfc, 0xef, 0x3f, 0xc8, 0xff, 0xff, 0xc0, 0x01, 0xff, 0x7f, 0xb7,
   0x01, 0x0f, 0x38, 0x8f, 0xe3, 0x3c, 0xef, 0x79, 0x08, 0xc0, 0x7f, 0xc0,
   0x81, 0xff, 0x1f, 0xb7, 0x01, 0x0f, 0x3c, 0x8f, 0xe3, 0x3c, 0xe0, 0x7f,
   0x08, 0xc0, 0x7f, 0xc0, 0x81, 0xef, 0xff, 0xb7, 0x01, 0x0f, 0x3c, 0x8f,
   0xe3, 0x1c, 0xe0, 0x7f, 0x08, 0xc0, 0x7f, 0xc0, 0x81, 0xef, 0xff, 0xb7,
   0x01, 0x1f, 0x3c, 0x8f, 0xe3, 0x3c, 0xe6, 0x7f, 0x08, 0xc0, 0x7f, 0xc0,
   0x81, 0xe7, 0xff, 0xb7, 0x01, 0x3e, 0x3e, 0x8f, 0xe3, 0x3c, 0xef, 0x79,
   0x08, 0x80, 0x7b, 0xc0, 0xc1, 0x67, 0x00, 0xb7, 0x01, 0xfe, 0x1f, 0x8f,
   0xe3, 0xfc, 0xef, 0x7f, 0x08, 0x80, 0x33, 0xc0, 0xc1, 0x67, 0x00, 0xb7,
   0x01, 0xfc, 0x0f, 0x8f, 0xe3, 0xf8, 0xcf, 0x3f, 0x08, 0x00, 0x00, 0xc0,
   0xc1, 0x67, 0x00, 0xb7, 0x01, 0xf8, 0x07, 0x8f, 0xe3, 0xf0, 0xc7, 0x1f,
   0x08, 0x00, 0x00, 0xc0, 0xe1, 0x63, 0x00, 0xb7, 0x01, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0xc0, 0xe1, 0x63, 0x00, 0xb7,
   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0xc0,
   0xe1, 0x61, 0x00, 0xb7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x08, 0x00, 0x00, 0xc0, 0xe1, 0x61, 0x00, 0xb7, 0x01, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0xc0, 0xe1, 0x61, 0x00, 0xb7,
   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0xc0,
   0xe1, 0x60, 0x00, 0xb2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x03, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0,
   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xbc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0x06, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
   0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
   0xff, 0xff, 0xff, 0x7f
};


U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* CS=*/ 10, /* reset=*/ 8);


void draw(void)
{
  u8g2.drawXBMP( 0, 0, 128, 64, myBitmap);
}


void setup() 
{
  // put your setup code here, to run once:
  u8g2.begin();
  u8g2.clearBuffer();
}

void loop()
{
  // put your main code here, to run repeatedly:
  u8g2.firstPage();
  do
  {
    draw();
  }while(u8g2.nextPage());

  delay(1000);

}

 

The code includes the necessary header files for the Arduino board and the U8g2lib library. It also includes the SPI and Wire libraries, which are used to communicate with the display. The code defines a static array called myBitmap that contains the binary data of an image that will be displayed on the screen. The image is a monochrome bitmap that has a resolution of 128x64 pixels. The setup() function initializes the U8g2lib library, sets the font size, and clears the screen. The loop() function displays the image on the screen by calling the drawXBMP() function, which is a function provided by the U8g2lib library to draw a bitmap image on the screen. The image is displayed repeatedly on the screen as long as the Arduino board is powered on.