Files
lcd1602atest/README.md
DESKTOP-PUHFO60\dsx2016 a4c7d54d3e Add LCD1602A I2C test with SoftSPI touch and LVGL.
PCF8574 backpack on SDA=GPIO22/SCL=GPIO27, demo/hello/clear/backlight UI, and flashable firmware/cyd package.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 14:25:53 +08:00

53 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# LCD1602A 液晶(CYD)
触控 + LVGL 参考 `tftest` / `hw269test` / `hw069digitdisplaytest`。
LCD1602A(HD44780)经 **PCF8574 I2C 转接板** 驱动:改两行文字、清屏、背光。
## 硬件
| 项目 | 说明 |
|------|------|
| 板子 | CYD ESP32-2432S028R |
| 模块 | LCD1602A + I2C 背包(PCF8574,常见地址 **0x27 / 0x3F**) |
| SDA | **GPIO22** |
| SCL | **GPIO27** |
接线:
| LCD1602A(I2C) | CYD |
|---------------|-----|
| VCC | **5V**(屏对比度更稳;多数模块也可试 3.3V) |
| GND | GND |
| SDA | GPIO22 |
| SCL | GPIO27 |
上电会扫描 `0x27 / 0x3F / 0x26 / 0x3E`。串口与 TFT 状态栏会显示是否找到地址。
## 操作
- 中间两行:当前 LCD 内容预览(16 字符/行)
- **Demo**:循环示例文案
- **Hello**:`Hello World!` / `LCD1602A`
- **Clear**:清屏
- **BL ON/OFF**:背光开关
## 构建 / 烧录
```powershell
pio run -e cyd -t upload
```
## 预编译固件
```powershell
cd firmware\cyd
.\flash.ps1
# 或 .\flash.ps1 -Port COMx
```
重新导出:
```powershell
.\firmware\export_from_build.ps1
```