电子说
在电子设备中,液晶显示模块是不可或缺的人机交互界面。今天,我们来深入了解一下Newhaven Display International推出的NHD字符液晶显示模块,它的各项特性和技术细节对于电子工程师在设计相关产品时具有重要的参考价值。
NHD字符液晶显示模块具有2行8字符的显示能力,内置ST7066U控制器,采用+5.0V电源供电,具备1/16 duty、1/5 bias的驱动特性,并且符合RoHS标准,环保又可靠。
| 从机械图纸来看,该模块的各引脚都有明确的定义和作用。标准公差为线性±0.3mm,尺寸以毫米为单位,采用第三角度投影。其引脚分配如下: | Pin No. | Symbol | External Connection | Function Description |
|---|---|---|---|---|
| 1 | VSS | Power Supply | Ground | |
| 2 | VDD | Power Supply | Supply Voltage for logic (+5.0V) | |
| 3 | V0 | Adj Power Supply | Supply Voltage for contrast (approx. 0.6V) | |
| 4 | RS | MPU | Register Select signal. RS=0: Command, RS=1: Data | |
| 5 | R/W | MPU | Read/Write select signal, R/W=1: Read R/W: =0: Write | |
| 6 | E | MPU | Operation Enable signal. Falling edge triggered. | |
| 7 - 10 | DB0 – DB3 | MPU | Four low order bi - directional three - state data bus lines. These four are not used during 4 - bit operation. | |
| 11 - 14 | DB4 – DB7 | MPU | Four high order bi - directional three - state data bus lines. | |
| A | NC | - | No Connect | |
| K | NC | - | No Connect |
推荐使用2.54mm间距的引脚作为LCD连接器。大家在进行机械设计时,一定要严格按照这些参数来布局,避免出现引脚连接错误等问题。
| 电气特性决定了模块的工作范围和稳定性,以下是具体参数: | 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.8 | 5.0 | 5.2 | V | |
| Supply Current | IDD | VDD = 5.0V | 0.5 | 1.0 | 2.5 | mA | |
| Supply for LCD (contrast) | VLCD | TOP = 25°C | 4.2 | 4.4 | 4.6 | V | |
| “H” Level input | VIH | - | 0.7 * VDD | - | VDD | V | |
| “L” Level input | VIL | - | VSS | - | 0.6 | V | |
| “H” Level output | VOH | - | 3.9 | - | VDD | V | |
| “L” Level output | VOL | - | VSS | - | 0.4 | V |
在实际应用中,我们要确保模块工作在这些电气参数范围内,否则可能会影响模块的性能甚至导致损坏。
| 光学特性影响着显示效果,包括最佳视角、对比度和响应时间等: | Item | Symbol | Condition | Min. | Typ. | Max. | Unit | |
|---|---|---|---|---|---|---|---|---|
| Optimal Viewing Angles | Top | ϕY+ | CR ≥ 2 | - | 40 | - | ° | |
| Bottom | ϕY - | - | 60 | - | ° | |||
| Left | θX - | - | 60 | - | ° | |||
| Right | θX+ | - | 60 | - | ° | |||
| Contrast Ratio | CR | - | 2 | 5 | - | - | ||
| Response Time | Rise | TR | TOP = 25°C | - | 150 | 250 | ms | |
| Fall | TF | - | 200 | 300 | ms |
工程师们在设计产品时,要根据实际的使用场景和需求,考虑这些光学特性,以达到最佳的显示效果。
| 该模块有一系列的指令,用于控制显示、设置参数等。例如: | Instruction | Instruction code | Description | 270 KHZ Execution time (fosc = ) |
|---|---|---|---|---|
| Clear Display | 0 0 0 0 0 0 0 0 0 1 | Write “20H” to DDRAM and set DDRAM address to “00H” from AC | 1.52ms | |
| Return Home | 0 0 0 0 0 0 0 0 1 - | Set DDRAM Address to “00H” from AC and return cursor to its original position if shifted. The contents of DDRAM are not changed. | 1.52ms |
这些指令是实现模块各种功能的基础,我们需要熟悉它们的使用方法。
模块提供了8位和4位两种初始化方式:
void command(char i)
{
P1 = i; D1 = 0; R_W = 0; E = 1; //put data on output Port //D/I=LOW: send instruction //R/W=LOW: Write
Delay(1); //enable pulse width >= 300ns
E = 0; //Clock enable: falling edge
}
void write(char i)
{
P1 = i; DI = 1; //put data on output Port //D/=HIGH: send data
R_W = 0; E = 1; //R/W=LOW: Write
Delay(1); E = 0; //enable pulse width >= 300ns //Clock enable: falling edge
}
void init()
{
E = 0;
Delay(10); command(0x30); Delay(10); command(0x30); command(0x10); Delay(30); command(0x30); command(0x38); Delay(100); //Set cursor //command 0x30 = Wake up //command 0x30 = Wake up #3 //Nait >40 msec after power is applied //must wait 160us, busy flag not available //command 0x30 = Wake up #2 //Function set: 8 - bit/2 - line //must wait 5ms, busy flag not available //must wait 160us, busy flag not available
command(0x0c); command(0x06); //Display ON; Cursor ON //Entry mode set
}
void command(char i)
{
P1 = i; D1 = 0; //put data on output Port //D/=LOW: send instruction
R_W = 0; Nybble(); //Send lower 4 bits //R/W=LOW: Write
i = i < < 4; P1 = i; Nybble(); //Shift over by 4 bits //put data on output Port //Send upper 4 bits
}
void write(char i)
{
Nybble(); i = i < < 4; DI = 1; P1 = i; R_W = 0; Nybble(); P1 = i; //put data on output Port //Clock upper 4 bits //D/l=HIGH: send data //put data on output Port //Shift over by 4 bits //Clock lower 4 bits //R/W=LOW: Write
}
void Nybble()
{
E = 1;
Delay(1); //enable pulse width >= 300ns
E = 0; //Clock enable: falling edge
}
void init()
{
P1 = 0; P3 = 0;
Delay(100); P1 = 0x30; //Wait >40 msec after power is applied //put 0x30 on the output port
Delay(30); Nybble(); //must wait 5ms, busy flag not available //command 0x30 = Wake up
Nybble(); P1 = 0x20; command(0x06); command(0x0F); Delay(10); command(0x10); Nybble(); command(0x28); Delay(10); Nybble(); Delay(10); //put 0x20 on the output port //can check busy flag now instead of delay //Function set: 4 - bit interface //command 0x30 = Wake up #3 //Function set: 4 - bit/2 - line //must wait 160us, busy flag not available //Set cursor //Display ON; Blinking cursor //command 0x30 = Wake up #2 //must wait 160us, busy flag not available //Entry Mode set
}
工程师们可以根据实际需求选择合适的初始化方式,在使用过程中,要注意延时时间等参数的设置,确保初始化的正确性。
该模块经过了多项质量测试,包括高温存储、低温存储、高温运行、低温运行、高温高湿运行、热冲击抗性、振动测试和静电测试等。例如高温存储测试是在+80⁰C下持续48小时,低温存储测试是在 - 30⁰C下持续48小时。这些测试确保了模块在不同环境下的可靠性和稳定性。大家在选择模块时,这些质量测试数据是重要的参考依据。
总之,NHD字符液晶显示模块具有丰富的功能和良好的性能,电子工程师在设计相关产品时,可以根据这些技术参数和特性,合理地进行应用和优化。大家在实际使用过程中遇到过哪些问题呢?欢迎在评论区分享交流。
全部0条评论
快来发表一下你的评论吧 !