add OTP data

This commit is contained in:
Shuanglei Tao
2025-02-14 19:32:01 +08:00
parent c64385ba67
commit e769133dd1
7 changed files with 183 additions and 3 deletions

View File

@@ -31,7 +31,7 @@
RAM16K RAM16K
ROM256K ROM256K
驱动UC8276C (EPD_4in2b_V2) 驱动UC8176 (EPD_4in2b_V2)
屏幕引脚0A0B0C0D0E0F10 屏幕引脚0A0B0C0D0E0F10
线圈引脚09 线圈引脚09
LED引脚03/04/05 (有三个 LED任选一个使用 LED引脚03/04/05 (有三个 LED任选一个使用
@@ -39,8 +39,6 @@
![](html/images/2.jpg) ![](html/images/2.jpg)
默认驱动和引脚映射为黑白双色版本,其它版本需要切换驱动并修改引脚映射。
## 上位机 ## 上位机
地址https://tsl0922.github.io/EPD-nRF51/ 地址https://tsl0922.github.io/EPD-nRF51/

Binary file not shown.

1
docs/OTP/3c.txt Normal file

File diff suppressed because one or more lines are too long

1
docs/OTP/bw.txt Normal file

File diff suppressed because one or more lines are too long

180
docs/README.md Normal file
View File

@@ -0,0 +1,180 @@
UC8176 的数据手册中不包含 LUT 相关指令的说明,但是 UC8151 的手册里有,且格式是一样的,故把 UC8151 的手册也放了上来。
OTP 目录为从屏幕中读取出的 OTP 数据:
- `bw.txt`: 黑白屏
- `3c.txt`: 黑白红三色屏
可从 OTP 数据中提取屏幕内置的 LUT 波形作为参考,以方便自定义 LUT 波形。
以下是从 OTP 中提取出的 LUT 波形例子(均已测试和本项目支持的 2 个屏幕不加载外部 LUT 时在 20 度左右室温下显示效果一致):
**黑白屏:**
```c
// OTP location: 0x300
static const unsigned char LUTC[] = {
0x60, 0x19, 0x19, 0x00, 0x00, 0x01,
0x00, 0x19, 0x19, 0x00, 0x00, 0x02,
0x00, 0x19, 0x00, 0x00, 0x00, 0x01,
0x00, 0x25, 0x26, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
};
static const unsigned char LUTWW[] = {
0x50, 0x19, 0x19, 0x00, 0x00, 0x01,
0x90, 0x19, 0x19, 0x00, 0x00, 0x02,
0x40, 0x19, 0x00, 0x00, 0x00, 0x01,
0xA0, 0x25, 0x26, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static const unsigned char LUTBW[] = {
0x50, 0x19, 0x19, 0x00, 0x00, 0x01,
0x90, 0x19, 0x19, 0x00, 0x00, 0x02,
0x40, 0x19, 0x00, 0x00, 0x00, 0x01,
0xA0, 0x25, 0x26, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static const unsigned char LUTWB[] = {
0xA0, 0x19, 0x19, 0x00, 0x00, 0x01,
0x90, 0x19, 0x19, 0x00, 0x00, 0x02,
0x80, 0x19, 0x00, 0x00, 0x00, 0x01,
0x50, 0x25, 0x26, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static const unsigned char LUTBB[] = {
0xA0, 0x19, 0x19, 0x00, 0x00, 0x01,
0x90, 0x19, 0x19, 0x00, 0x00, 0x02,
0x80, 0x19, 0x00, 0x00, 0x00, 0x01,
0x50, 0x25, 0x26, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,
};
```
**三色屏:**
```c
// OTP location: 0x400
static const unsigned char LUTC[] = {
0x00, 0x3F, 0x01, 0x3F, 0x05, 0x01,
0x48, 0x78, 0x01, 0x78, 0x01, 0x01,
0x48, 0x10, 0x01, 0x10, 0x01, 0x0B,
0x48, 0x78, 0x01, 0x78, 0x01, 0x01,
0x40, 0x03, 0x01, 0x21, 0x0A, 0x04,
0x00, 0x04, 0x01, 0x17, 0x0A, 0x09,
0x00, 0x07, 0x90, 0x07, 0x05, 0x01,
0x00, 0x00,
};
static const unsigned char LUTWW[] = {
0x44, 0x3F, 0x3F, 0x3F, 0x05, 0x01,
0x84, 0x78, 0x01, 0x78, 0x01, 0x01,
0x88, 0x10, 0x01, 0x10, 0x01, 0x0B,
0x40, 0x78, 0x01, 0x78, 0x01, 0x01,
0x00, 0x03, 0x01, 0x21, 0x0A, 0x04,
0x00, 0x04, 0x01, 0x17, 0x0A, 0x09,
0x88, 0x07, 0x01, 0x07, 0x05, 0x01,
};
static const unsigned char LUTR[] = {
0x48, 0x3F, 0x3F, 0x3F, 0x05, 0x01,
0x84, 0x78, 0x01, 0x78, 0x01, 0x01,
0x84, 0x10, 0x01, 0x10, 0x01, 0x0B,
0x8C, 0x78, 0x01, 0x78, 0x01, 0x01,
0x8C, 0x03, 0x01, 0x21, 0x0A, 0x04,
0xCC, 0x04, 0x01, 0x17, 0x0A, 0x09,
0x90, 0x07, 0x01, 0x07, 0x05, 0x01,
};
static const unsigned char LUTW[] = {
0x44, 0x3F, 0x3F, 0x3F, 0x05, 0x01,
0x84, 0x78, 0x01, 0x78, 0x01, 0x01,
0x88, 0x10, 0x01, 0x10, 0x01, 0x0B,
0x40, 0x78, 0x01, 0x78, 0x01, 0x01,
0x00, 0x03, 0x01, 0x21, 0x0A, 0x04,
0x00, 0x04, 0x01, 0x17, 0x0A, 0x09,
0x90, 0x07, 0x01, 0x07, 0x05, 0x01,
};
static const unsigned char LUTB[] = {
0x48, 0x3F, 0x3F, 0x3F, 0x05, 0x01,
0x84, 0x78, 0x01, 0x78, 0x01, 0x01,
0x84, 0x10, 0x01, 0x10, 0x01, 0x0B,
0x40, 0x78, 0x01, 0x78, 0x01, 0x01,
0x00, 0x03, 0x01, 0x21, 0x0A, 0x04,
0x00, 0x04, 0x01, 0x17, 0x0A, 0x09,
0xFF, 0x07, 0x01, 0x07, 0x05, 0x01,
};
```
使用以下 LUT 且把驱动设置为 BW 模式可把三色屏当作黑白屏使用,刷新时间能从 15s 降到 2-3s 左右:
> - 有待继续优化,显示效果比默认三色的 LUT 淡一些
> - 刷新时间应该还有优化的空间,理论上来说应该还可以做一个支持局刷的 LUT
```c
// OTP location: 0x200, from bw.txt
static const unsigned char LUTC[] = {
0x00, 0x28, 0x28, 0x00, 0x00, 0x01,
0x60, 0x32, 0x32, 0x00, 0x00, 0x02,
0x00, 0x14, 0x00, 0x00, 0x00, 0x01,
0x00, 0x32, 0x32, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x28, 0x00,
0x00, 0x00,
};
static const unsigned char LUTWW[] = {
0x50, 0x28, 0x32, 0x00, 0x00, 0x01,
0x90, 0x32, 0x00, 0x00, 0x00, 0x02,
0x40, 0x14, 0x32, 0x00, 0x00, 0x01,
0xA0, 0x32, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
};
static const unsigned char LUTBW[] = {
0x50, 0x28, 0x32, 0x00, 0x00, 0x01,
0x90, 0x32, 0x00, 0x00, 0x00, 0x02,
0x40, 0x14, 0x32, 0x00, 0x00, 0x01,
0xA0, 0x32, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
};
static const unsigned char LUTWB[] = {
0xA0, 0x28, 0x32, 0x00, 0x00, 0x01,
0x90, 0x32, 0x00, 0x00, 0x00, 0x02,
0x80, 0x14, 0x32, 0x00, 0x00, 0x01,
0x50, 0x32, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
};
static const unsigned char LUTBB[] = {
0xA0, 0x28, 0x32, 0x00, 0x00, 0x01,
0x90, 0x32, 0x00, 0x00, 0x00, 0x02,
0x80, 0x14, 0x32, 0x00, 0x00, 0x01,
0x50, 0x32, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFF, 0x00, 0x00, 0x00,
};
```

BIN
docs/UC8151c.pdf Normal file

Binary file not shown.

Binary file not shown.