Stufin
Home Quick Cart Profile

JHD 128x64 Graphic LCD -Blue Backlight

Buy Now on Stufin

Component Name

JHD 128x64 Graphic LCD - Blue Backlight

Category

Display Modules

Description

The JHD 128x64 Graphic LCD with Blue Backlight is a compact and versatile display module designed for use in various embedded systems, industrial control applications, and IoT devices. This graphic LCD module features a high-resolution 128x64 pixel display, a built-in blue backlight, and a robust set of interfaces for seamless integration with microcontrollers and other electronic components.

Functionality

The JHD 128x64 Graphic LCD is designed to display graphical and textual information in a compact form factor, making it an ideal choice for a wide range of applications, including

Industrial control systems

Medical devices

Home appliances

IoT devices

Robotics and automation

Gaming and entertainment systems

Key Features

### Display Specifications

Resolution

128x64 pixels

Display Type

Graphic LCD (STN, Positive)

Display Size

2.7 inches (diagonal)

Viewing Angle

60 (left and right), 40 (up and down)

Contrast Ratio

101

Response Time

20 ms

### Backlight Specifications

Color

Blue

Brightness

100 cd/m

Operating Life

10,000 hours (minimum)

### Interface and Communication

Interface Type

8-bit parallel interface

Communication Protocol

supports 8080/6800 compatible interfaces

Clock Frequency

up to 2 MHz

### Power and Operating Conditions

Operating Voltage

5V

Power Consumption

120 mA (maximum)

Operating Temperature

-20C to 70C

Storage Temperature

-30C to 80C

### Mechanical Characteristics

Module Size

74.5 mm x 42.5 mm x 13.0 mm

Weight

approximately 35 grams

Mounting

Through-hole mounting with 1.0 mm pitch

### Additional Features

Built-in controllerST7565R or equivalent

Supports graphics and text display

Supports adjustable contrast and brightness

Overall, the JHD 128x64 Graphic LCD with Blue Backlight provides a high-quality display solution for a wide range of applications, offering excellent visibility, low power consumption, and ease of integration with various electronic systems.

Pin Configuration

  • JHD 128x64 Graphic LCD - Blue Backlight Pinout Explanation
  • The JHD 128x64 Graphic LCD with blue backlight is a popular display module used in various IoT projects. It has a total of 20 pins, which are explained below:
  • Pins 1-4:
  • VSS (Pin 1): Ground pin, connects to the ground of the microcontroller or power supply.
  • VDD (Pin 2): Power supply pin, typically connects to a 5V power source.
  • VO (Pin 3): Contrast voltage pin, adjusts the display contrast. Typically connected to a potentiometer or a voltage divider.
  • Voled (Pin 4): Backlight voltage pin, connects to a 5V power source or a separate backlight driver.
  • Pins 5-12:
  • D0-D7 (Pins 5-12): 8-bit data bus pins, used for data transmission between the microcontroller and the display.
  • Pins 13-16:
  • RS (Pin 13): Register Select pin, used to select between command and data registers.
  • R/W (Pin 14): Read/Write pin, used to determine whether the microcontroller is reading from or writing to the display.
  • E (Pin 15): Enable pin, used to enable data transmission between the microcontroller and the display.
  • BLK (Pin 16): Backlight control pin, connects to a transistor or a relay to turn the backlight on/off.
  • Pins 17-20:
  • NC (Pins 17-20): No Connection pins, not used in this display module.
  • Connection Structure:
  • To connect the pins, follow this structure:
  • 1. Power Supply:
  • VSS (Pin 1) Ground
  • VDD (Pin 2) 5V Power Supply
  • Voled (Pin 4) 5V Power Supply or Backlight Driver
  • 2. Contrast Adjustment:
  • VO (Pin 3) Potentiometer or Voltage Divider
  • 3. Data Bus:
  • D0-D7 (Pins 5-12) Microcontroller Data Bus
  • 4. Control Signals:
  • RS (Pin 13) Microcontroller Register Select Signal
  • R/W (Pin 14) Microcontroller Read/Write Signal
  • E (Pin 15) Microcontroller Enable Signal
  • 5. Backlight Control:
  • BLK (Pin 16) Transistor or Relay (to control backlight on/off)
  • Note:
  • Make sure to check the datasheet for specific voltage and current requirements.
  • Use a level shifter or voltage divider if the microcontroller operates at a different voltage level than the display.
  • Implement proper decoupling and bypassing for the power supply pins.
  • Consult the display's datasheet for specific initialization and command sequences.

