电子说
NHD - 0212WH - AYYH - JT是Newhaven Display International, Inc.推出的一款字符液晶显示模块。该模块具有2行12字符的显示能力,内置ST7066U控制器,采用+5.0V电源供电,具备1/16 duty、1/5 bias的特性,并且符合RoHS标准。
| 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 | Power supply for contrast (approx. 0.8V) |
| 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 | A | Power Supply | Power supply for LED Backlight (+4.2V) |
推荐的LCD连接器为1.27mm间距引脚,不过文档中未提及背光连接器的适配信息。
| 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.5 | 5.0 | 5.5 | V | |
| Supply Current | IDD | Ta = 25°C, VDD = 5.0V | 0.5 | 1.0 | 2.0 | mA |
| Supply for LCD (contrast) | VDD - V0 | Ta = 25°C | 4.1 | 4.2 | 4.3 | 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 | 0 | - | 0.4 | V | |
| Backlight Supply Voltage | Vled | - | 4.0 | 4.2 | 4.7 | V |
| Backlight Supply Current | Iled | Vled = 4.2V | 32 | 40 | 48 | mA |
| Item | Symbol | Condition | Min. | Typ. | Max. | Unit |
|---|---|---|---|---|---|---|
| Viewing Angle – Top | Cr ≥ 2 | - | 20 | - | ⁰ | |
| Viewing Angle – Bottom | - | 40 | - | ⁰ | ||
| Viewing Angle – Left | - | 30 | - | ⁰ | ||
| Viewing Angle – Right | - | 30 | - | ⁰ | ||
| Contrast Ratio | Cr | - | 3 | - | - | |
| Response Time (rise) | Tr | - | - | 150 | 200 | ms |
| Response Time (fall) | Tf | - | - | 150 | 200 | ms |
| 该模块提供了丰富的指令集,用于控制显示、光标等操作。例如: | Instruction | Instruction code | Description | 270 KHZ Execution time (fosc = ) |
|---|---|---|---|---|
| Clear Display | 0 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 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 |
void command(char i)
{
P1 = i; D1 = 0; R_W = 0; //put data on output Port //D/I = LOW: send instruction //R/W - LOW: Write
E = 1;
Delay(1); //enable pulse width >= 300ns
E = 0; //Clock enable: falling edge
}
void write(char i)
{
P1 = i; DI = 1; RW = 0; //put data on output Port //D/I = HIGH : send data //R/W - LOW: Write
E = 1;
Delay(1); E = 0; //enable pulse width >= 300ns //Clock enable: falling edge
}
void init()
{
Delay(30); Delay(100); command(0x30); E = 0; command(0x30); Delay(10); command(0x30);
//Wait >40 msec after power is applied //command 0x30 = Wake up //must wait 5ms, busy flag not available //command 0x30 = Wake up #2 //must wait 160us, busy flag not available //command 0x30 = Wake up #3
Delay(10); command(0x38); command(0x10);
//must wait 160us, busy flag not available //Function set: 8 - bit/2 - line //Set cursor
command(0x0c); command(0x06);
//Display ON; Cursor ON //Entry mode set
}
void command(char i)
{
P1 = i; //put data on output Port
D1 = 0; //D/I = LOW : send instruction
R_W = 0; Nybble(); //R/W - LOW: Write //Send lower 4 bits
i = i < < 4; P1 = i; Nybble(); //put data on output Port //Send upper 4 bits //Shift over by 4 bits
}
void write(char i)
{
P1 = i; Dl = 1; RW = 0; //put data on output Port //D/I = HIGH: send data //R/W - LOW: Write
Nybble(); i = i < < 4; P1 = i; //Clock lower 4bits //Shift over by 4 bits //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); 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
Delay(10); Nybble(); //command 0x30 = Wake up #2 //must wait 160us, busy flag not available
Nybble(); Nybble(); Delay(10); command(0x28); Delay(10); command(0x06); command(0x0F); P1 = 0x20; command(0x10);
//can check busy flag now instead of delay //command 0x30 = Wake up #3 //put 0x20 on the output port //must wait 160us, busy flag not available //Function set: 4 - bit interface //Function set: 4 - bit/2 - line //Set cursor //Entry Mode set //Display ON; Blinking cursor
}
该模块进行了多项质量测试,包括高低温存储、高低温操作、高温高湿操作、热冲击抵抗、振动测试和静电测试等。例如,高温存储测试在+80⁰C下进行48小时,低温存储测试在 - 30⁰C下进行48小时。这些测试确保了模块在不同环境条件下的可靠性。
NHD - 0212WH - AYYH - JT字符液晶显示模块具有丰富的功能和良好的性能,适用于多种需要字符显示的应用场景。电子工程师在设计使用该模块时,需要充分了解其引脚功能、电气特性、指令集和时序要求,合理进行初始化编程,以确保模块正常工作。同时,通过质量测试信息可以对模块的可靠性有更深入的了解,从而更好地应用于实际项目中。大家在使用过程中有没有遇到过类似模块的一些特殊问题呢?欢迎在评论区分享交流。
全部0条评论
快来发表一下你的评论吧 !