电子说
在电子设计领域,液晶显示模块是人机交互的重要组成部分。今天,我们就来详细探讨一下NHD - 0216SZ - FSB - GBW字符液晶显示模块。
NHD - 0216SZ - FSB - GBW是Newhaven Display推出的一款字符液晶显示模块。该模块具有2行16字符的显示能力,内置SPLC780D或ST7066U控制器,采用+5.0V电源供电,具备1/16 duty、1/5 bias的特性,并且符合RoHS标准。其型号中的各个部分含义如下:
| 该模块共有16个引脚,每个引脚都有其特定的功能: | Pin No. | Symbol | External Connection | Function Description |
|---|---|---|---|---|
| 1 | VSS | Power Supply Ground | 电源地 | |
| 2 | VDD | Power Supply | 逻辑电源电压(+5.0V) | |
| 3 | V0 | Adj Power Supply | 对比度电源(约0.4V) | |
| 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背光电源(通过板载电阻接+5.0V) | |
| 16 | LED - | Power Supply | 背光地 |
| Item | Symbol | Condition | Min. | Typ. | Max. | Unit |
|---|---|---|---|---|---|---|
| Operating Temperature Range | Top | Absolute Max | -20 | - | +70 | ⁰C |
| Storage Temperature Range | Tst | Absolute Max | -30 | - | +80 | ⁰C |
| Supply Voltage | VDD | 4.7 | 5.0 | 5.5 | V | |
| Supply Current | IDD | Ta = 25°C, VDD = 5.0V | - | 1.5 | 2.5 | mA |
| Supply for LCD (contrast) | VDD - V0 | Ta = 25°C | - | 4.6 | - | V |
| “H” Level input | Vih | 2.2 | - | VDD | V | |
| “L” Level input | Vil | 0 | - | 0.6 | V | |
| “H” Level output | Voh | 2.4 | - | - | V | |
| “L” Level output | Vol | - | - | 0.4 | V | |
| Backlight Supply Voltage | Vled | - | - | 5.0 | - | V |
| Backlight Supply Current | Iled | Vled = 5.0V | - | 20 | 30 | mA |
| Item | Symbol | Condition | Min. | Typ. | Max. | Unit |
|---|---|---|---|---|---|---|
| Viewing Angle – Vertical (top) | AV | Cr ≥2 | - | 25 | - | ⁰ |
| Viewing Angle – Vertical (bottom) | AV | Cr ≥2 | - | 70 | - | ⁰ |
| Viewing Angle – Horizontal (left) | AH | Cr ≥2 | - | 30 | - | ⁰ |
| Viewing Angle – Horizontal (right) | AH | Cr ≥2 | - | 30 | - | ⁰ |
| Contrast Ratio | Cr | - | 2 | - | - | |
| Response Time (rise) | Tr | - | - | 120 | 150 | ms |
| Response Time (fall) | Tf | - | - | 120 | 150 | ms |
该模块内置SPLC780D和ST7066U控制器,其详细规格可分别从以下链接下载:
| 显示字符的地址代码如下: | 2 | 5 | 6 | 7 | 9 | 10 | 13 | 14 | 16 | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 00 | 01 | 03 | 04 | 05 | 06 | 0E | ||||||||
| 40 | 41 | 42 | 44 | 47 | 4E | 4F |
内置字体表包含了各种字符的编码对应关系,具体内容可参考文档中的表格。
/**********************************************************/
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(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
}
该模块进行了多项质量测试,包括高温存储、低温存储、高温操作、低温操作、高温高湿操作、热冲击抗性、振动测试和静电测试等,具体测试条件和注意事项可参考文档中的表格。
使用LCDs/LCMs时,可参考www.newhavendisplay.com/specs/precautions.pdf中的预防措施。同时,保修信息和条款可查看http://www.newhavendisplay.com/index.php?main_page=terms。
在实际设计中,电子工程师们需要根据具体的应用场景和需求,合理选择初始化方式和参数,以确保该液晶显示模块能够稳定、高效地工作。大家在使用这款模块的过程中遇到过哪些问题呢?欢迎在评论区分享交流。
全部0条评论
快来发表一下你的评论吧 !