电子说
在电子设备日益智能化的今天,液晶显示模块作为人机交互的重要窗口,其性能和特性对于设备的整体表现起着关键作用。今天我们就来深入探讨一下NHD - 0420DZ - FL - YBW - 33V3字符液晶显示模块,为各位电子工程师在设计过程中提供参考。
文件下载:NHD-0420DZ-FL-YBW-33V3.pdf
NHD - 0420DZ - FL - YBW - 33V3是Newhaven Display International, Inc.推出的一款字符液晶显示模块。它具有4行20字符的显示能力,内置ST7066U控制器,采用+3.3V电源供电,具备1/16 duty、1/4 bias的特点,并且符合RoHS标准。其型号各部分含义如下:
| Pin No. | Symbol | External Connection | Function Description |
|---|---|---|---|
| 1 | VSS | Power Supply | Ground |
| 2 | VDD | Power Supply | Supply Voltage for logic (+3.3V) |
| 3 | V0 | Power Supply | Supply Voltage for contrast (approx. 0V) |
| 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. |
| 15 | LED+ | Power Supply | Backlight Anode (300 mA @ 3.0V) |
| 16 | LED - | Power Supply | Backlight Cathode (Ground) |
推荐的LCD连接器为2.54mm间距引脚,不过文档中未提及背光连接器的具体配对信息。各位工程师在实际设计中,要根据引脚功能准确接线,避免因接线错误导致模块无法正常工作。
| 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 | - | 3.1 | 3.3 | 3.5 | V |
| Supply Current | IDD | VDD = 3.3V | 0.5 | 1.5 | 3.0 | mA |
| Supply for LCD (contrast) | VLCD | TOP = 25°C | 3.1 | 3.3 | 3.5 | V |
| “H” Level input | VIH | - | 0.7 * VDD | - | VDD | V |
| “L” Level input | VIL | - | VSS | - | 0.6 | V |
| “H” Level output | VOH | - | 0.75 * VDD | - | VDD | V |
| “L” Level output | VOL | - | VSS | - | 0.2 * VDD | V |
| Backlight Supply Current | ILED | - | 200 | 300 | 400 | mA |
| Backlight Supply Voltage | VLED | ILED = 300 mA | 2.8 | 3.0 | 3.2 | V |
需要注意的是,背光的LED由电流驱动,驱动电压仅作参考,必须选择合适的驱动电压以确保背光电流在最大允许值以下。
| Item | Symbol | Condition | Min. | Typ. | Max. | Unit | ||
|---|---|---|---|---|---|---|---|---|
| Optimal Viewing Angles | Top | ϕY+ | CR ≥ 2 | 30 | 40 | - | ° | |
| Bottom | ϕY - | 50 | 60 | - | ° | |||
| Left | θX - | 50 | 60 | - | ° | |||
| Right | θX+ | 50 | 60 | - | ° | |||
| Contrast Ratio | CR | - | 2 | 5 | - | - | ||
| Rise | TR | TOP = 25°C | - | 150 | 250 | ms | ||
| Response Time | Fall | TF | - | 200 | 300 | ms |
了解这些光学特性有助于我们在实际应用中调整显示效果,以达到最佳的视觉体验。大家在设计时,是否考虑过如何根据这些特性优化显示效果呢?
该模块内置ST7066U控制器,其详细规格可从http://www.newhavendisplay.com/app_notes/ST7066U.pdf下载。DDRAM地址有特定的分布规律,工程师们在进行数据读写操作时,要依据这个地址分布来准确操作,确保数据正确显示。
| 模块提供了一系列指令,用于控制显示内容、光标位置等。例如: | Instruction | Instruction code | Description | 270 KHZ Execution time (fOSC = | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RS | R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 | |||||||||||||
| 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 |
熟悉这些指令的功能和执行时间,能让我们更好地控制显示模块的行为。在实际编程中,大家是否遇到过指令执行异常的情况呢?
| Tc | Enable Cycle Time | Pin E | 1200 | ns | ||
|---|---|---|---|---|---|---|
| TPW | Enable Pulse Width | Pin E | 140 | ns | ||
| TR,TF | Enable Rise/Fall Time | Pin E | 25 | ns | ||
| TAS | Address Setup Time | Pins: RS,RW,E | 0 | 0 | ns | |
| TAH | Address Hold Time | Pins: RS,RW,E | 10 | - | ns | |
| TDSW | Data Setup Time | Pins: DB0 - DB7 | 40 | - | ns | |
| TH | Data Hold Time | Pins: DB0 - DB7 | 10 | ns |
| Tc | Enable Cycle Time | Pin E | 1200 | - | ns | |
|---|---|---|---|---|---|---|
| TPW | Enable Pulse Width | Pin E | 140 | ns | ||
| TR,TF | Enable Rise/Fall Time | Pin E | - | 25 | ns | |
| TAS | Address Setup Time | Pins: RS,RW,E | 0 | 0 | ns | |
| TAH | Address Hold Time | Pins: RS,RW,E | 10 | ns | ||
| TDDR | Data Setup Time | Pins: DB0 - DB7 | - | 100 | ns | |
| TH | Data Hold Time | Pins: DB0 - DB7 | 10 | ns |
在设计电路和编写代码时,要严格按照这些时序要求进行操作,否则可能会导致数据传输错误。
文档提供了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);
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);
E = 0; //Clock enable: falling edge
}
void init() {
E = 0;
Delay(100); //Wait >40 msec after power is applied
command(0x30);
command(0x30); //command 0x30 = Wake up
Delay(30);
command(0x30);
command(0x30); //command 0x30 = Wake up #2
Delay(10);
command(0x30);
command(0x30); //command 0x30 = Wake up #3
Delay(10);
command(0x38);
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;
D_I = 0; //D/I = LOW : send instruction
R_W = 0;
Nybble(); //Send upper 4 bits
i = i < < 4; //Shift over by 4 bits
P1 = i;
Nybble(); //Send upper 4 bits
}
void write(char i) {
P1 = i;
D_I = 1; //D/I = HIGH : send data
R_W = 0;
Nybble(); //Clock upper 4 bits
i = i < < 4; //Shift over by 4 bits
P1 = i;
Nybble(); //Clock upper 4 bits
}
void Nybble() {
E = 1;
Delay(1);
E = 0; //Clock enable: falling edge
}
void init() {
P1 = 0; P3 = 0;
Delay(100); //Wait >40 msec after power is applied
P1 = 0x30;
Delay(30);
Nybble(); //command 0x30 = Wake up
Delay(10);
Nybble(); //command 0x30 = Wake up #2
Delay(10);
Nybble(); //command 0x30 = Wake up #3
Delay(10);
P1 = 0x20;
Nybble(); //Function set: 4 - bit interface
command(0x28); //Function set: 4 - bit/2 - line
command(0x0F); //Display ON; Blinking cursor
command(0x06); //Entry Mode set
}
工程师们可以根据实际需求选择合适的初始化方式,在使用这些代码时,要注意延时函数的具体实现,确保初始化过程正确。
| Test Item | Content of Test | Test Condition | Note |
|---|---|---|---|
| High Temperature storage | Endurance test applying the high storage temperature for a long time. | +80⁰C , 48hrs | 2 |
| Low Temperature storage | Endurance test applying the low storage temperature for a long time. | -30⁰C , 48hrs | 1,2 |
| High Temperature Operation | Endurance test applying the electric stress (voltage & current) and the high thermal stress for a long time. | +70⁰C 48hrs | 2 |
| Low Temperature Operation | Endurance test applying the electric stress (voltage & current) and the low thermal stress for a long time. | -20⁰C , 48hrs | 1,2 |
| High Temperature / Humidity Operation | Endurance test applying the electric stress (voltage & current) and the high thermal with high humidity stress for a long time. | +40⁰C , 90% RH , 48hrs | 1,2 |
| Thermal Shock resistance | Endurance test applying the electric stress (voltage & current) during a cycle of low and high thermal stress. | 0⁰C,30min -> 25⁰C,5min -> 50⁰C,30min = 1 cycle 10 cycles | |
| Vibration test | Endurance test applying vibration to simulate transportation and use. | 10 - 55Hz , 15mm amplitude. 60 sec in each of 3 directions X,Y,Z For 15 minutes | 3 |
| Static electricity test | Endurance test applying electric static discharge. | VS = 800V, RS = 1.5kΩ, CS = 100pF One time |
使用LCD/LCM时的详细注意事项可参考http://www.newhavendisplay.com/specs/precautions.pdf,保修信息和条款可查看http://www.newhavendisplay.com/index.php?main_page=terms。在实际应用中,我们要充分考虑这些测试结果和注意事项,确保模块在各种环境下都能稳定可靠地工作。
总之,NHD - 0420DZ - FL - YBW - 33V3字符液晶显示模块具有丰富的功能和良好的性能。电子工程师们在设计过程中,要全面了解其各项特性,合理运用相关指令和初始化程序,才能充分发挥该模块的优势,为产品带来更好的显示效果。大家在使用这款模块时,还有哪些疑问或者经验可以分享呢?欢迎在评论区交流。
全部0条评论
快来发表一下你的评论吧 !