STN (Super-Twist Nematic) LCD
STN (Super-Twist Nematic) LCD
20 characters x 4 lines
5x8 dots
Green backlight
HD44780U
8-bit parallel
Synchronous serial data transfer
5V
Typically 12mA (depending on backlight usage)
98.0mm x 60.0mm x 14.5mm
45g
16-pin single-row header (0.1" pitch)
-20C to 70C
-30C to 80C
5% to 95% relative humidity (non-condensing)
Wide viewing angle (50)
| High contrast ratio (5 | 1 typical) |
Fast response time (30ms typical)
Applications
| The 20x4 LCD Module (Green) is suitable for a wide range of applications, including |
IoT devices and sensors
Robotics and automation projects
Home automation systems
Industrial control systems
Medical devices and equipment
consumer electronics and appliances
Technical Resources
For detailed technical information, please refer to the datasheet and user manual provided with the module. Additionally, sample code and libraries for various microcontrollers and development boards are available online to facilitate easy integration and development.
20x4 LCD Module (Green) DocumentationOverviewThe 20x4 LCD Module (Green) is a widely used display component in IoT projects, offering a 20-character, 4-line display with a green backlight. This module is compatible with various microcontrollers and is ideal for displaying text-based information in a compact format.Technical SpecificationsDisplay Type: ST7066U LCD Controller
Display Size: 20 characters x 4 lines
Backlight Color: Green
Interface: 8-bit or 4-bit parallel interface
Power Supply: 5V
Operating Temperature: -20C to 70C
Storage Temperature: -30C to 80CPinoutThe 20x4 LCD Module (Green) has a standard 16-pin interface:| Pin No. | Pin Name | Function |
| --- | --- | --- |
| 1 | VSS | Ground (0V) |
| 2 | VCC | Power Supply (5V) |
| 3 | VE | Contrast Voltage |
| 4 | RS | Register Select (High: Data, Low: Instruction) |
| 5 | R/W | Read/Write (High: Read, Low: Write) |
| 6 | EN | Enable (High: Enable, Low: Disable) |
| 7-10 | DB0-DB3 | 4-bit Data Bus (Low nibble) |
| 11-14 | DB4-DB7 | 4-bit Data Bus (High nibble) |
| 15 | BLA | Backlight Anode |
| 16 | BLK | Backlight Cathode |Example Code### Example 1: Arduino UnoThis example demonstrates how to use the 20x4 LCD Module (Green) with an Arduino Uno board to display a scrolling message.```cpp
#include <LiquidCrystal.h>// Define the LCD pins
const int rs = 12;
const int en = 11;
const int d4 = 5;
const int d5 = 4;
const int d6 = 3;
const int d7 = 2;LiquidCrystal_I2C lcd(rs, en, d4, d5, d6, d7);void setup() {
lcd.begin(20, 4); // Initialize the LCD
lcd.setCursor(0, 0); // Set the cursor to the top-left corner
}void loop() {
lcd.print("Hello, World! ");
delay(500);
lcd.setCursor(0, 0);
lcd.print("Scrolling message... ");
delay(500);
}
```### Example 2: Raspberry Pi (Python)This example demonstrates how to use the 20x4 LCD Module (Green) with a Raspberry Pi board to display system information.```python
import RPi.GPIO as GPIO
import time# Define the LCD pins
LCD_RS = 7
LCD_EN = 8
LCD_D4 = 25
LCD_D5 = 24
LCD_D6 = 23
LCD_D7 = 18GPIO.setmode(GPIO.BCM)
GPIO.setup(LCD_RS, GPIO.OUT)
GPIO.setup(LCD_EN, GPIO.OUT)
GPIO.setup(LCD_D4, GPIO.OUT)
GPIO.setup(LCD_D5, GPIO.OUT)
GPIO.setup(LCD_D6, GPIO.OUT)
GPIO.setup(LCD_D7, GPIO.OUT)def lcd_init():
GPIO.output(LCD_EN, GPIO.HIGH)
time.sleep(0.05)
GPIO.output(LCD_EN, GPIO.LOW)
time.sleep(0.05)def lcd_write(data):
GPIO.output(LCD_RS, GPIO.HIGH)
GPIO.output(LCD_D4, GPIO.HIGH if (data & 0x10) else GPIO.LOW)
GPIO.output(LCD_D5, GPIO.HIGH if (data & 0x20) else GPIO.LOW)
GPIO.output(LCD_D6, GPIO.HIGH if (data & 0x40) else GPIO.LOW)
GPIO.output(LCD_D7, GPIO.HIGH if (data & 0x80) else GPIO.LOW)
GPIO.output(LCD_EN, GPIO.HIGH)
time.sleep(0.05)
GPIO.output(LCD_EN, GPIO.LOW)
time.sleep(0.05)lcd_init()while True:
lcd_write(0x80) # Set cursor to top-left corner
lcd_write(0x01) # Clear display
lcd_write(0x80 + 0) # Set cursor to top-left corner
lcd_write(ord('U')) # Display 'U'
lcd_write(ord('p')) # Display 'p'
lcd_write(ord('t')) # Display 't'
lcd_write(ord('i')) # Display 'i'
lcd_write(ord('m')) # Display 'm'
lcd_write(ord('e')) # Display 'e'
lcd_write(0x80 + 1) # Set cursor to second line
lcd_write(ord('R')) # Display 'R'
lcd_write(ord('a')) # Display 'a'
lcd_write(ord('s')) # Display 's'
lcd_write(ord('p')) # Display 'p'
lcd_write(ord('b')) # Display 'b'
lcd_write(ord('e')) # Display 'e'
lcd_write(ord('r')) # Display 'r'
lcd_write(ord('r')) # Display 'r'
lcd_write(ord('y')) # Display 'y'
time.sleep(1)
```Please note that these examples are for demonstration purposes only and may require modifications to suit your specific project requirements.