电子说
在电子设计领域,液晶显示模块是人机交互的重要组成部分。今天我们要深入探讨的是Newhaven Display公司的NHD - 0216BZ - FL - GBW字符液晶显示模块,它具有诸多特性,适用于多种应用场景。
NHD - 0216BZ - FL - GBW模块的型号含义丰富,“NHD”代表Newhaven Display,“0216”表示2行16字符的显示规格,“BZ”为特定型号,“F”代表半透反射型,“L”是黄/绿色LED背光,“G”表示STN - 灰色,“B”为6:00视角,“W”意味着宽温度范围( - 20°C~ + 70°C),并且该模块符合RoHS标准。
该模块为2行16字符显示,内置SPLC780D或等效控制器,采用 + 5.0V电源供电,1/16 duty、1/5 bias驱动方式。
| 项目 | 符号 | 条件 | 最小值 | 典型值 | 最大值 | 单位 |
|---|---|---|---|---|---|---|
| 工作温度范围 | Top | 绝对最大 | -20 | - | +70 | °C |
| 存储温度范围 | Tst | 绝对最大 | -30 | - | +80 | °C |
| 电源电压 | VDD | - | 4.7 | 5.0 | 5.5 | V |
| 电源电流 | IDD | Ta = 25°C, VDD = 5.0V | - | 1.5 | 2.5 | mA |
| 液晶对比度电源 | VDD - V0 | Ta = 25°C | - | 4.5 | - | V |
| “H” 电平输入 | Vih | - | 2.2 | - | VDD | V |
| “L” 电平输入 | Vil | - | 0 | - | 0.6 | V |
| “H” 电平输出 | Voh | - | 2.4 | - | - | V |
| “L” 电平输出 | Vol | - | - | - | 0.4 | V |
| 背光电源电压 | Vled | - | - | 5.0 | - | V |
| 背光电源电流 | Iled | Vled = 5.0V | - | 120 | - | mA |
| 项目 | 符号 | 条件 | 最小值 | 典型值 | 最大值 | 单位 |
|---|---|---|---|---|---|---|
| 垂直视角(上) | AV | Cr ≥ 2 | - | 25 | - | ° |
| 垂直视角(下) | AV | Cr ≥ 2 | - | 70 | - | ° |
| 水平视角(左) | AH | Cr ≥ 2 | - | 30 | - | ° |
| 水平视角(右) | AH | Cr ≥ 2 | - | 30 | - | ° |
| 对比度 | Cr | - | - | 2 | - | - |
| 响应时间(上升) | Tr | - | - | 120 | 150 | ms |
| 响应时间(下降) | Tf | - | - | 120 | 150 | ms |
| 引脚编号 | 符号 | 外部连接 | 功能描述 |
|---|---|---|---|
| 1 | VSS | 电源地 | 电源接地 |
| 2 | VDD | 电源 | 逻辑电源电压( + 5.0V) |
| 3 | V0 | 电源调节 | 对比度电源(约0.5V) |
| 4 | RS | MPU | 寄存器选择信号,RS = 0:命令,RS = 1:数据 |
| 5 | RW | MPU | 读写选择信号,R/W = 1:读,R/W = 0:写 |
| 6 | E | MPU | 操作使能信号,下降沿触发 |
| 7 - 10 | DB0 - DB3 | MPU | 低四位双向三态数据总线,4位操作时不使用 |
| 11 - 14 | DB4 - DB7 | MPU | 高四位双向三态数据总线 |
| 15 | LED + | 电源 | LED背光电源(通过板载电阻 + 5.0V) |
| 16 | LED - | 电源 | 背光接地 |
推荐的LCD连接器为2.54mm间距引脚。
| 该模块的指令集丰富,涵盖了清屏、归位、设置显示模式等多种功能,以下是部分指令示例: | 指令 | 指令代码 | 描述 | 执行时间(fosc = 270KHz) |
|---|---|---|---|---|
| 清屏 | 0 0 0 0 0 0 0 0 1 | 将 “20H” 写入DDRAM并将DDRAM地址从AC设置为 “00H” | 1.52ms | |
| 归位 | 0 0 0 0 0 0 0 1 - | 将DDRAM地址从AC设置为 “00H”,若光标移动则返回原位置,DDRAM内容不变 | 1.52ms | |
| 输入模式设置 | 0 0 0 0 0 0 0 1/D S | 指定光标移动方向并启用整个显示的移动 | 38us |
/**********************************************************/
void command(char i)
{
P1 = i; //put data on output Port
D_I = 0; //D/I=LOW : send instruction
R_W = 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
R_W = 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 >15 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
R_W = 0;
Nybble(); //Send lower 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
R_W = 0; //R/W=LOW : Write
Nybble(); //Clock lower 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 >15 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); //can check busy flag now instead of delay
P1 = 0x20; //put 0x20 on the output port
Nybble(); //Function set: 4-bit interface
command(0x28); //Function set: 4-bit/2-line
command(0x10); //Set cursor
command(0x0F); //Display ON; Blinking cursor
command(0x06); //Entry Mode set
}
该模块经过多项质量测试,包括高低温存储、高低温操作、温湿度操作、热冲击、振动和静电测试等,以确保其在不同环境下的可靠性。
NHD - 0216BZ - FL - GBW字符液晶显示模块具有丰富的功能和良好的性能,适用于多种电子设备的显示需求。在实际应用中,工程师可以根据具体需求选择合适的初始化方式和指令集,同时要注意模块的使用条件和测试要求。大家在使用这个模块的过程中,有没有遇到过什么特别的问题呢?欢迎在评论区分享交流。
全部0条评论
快来发表一下你的评论吧 !