电子说
在电子设备的开发过程中,显示模块是不可或缺的一部分。今天我们就来详细探讨一下Newhaven Display International推出的NHD - 0220WH - LYGH - JT#字符液晶显示模块。
NHD - 0220WH - LYGH - JT#这个型号包含了丰富的信息:
| 该模块的机械绘图给出了尺寸相关信息,其引脚定义明确: | Pin No. | Symbol | External Connection | Function Description |
|---|---|---|---|---|
| 1 | Vss | Power Supply Ground | 电源接地 | |
| 2 | VDD | Power Supply | 逻辑供电电压(+5.0V) | |
| 3 | V0 | Power Supply | 对比度电源(约0.5V) | |
| 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+ | Power Supply | LED背光电源(+4.2V) | |
| 16 | LED - | Power Supply | 背光接地 |
推荐的LCD连接器为2.54mm间距引脚。
| Item | Symbol | Condition | Min. | Typ. | Max. | Unit |
|---|---|---|---|---|---|---|
| 工作温度范围 | Top | Absolute Max | -20 | - | +70 | °C |
| 存储温度范围 | Tst | Absolute Max | -30 | - | +80 | °C |
| 电源电压 | VDD | - | 5.0 | - | V | |
| 电源电流 | IDD | Ta = 25°C, VDD = 5.0V | 1.2 | 1.6 | 2.0 | mA |
| LCD对比度电源 | 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 | - | - | 4.2 | 4.6 | V |
| 背光电源电流 | Iled | Vled = 4.2V | - | 360 | 720 | mA |
| 背光寿命 | - | Iled = 50mA | - | 100,000 | - | Hrs. |
| Item | Symbol | Condition | Min. | Typ. | Max. | Unit |
|---|---|---|---|---|---|---|
| 垂直视角(顶部) | 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 |
这些特性决定了该显示模块在不同环境下的显示效果和性能表现,工程师在设计时需要充分考虑这些因素,以确保产品在各种条件下都能正常工作。
该模块内置KS0066U和ST7066U控制器,开发者可以通过链接http://www.newhavendisplay.com/app_notes/KS0066U.pdf 和 http://www.newhavendisplay.com/app_notes/ST7066U.pdf 下载其详细规格说明。
| 文档中给出了一系列指令及其对应的指令代码和执行时间(fosc = 270 kHz),例如: | Instruction | Instruction Code | Description | Execution time |
|---|---|---|---|---|
| Clear Display | 0 0 0 0 0 0 0 1 | 清除显示内容 | 1.53 ms | |
| Home | 0 0 0 0 0 0 1 0 | 光标归位 | 1.53 ms |
这些指令是控制显示模块进行各种操作的关键,工程师需要熟悉这些指令的使用方法,才能实现对显示内容的精确控制。
文档提供了8位和4位两种初始化程序示例:
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
Delay(10);
command(0x10); //Set cursor
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; //R/W = LOW: Write
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
}
初始化程序是让显示模块正常工作的第一步,工程师需要根据实际需求选择合适的初始化方式。
文档中列出了一系列质量测试项目,包括高温存储、低温存储、高温运行、低温运行、高温高湿运行、热冲击抵抗、振动测试和静电测试等。这些测试确保了产品在不同环境下的可靠性和稳定性。
使用LCD/LCM时,需要注意一些事项,开发者可以通过链接www.newhavendisplay.com/specs/precautions.pdf查看详细的预防措施。同时,关于保修信息和条款条件可以访问http://www.newhavendisplay.com/index.php?main_page=terms 。
总之,NHD - 0220WH - LYGH - JT#字符液晶显示模块具有丰富的功能和良好的性能,在电子设计中有着广泛的应用前景。电子工程师在使用该模块时,需要充分了解其各项特性和使用方法,才能设计出更加优秀的产品。大家在实际应用中遇到过哪些问题呢?欢迎一起交流探讨。
全部0条评论
快来发表一下你的评论吧 !