字符液晶顯示模塊NHD - 0212WH - AYYH - JT產(chǎn)品解析
一、產(chǎn)品概述
NHD - 0212WH - AYYH - JT是Newhaven Display International, Inc.推出的一款字符液晶顯示模塊。該模塊具有2行12字符的顯示能力,內(nèi)置ST7066U控制器,采用+5.0V電源供電,具備1/16 duty、1/5 bias的特性,并且符合RoHS標(biāo)準(zhǔn)。
二、產(chǎn)品關(guān)鍵參數(shù)與特性
(一)引腳說明與接線圖
| 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 |
(三)光學(xué)特性
| 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 |
三、指令集與時序特性
(一)指令表
| 該模塊提供了豐富的指令集,用于控制顯示、光標(biāo)等操作。例如: | 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 |
(二)時序特性
- 寫數(shù)據(jù)(MPU到ST7066U)
- Enable Cycle Time (Tc):1200ns
- Enable Pulse Width (TPW):460ns
- Enable Rise/Fall Time (TR, TF):最大25ns
- Address Setup Time (TAS):0ns
- Address Hold Time (TAH):10ns
- 讀數(shù)據(jù)(ST7066U到MPU)
- Enable Cycle Time (Tc):1200ns
- Enable Pulse Width (TPW):480ns
- Enable Rise/Fall Time (TR, TF):25ns
- Address Setup Time (TAS):0ns
- Address Hold Time (TAH):10ns
- Data Setup Time (TDDR):320ns
- Data Hold Time (TH):10ns
四、初始化程序
(一)8位初始化
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
}
(二)4位初始化
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
}
五、質(zhì)量信息
該模塊進(jìn)行了多項質(zhì)量測試,包括高低溫存儲、高低溫操作、高溫高濕操作、熱沖擊抵抗、振動測試和靜電測試等。例如,高溫存儲測試在+80?C下進(jìn)行48小時,低溫存儲測試在 - 30?C下進(jìn)行48小時。這些測試確保了模塊在不同環(huán)境條件下的可靠性。
六、總結(jié)
NHD - 0212WH - AYYH - JT字符液晶顯示模塊具有豐富的功能和良好的性能,適用于多種需要字符顯示的應(yīng)用場景。電子工程師在設(shè)計使用該模塊時,需要充分了解其引腳功能、電氣特性、指令集和時序要求,合理進(jìn)行初始化編程,以確保模塊正常工作。同時,通過質(zhì)量測試信息可以對模塊的可靠性有更深入的了解,從而更好地應(yīng)用于實際項目中。大家在使用過程中有沒有遇到過類似模塊的一些特殊問題呢?歡迎在評論區(qū)分享交流。
發(fā)布評論請先 登錄
字符液晶顯示模塊NHD - 0212WH - AYYH - JT產(chǎn)品解析
評論