深入解析NHD - 0216BZ - FL - YBW字符液晶顯示模塊
一、模塊概述
NHD - 0216BZ - FL - YBW是Newhaven Display International推出的一款字符液晶顯示模塊。從型號來看,“NHD”代表Newhaven Display;“0216”表示該模塊有2行,每行可顯示16個字符;“BZ”是具體的型號;“F”代表半透反射型;“L”表示采用黃/綠色LED背光;“Y”為STN - 黃/綠色;“B”是6:00視角;“W”意味著寬溫度范圍,并且該模塊符合RoHS標準。
二、功能與特性
顯示能力
具有2行×16字符的顯示能力,能夠滿足基本的文本顯示需求,適用于各種需要顯示簡單信息的應用場景,比如儀器儀表、小型設備的狀態(tài)顯示等。
內(nèi)置控制器
內(nèi)置ST7066U控制器,為模塊的穩(wěn)定運行提供了保障。大家可以從http://www.newhavendisplay.com/app_notes/ST7066U.pdf 下載其詳細規(guī)格說明,以便深入了解控制器的工作原理和特性。
電源要求
采用+5.0V電源供電,同時具備1/16 duty和1/5 bias的特性,并且符合RoHS標準,這意味著它在環(huán)保方面也達到了一定要求。
三、引腳說明與接線圖
| 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.5V) |
| 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 (+5.0V via on - board resistor) |
| 16 | LED - | Power Supply | Backlight Cathode (Ground) |
推薦使用2.54mm間距的引腳作為LCD連接器,大家在實際設計中要注意引腳的連接,避免出現(xiàn)連接錯誤導致模塊無法正常工作。
四、電氣與光學特性
電氣特性
| 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.3 | V |
| Supply Current | IDD | VDD = 5.0V | - | 1.5 | 2.5 | mA |
| Supply for LCD (contrast) | VLCD | TOP = 25°C | 4.3 | 4.5 | 4.7 | 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 |
| Backlight Supply Voltage | VLED | - | - | 5.0 | - | V |
| Backlight Supply Current | ILED | VLED = 5.0V | 90 | 120 | 130 | mA |
從這些電氣特性數(shù)據(jù)中,我們可以了解到該模塊對電源、溫度等方面的要求,在設計電路時要確保滿足這些條件,以保證模塊的正常運行。比如,在不同的溫度環(huán)境下使用時,要考慮溫度對模塊電氣性能的影響。
光學特性
| 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 |
這些光學特性決定了模塊的顯示效果,例如最佳視角范圍可以幫助我們確定模塊的安裝位置,以獲得最佳的視覺體驗。而對比度和響應時間則影響著顯示內(nèi)容的清晰度和動態(tài)顯示效果。
五、控制器信息與DDRAM地址
控制器
內(nèi)置ST7066U控制器,其規(guī)格說明可從指定網(wǎng)址下載。了解控制器的特性對于正確使用模塊至關重要,大家可以深入研究控制器的功能,以實現(xiàn)更復雜的顯示控制。
DDRAM地址
DDRAM地址有特定的分布,第一行地址為00 - 0F,第二行地址為40 - 4F。在編程時,我們需要根據(jù)這些地址來寫入和讀取顯示數(shù)據(jù)。
六、命令表
| 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 |
| …… | …… | …… | …… | …… | …… | …… | …… | …… | …… | …… | …… | …… |
命令表中包含了各種操作指令及其代碼,以及執(zhí)行時間。在編程控制模塊時,我們需要根據(jù)實際需求選擇合適的命令,例如清屏、設置顯示模式等。大家可以思考一下,在不同的應用場景中,如何合理地組合這些命令來實現(xiàn)最佳的顯示效果?
七、時序特性
寫數(shù)據(jù)
| 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 |
讀數(shù)據(jù)
| Tc | Enable Cycle Time | Pin E | 1200 | 0 | 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 |
時序特性對于數(shù)據(jù)的正確傳輸至關重要,在設計電路和編寫程序時,要嚴格按照這些時序要求來操作,否則可能會出現(xiàn)數(shù)據(jù)傳輸錯誤或顯示異常的情況。大家在實際應用中有沒有遇到過時序問題呢?是如何解決的?
八、初始化程序
8位初始化
void command(char i)
{
P1 = i; //put data on output Port
D_I = 0;
D_I = 0; //D/I = LOW : send instruction
R_W = 0; //R/W = LOW:Write
E = 1;
Delay (1);
Delay(1); //enable pulse width >= 300ns
E = 0; //Clock enable:falling edge
}
void write(char i) {
P1 = i; //put data on output Port
P1 = i;
R_W = 0; D_I = 1; //D/I = HIGH : send data //R/W = LOW:Write
E = 1;
Delay (1);
Delay(1); //enable pulse width >= 300ns
E = 0;
E = 0; //Clock enable: falling edge
}
void init()
{
E = 0;
Delay(100); //Wait >40 msec after power is applied
Delay (100);
command (0x30); //command 0x30 = Wake up
Delay(30);
Delay(30); //must wait 5ms, busy flag not available
command (0x30); //command 0x30 = Wake up #2
Delay (10);
Delay(10); //must wait 160us, busy flag not available
command (0x30); //command 0x30 = Wake up #3
Delay (10);
Delay(10); //must wait 160us, busy flag not available
command (0x38);
command(0x38); //Function set: 8 - bit/2 - line
command (0x10); command (0x0c); command (0x06); //Set cursor //Display ON; Cursor ON //Entry mode set
}
4位初始化
void command(char i)
{
P1 = i; //put data on output Port
D_I = 0;
D_I = 0; //D/I = LOW : send instruction
R_W = 0;
Nybble();
i = i < 4; //R/W = LOW:Write //Send lower 4 bits //Shift over by 4 bits
P1 = i;
P1 = i; //put data on output Port
Nybble(); //Send upper 4 bits
}
void write(char i)
{
P1 = i; //put data on output Port
P1 = i;
R_W = 0;
Nybble();
P1 = i;
D_I = 1;
i = i < 4; //D/I = HIGH : send data //R/W = LOW: Write //Clock lower 4 bits //Shift over by 4 bits
P1 = i; //put data on output Port
Nybble (); //Clock upper 4 bits
}
void Nybble()
{
E = 1;
Delay (1);
Delay(1); //enable pulse width >= 300ns
E = 0; //Clock enable:falling edge
}
void init()
{
P1 = 0; P3 = 0;
Delay (100);
Delay(100); //Wait >40 msec after power is applied
P1 = 0x30; //put 0x30 on the output port
P1 = 0x30;
Delay (30);
Delay(30); //must wait 5ms, busy flag not available
Nybble(); //command 0x30 = Wake up
Delay (10);
Delay(10); //must wait 160us, busy flag not available
Nybble(); //command 0x30 = Wake up #2
Delay (10);
Delay(10); //must wait 160us, busy flag not available
Nybble ();
Nybble(); //command 0x30 = Wake up #3
Delay(10); //can check busy flag now instead of delay
Delay (10);
P1 = 0x20; //put 0x20 on the output port
P1 = 0x20;
Nybble(); //Function set: 4 - bit interface
Nybble ();
command (0x28);
command(0x28); //Function set: 4 - bit/2 - line
command (0x10); //Set cursor
command (0x0F);
command(0x0F); //Display ON; Blinking cursor
command (0x06); //Entry Mode set
}
初始化程序是模塊正常工作的基礎,不同的初始化方式適用于不同的應用場景。大家可以根據(jù)實際需求選擇合適的初始化方式,并且可以對初始化程序進行優(yōu)化,以提高模塊的啟動速度和穩(wěn)定性。
九、質量信息與注意事項
質量測試
| 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 |
| …… | …… | …… | …… |
這些質量測試表明了模塊在不同環(huán)境條件下的可靠性。在實際應用中,我們要根據(jù)模塊的使用環(huán)境來評估其是否能夠滿足要求。
注意事項
使用LCDs/LCMs時,要注意查看www.newhavendisplay.com/specs/precautions.pdf 中的注意事項,同時可以了解http://www.newhavendisplay.com/index.php?main_page=terms 的保修信息和條款條件。
總之,NHD - 0216BZ - FL - YBW字符液晶顯示模塊具有豐富的功能和特性,在設計應用時,我們要充分了解其各項參數(shù)和要求,合理使用,以實現(xiàn)最佳的顯示效果和穩(wěn)定性。
發(fā)布評論請先 登錄
深入解析NHD - 0216BZ - FL - YBW字符液晶顯示模塊
評論