Code Examples

JHD 128x64 Graphic LCD - Blue Backlight Documentation
Overview
The JHD 128x64 Graphic LCD - Blue Backlight is a compact, high-contrast liquid crystal display designed for a variety of applications, including automotive, industrial, and consumer electronics. This display module features a 128x64 pixel resolution, blue backlight, and a standard ST7066U controller/driver. It communicates with external devices via a 4-bit or 8-bit parallel interface.
Technical Specifications
Display Size: 1.5 inches
 Resolution: 128x64 pixels
 Display Mode: STN (Super Twisted Nematic)
 Backlight: Blue LED
 Interface: 4-bit or 8-bit parallel
 Controller/Driver: ST7066U
 Operating Temperature: -20C to 70C
 Storage Temperature: -30C to 80C
Connection Diagram
The JHD 128x64 Graphic LCD - Blue Backlight module has the following pinout:
| Pin | Function |
| --- | --- |
| 1 | VCC (5V) |
| 2 | VEE (GND) |
| 3 | Vo (Contrast Voltage) |
| 4 | RS (Register Select) |
| 5 | RW (Read/Write) |
| 6 | EN (Enable) |
| 7-10 | DB4-DB7 (Data Bus) |
| 11-14 | DB0-DB3 (Data Bus) |
| 15 | BLK (Backlight Control) |
Code Examples
### Example 1: Basic Initialization and Display with Arduino
This example demonstrates how to initialize the JHD 128x64 Graphic LCD - Blue Backlight module and display a simple string using an Arduino board.
```c++
#include <Arduino.h>
#define LCD_RS 12
#define LCD_RW 11
#define LCD_EN 10
#define LCD_DB4 5
#define LCD_DB5 4
#define LCD_DB6 3
#define LCD_DB7 2
#define LCD_BACKLIGHT 9
void setup() {
  // Initialize LCD pins as outputs
  pinMode(LCD_RS, OUTPUT);
  pinMode(LCD_RW, OUTPUT);
  pinMode(LCD_EN, OUTPUT);
  pinMode(LCD_DB4, OUTPUT);
  pinMode(LCD_DB5, OUTPUT);
  pinMode(LCD_DB6, OUTPUT);
  pinMode(LCD_DB7, OUTPUT);
  pinMode(LCD_BACKLIGHT, OUTPUT);
// Initialize LCD
  lcdInit();
  lcdClear();
  lcdBacklight(true);
// Display a string
  lcdPrint("Hello, World!");
}
void loop() {
  // Do nothing
}
void lcdInit() {
  // Initialize LCD controller
  digitalWrite(LCD_RS, LOW);
  digitalWrite(LCD_RW, LOW);
  digitalWrite(LCD_EN, LOW);
  delayMicroseconds(20);
digitalWrite(LCD_EN, HIGH);
  delayMicroseconds(20);
  digitalWrite(LCD_EN, LOW);
  delayMicroseconds(20);
// Function set: 8-bit interface, 2 lines, 5x7 dots
  lcdCmd(0x38);
  // Display on, cursor off
  lcdCmd(0x0C);
  // Clear display
  lcdCmd(0x01);
}
void lcdClear() {
  // Clear display
  lcdCmd(0x01);
  delayMicroseconds(2000);
}
void lcdBacklight(boolean state) {
  digitalWrite(LCD_BACKLIGHT, state ? HIGH : LOW);
}
void lcdPrint(String str) {
  for (int i = 0; i < str.length(); i++) {
    lcdChar(str[i]);
  }
}
void lcdCmd(byte cmd) {
  digitalWrite(LCD_RS, LOW);
  digitalWrite(LCD_RW, LOW);
  digitalWrite(LCD_EN, LOW);
  lcdWrite(cmd);
  digitalWrite(LCD_EN, HIGH);
  delayMicroseconds(2);
  digitalWrite(LCD_EN, LOW);
}
void lcdChar(byte ch) {
  digitalWrite(LCD_RS, HIGH);
  digitalWrite(LCD_RW, LOW);
  digitalWrite(LCD_EN, LOW);
  lcdWrite(ch);
  digitalWrite(LCD_EN, HIGH);
  delayMicroseconds(2);
  digitalWrite(LCD_EN, LOW);
}
void lcdWrite(byte data) {
  digitalWrite(LCD_DB4, (data >> 4) & 0x01);
  digitalWrite(LCD_DB5, (data >> 5) & 0x01);
  digitalWrite(LCD_DB6, (data >> 6) & 0x01);
  digitalWrite(LCD_DB7, (data >> 7) & 0x01);
  delayMicroseconds(2);
}
```
### Example 2: Custom Graphics with Raspberry Pi (Python)
This example demonstrates how to initialize the JHD 128x64 Graphic LCD - Blue Backlight module and display a custom graphic using a Raspberry Pi board with Python.
```python
import RPi.GPIO as GPIO
import time
# Configure GPIO library
GPIO.setmode(GPIO.BCM)
# Define LCD pins
LCD_RS = 17
LCD_RW = 23
LCD_EN = 24
LCD_DB4 = 4
LCD_DB5 = 5
LCD_DB6 = 6
LCD_DB7 = 7
LCD_BACKLIGHT = 12
# Initialize LCD pins as outputs
GPIO.setup(LCD_RS, GPIO.OUT)
GPIO.setup(LCD_RW, GPIO.OUT)
GPIO.setup(LCD_EN, GPIO.OUT)
GPIO.setup(LCD_DB4, GPIO.OUT)
GPIO.setup(LCD_DB5, GPIO.OUT)
GPIO.setup(LCD_DB6, GPIO.OUT)
GPIO.setup(LCD_DB7, GPIO.OUT)
GPIO.setup(LCD_BACKLIGHT, GPIO.OUT)
# Initialize LCD controller
GPIO.output(LCD_RS, GPIO.LOW)
GPIO.output(LCD_RW, GPIO.LOW)
GPIO.output(LCD_EN, GPIO.LOW)
time.sleep(0.02)
GPIO.output(LCD_EN, GPIO.HIGH)
time.sleep(0.02)
GPIO.output(LCD_EN, GPIO.LOW)
time.sleep(0.02)
# Function set: 8-bit interface, 2 lines, 5x7 dots
lcdCmd(0x38)
# Display on, cursor off
lcdCmd(0x0C)
# Clear display
lcdCmd(0x01)
# Create a custom graphic (5x7 pixels)
graphic = [
  0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x18, 0x18, 0x18, 0x00,
  0x00, 0x18, 0x0C, 0x18, 0x00,
  0x00, 0x18, 0x06, 0x18, 0x00,
  0x00, 0x18, 0x18, 0x18, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00
]
# Display the graphic
for i in range(0, 5):
  lcdCmd(0x80 + i)
  for j in range(0, 5):
    lcdData(graphic[i  5 + j])
# Define LCD commands and data functions
def lcdCmd(cmd):
  GPIO.output(LCD_RS, GPIO.LOW)
  GPIO.output(LCD_RW, GPIO.LOW)
  lcdWrite(cmd)
  GPIO.output(LCD_EN, GPIO.HIGH)
  time.sleep(0.002)
  GPIO.output(LCD_EN, GPIO.LOW)
def lcdData(data):
  GPIO.output(LCD_RS, GPIO.HIGH)
  GPIO.output(LCD_RW, GPIO.LOW)
  lcdWrite(data)
  GPIO.output(LCD_EN, GPIO.HIGH)
  time.sleep(0.002)
  GPIO.output(LCD_EN, GPIO.LOW)
def lcdWrite(data):
  GPIO.output(LCD_DB4, (data >> 4) & 0x01)
  GPIO.output(LCD_DB5, (data >> 5) & 0x01)
  GPIO.output(LCD_DB6, (data >> 6) & 0x01)
  GPIO.output(LCD_DB7, (data >> 7) & 0x01)
  time.sleep(0.002)
# Backlight control
GPIO.output(LCD_BACKLIGHT, GPIO.HIGH)
# Clean up
GPIO.cleanup()
```
These examples demonstrate the basic usage of the JHD 128x64 Graphic LCD - Blue Backlight module in different contexts. You can modify and expand upon these examples to suit your specific application requirements.