电子说
在电子设计领域,液晶显示模块是人机交互的重要组成部分。今天我们就来深入了解Newhaven Display International推出的NHD - 0216SZ - NSW - BBW - 3V3字符液晶显示模块。
文件下载:NHD-0216SZ-NSW-BBW-3V3.pdf
NHD - 0216SZ - NSW - BBW - 3V3是一款具有2行16字符显示能力的液晶显示模块。从其型号我们可以解读出很多信息:
该模块内置了ST7066U控制器,这为显示控制提供了便利。我们可以通过下载其规格文档(http://www.newhavendisplay.com/app_notes/ST7066U.pdf )来深入了解其功能。
采用 +3.0V 电源供应,并且具有1/16 duty和1/5 bias的特性。
| 引脚编号 | 符号 | 外部连接 | 功能描述 |
|---|---|---|---|
| 1 | VSS | 电源地 | 为模块提供接地参考 |
| 2 | VDD | 电源 | 逻辑电源电压( +3.0V) |
| 3 | V0 | 电源 | 用于对比度调节(约0V) |
| 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位操作时不使用 |
| 11 - 14 | DB4 – DB7 | MPU | 四个高阶双向三态数据总线 |
| 15 | LED + | 电源 | LED背光电源(通过板载电阻提供 +3.0V) |
| 16 | LED - | 电源 | 背光接地 |
推荐使用2.54mm间距的引脚作为LCD连接器。
| 项目 | 符号 | 条件 | 最小值 | 典型值 | 最大值 | 单位 |
|---|---|---|---|---|---|---|
| 工作温度范围 | Top | 绝对最大 | -20 | - | +70 | °C |
| 存储温度范围 | Tst | 绝对最大 | -30 | - | +80 | °C |
| 电源电压 | VDD | - | 2.7 | 3.0 | 3.3 | V |
| 电源电流 | IDD | Ta = 25°C,VDD = 3.0V | - | 1.5 | 2.0 | mA |
| LCD电源(对比度) | VDD - V0 | Ta = 25°C | - | 3.0 | - | V |
| “H” 电平输入 | Vih | - | 0.7 VDD | - | VDD | V |
| “L” 电平输入 | Vil | - | 0 | - | 0.6 | V |
| “H” 电平输出 | Voh | - | 0.75 VDD | - | - | V |
| “L” 电平输出 | Vol | - | - | - | 0.2 VDD | V |
| 背光电源电压 | Vled | - | - | 3.0 | - | V |
| 背光电源电流 | Iled | Vled = 3.0V | - | 25 | 30 | 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 |
该模块提供了丰富的指令,用于控制显示内容和显示模式。例如:
这些指令的执行时间在不同的时钟频率下有所不同,例如在270KHz时钟下,清屏和归位指令的执行时间为1.52ms,而其他一些指令如 “Entry Mode Set” 等执行时间为37us。
/**********************************************************/
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
}
****
该模块经过了多项质量测试,包括高温存储、低温存储、高温操作、低温操作、高温高湿操作、热冲击抵抗、振动测试和静电测试等。这些测试确保了模块在不同环境下的稳定性和可靠性。
在使用该模块时,需要注意一些事项。例如,在高低温测试后,需要在25°C、0%RH环境下存储4小时后再进行相关操作;振动测试是在产品本身进行,而非在容器内。此外,使用LCD/LCM时的具体注意事项可以参考www.newhavendisplay.com/specs/precautions.pdf 。
NHD - 0216SZ - NSW - BBW - 3V3字符液晶显示模块以其丰富的功能、良好的电气和光学特性以及完善的质量测试,为电子工程师在设计人机交互界面时提供了一个可靠的选择。你在使用这类液晶显示模块时遇到过哪些问题呢?欢迎在评论区分享。
全部0条评论
快来发表一下你的评论吧 !