电子说
在电子设备设计中,液晶显示模块是人机交互的重要组件。今天我们来详细探讨Newhaven Display International公司的NHD - 0216K1Z - FSR - GBW - L字符液晶显示模块,为大家提供全面的技术参考。
文件下载:NHD-0216K1Z-FSR-GBW-L.pdf
该模块型号为NHD - 0216K1Z - FSR - GBW - L,从型号命名上我们能获取不少信息:
| Pin No. | Symbol | External Connection | Function Description |
|---|---|---|---|
| 1 | VSS | Power Supply | 接地 |
| 2 | VDD | Power Supply | 逻辑供电电压(+5.0V) |
| 3 | V0 | Adj Power Supply | 对比度供电电压(约0.6V) |
| 4 | RS | MPU | 寄存器选择信号,RS = 0为命令,RS = 1为数据 |
| 5 | R/W | MPU | 读写选择信号,R/W = 1为读,R/W = 0为写 |
| 6 | E | MPU | 操作使能信号,下降沿触发 |
| 7 - 10 | DB0 – DB3 | MPU | 低4位双向三态数据总线,4位操作时不使用 |
| 11 - 14 | DB4 – DB7 | MPU | 高4位双向三态数据总线 |
| 15 | LED+ | Power Supply | 背光阳极(通过板载电阻接 +5.0V) |
| 16 | LED - | Power Supply | 背光阴极(接地) |
推荐的LCD连接器为2.54mm间距引脚。
| Item | Symbol | Condition | Min. | Typ. | Max. | Unit |
|---|---|---|---|---|---|---|
| 工作温度范围 | TOP | 绝对最大 | -20 | - | +70 | ⁰C |
| 存储温度范围 | TST | 绝对最大 | -30 | - | +80 | ⁰C |
| 电源电压 | VDD | - | 4.8 | 5.0 | 5.2 | V |
| 电源电流 | IDD | VDD = 5.0V | 0.5 | 1.5 | 2.5 | mA |
| 液晶对比度供电 | VDD - V0 | TOP = 25°C | 4.2 | 4.4 | 4.6 | V |
| “H” 电平输入 | VIH | - | 2.2 | - | VDD | V |
| “L” 电平输入 | VIL | - | VSS | - | 0.6 | V |
| “H” 电平输出 | VOH | - | 2.4 | - | VDD | V |
| “L” 电平输出 | VOL | - | VSS | - | 0.4 | V |
| 背光电源电压 | VLED | - | 4.7 | 5.0 | 5.3 | V |
| 背光电源电流 | ILED | VLED = 5.0 V | 5 | 15 | 20 | mA |
| Item | Symbol | Condition | Min. | Typ. | Max. | Unit | ||
|---|---|---|---|---|---|---|---|---|
| 最佳视角 | 顶部 | ϕY+ | CR ≥ 2 | 40 | - | - | ° | |
| 底部 | ϕY - | - | 60 | - | - | ° | ||
| 左侧 | θX - | - | 60 | - | - | ° | ||
| 右侧 | θX+ | - | 60 | - | - | ° | ||
| 对比度 | CR | - | 2 | 5 | - | - | ||
| 响应时间 | 上升 | TR | TOP = 25°C | - | 150 | 250 | ms | |
| 下降 | TF | - | 200 | 300 | ms |
内置ST7066U控制器,大家可从指定链接下载其详细规格书,以便深入了解其功能和操作方法。
DDRAM地址分为两行,第一行地址从00H - 0FH,第二行地址从40H - 4FH,这对于数据的存储和显示定位非常重要。
该模块有多种指令,如清屏、归位、设置显示模式等,不同指令有不同的执行时间和功能描述,例如:
| 参数 | 描述 | 引脚 | Min. | Typ. | Max. | 单位 |
|---|---|---|---|---|---|---|
| Tc | 使能周期时间 | Pin E | 1200 | ns | ||
| TPW | 使能脉冲宽度 | Pin E | 140 | ns | ||
| TR,TF | 使能上升/下降时间 | Pin E | 25 | ns | ||
| TAS | 地址建立时间 | Pins: RS,RW,E | 0 | 0 | ns | |
| TAH | 地址保持时间 | Pins: RS,RW,E | 10 | - | ns | |
| TDSW | 数据建立时间 | Pins: DB0 - DB7 | 40 | - | ns | |
| TH | 数据保持时间 | Pins: DB0 - DB7 | 10 | ns |
| 参数 | 描述 | 引脚 | Min. | Typ. | Max. | 单位 |
|---|---|---|---|---|---|---|
| Tc | 使能周期时间 | Pin E | 1200 | - | ns | |
| TPW | 使能脉冲宽度 | Pin E | 140 | ns | ||
| TR,TF | 使能上升/下降时间 | Pin E | - | 25 | ns | |
| TAS | 地址建立时间 | Pins: RS,RW,E | 0 | 0 | ns | |
| TAH | 地址保持时间 | Pins: RS,RW,E | 10 | ns | ||
| TDDR | 数据建立时间 | Pins: DB0 - DB7 | - | 100 | ns | |
| TH | 数据保持时间 | Pins: DB0 - DB7 | 10 | ns |
内置字体表涵盖了从0000 - 1111的不同编码对应的字符,方便进行字符显示的编程。
/**********************************************************/
void command(char i) {
P1 = i; //put data on output Port
D_I = 0; //D/I=LOW : send instruction
RW = 0; //R/W=LOW:Write
E = 1;
Delay(1); //enable pulse width >= 300ns
E = 0; //Clock enable: falling edge
}
void write(char i) {
P1 = i; //put data on output Port
D_I = 1; //D/I=HIGH : send data
RW = 0; //R/W=LOW : Write
E = 1;
Delay(1); //enable pulse width >= 300ns
E = 0; //Clock enable: falling edge
}
void init() {
E = 0;
Delay(100); //Wait >40 msec after power is applied
command(0x30); //command 0x30 = Wake up
Delay(30); //must wait 5ms, busy flag not available
command(0x30); //command 0x30 = Wake up #2
Delay(10); //must wait 160us, busy flag not available
command(0x30); //command 0x30 = Wake up #3
Delay(10); //must wait 160us, busy flag not available
command(0x38); //Function set: 8-bit/2-line
command(0x0c); //Display ON; Cursor ON
command(0x06); //Entry mode set
}
/**********************************************************/
void command(char i) {
P1 = i; //put data on output Port
D_I = 0; //D/I=LOW : send instruction
RW = 0; //R/W=LOW: Write
Nybble(); //Send upper 4 bits
i = i < < 4; //Shift over by 4 bits
P1 = i; //put data on output Port
Nybble(); //Send upper 4 bits
}
void write(char i) {
P1 = i; //put data on output Port
D_I = 1; //D/I=HIGH : send data
RW = 0; //R/W=LOW: Write
Nybble(); //Clock upper 4 bits
i = i < < 4; //Shift over by 4 bits
P1 = i; //put data on output Port
Nybble(); //Clock upper 4 bits
}
void Nybble() {
E = 1;
Delay(1); //enable pulse width >= 300ns
E = 0; //Clock enable: falling edge
}
void init() {
P1 = 0;
P3 = 0;
Delay(100); //Wait >40 msec after power is applied
P1 = 0x30; //put 0x30 on the output port
Delay(30); //must wait 5ms, busy flag not available
Nybble(); //command 0x30 = Wake up
Delay(10); //must wait 160us, busy flag not available
Nybble(); //command 0x30 = Wake up #2
Delay(10); //must wait 160us, busy flag not available
Nybble(); //command 0x30 = Wake up #3
Delay(10);
P1 = 0x20; //put 0x20 on the output port
Nybble(); //Function set: 4-bit interface
command(0x28); //Function set: 4-bit/2-line
command(0x0F); //Display ON; Blinking cursor
command(0x06); //Entry Mode set
}
该模块经过了多种测试,包括高温存储、低温存储、高温运行、低温运行、高温高湿运行、热冲击抵抗、振动测试和静电测试等,不同测试有不同的条件和注意事项。例如高温存储测试在 +80⁰C 下进行48小时,低温存储测试在 -30⁰C 下进行48小时等。
使用LCD/LCM时,可查看 www.newhavendisplay.com/specs/precautions.pdf 获取详细注意事项。同时,关于保修信息和条款可访问 http://www.newhavendisplay.com/index.php?main_page=terms 。
在实际设计中,大家可以根据这些详细信息进行合理的电路设计和程序编写,以充分发挥该液晶显示模块的性能。你在使用类似模块时遇到过哪些问题呢?欢迎在评论区分享交流。
全部0条评论
快来发表一下你的评论吧 !