深入解析NHD - 0216BZ - FL - YBW字符液晶显示模块

电子说

1.4w人已加入

描述

深入解析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标准。

文件下载:NHD-0216BZ-FL-YBW.pdf

二、功能与特性

显示能力

具有2行×16字符的显示能力,能够满足基本的文本显示需求,适用于各种需要显示简单信息的应用场景,比如仪器仪表、小型设备的状态显示等。

内置控制器

内置ST7066U控制器,为模块的稳定运行提供了保障。大家可以从http://www.newhavendisplay.com/app_notes/ST7066U.pdf 下载其详细规格说明,以便深入了解控制器的工作原理和特性。

电源要求

采用+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 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连接器,大家在实际设计中要注意引脚的连接,避免出现连接错误导致模块无法正常工作。

四、电气与光学特性

电气特性

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

从这些电气特性数据中,我们可以了解到该模块对电源、温度等方面的要求,在设计电路时要确保满足这些条件,以保证模块的正常运行。比如,在不同的温度环境下使用时,要考虑温度对模块电气性能的影响。

光学特性

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

这些光学特性决定了模块的显示效果,例如最佳视角范围可以帮助我们确定模块的安装位置,以获得最佳的视觉体验。而对比度和响应时间则影响着显示内容的清晰度和动态显示效果。

五、控制器信息与DDRAM地址

控制器

内置ST7066U控制器,其规格说明可从指定网址下载。了解控制器的特性对于正确使用模块至关重要,大家可以深入研究控制器的功能,以实现更复杂的显示控制。

DDRAM地址

DDRAM地址有特定的分布,第一行地址为00 - 0F,第二行地址为40 - 4F。在编程时,我们需要根据这些地址来写入和读取显示数据。

六、命令表

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 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

时序特性对于数据的正确传输至关重要,在设计电路和编写程序时,要严格按照这些时序要求来操作,否则可能会出现数据传输错误或显示异常的情况。大家在实际应用中有没有遇到过时序问题呢?是如何解决的?

八、初始化程序

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
}

初始化程序是模块正常工作的基础,不同的初始化方式适用于不同的应用场景。大家可以根据实际需求选择合适的初始化方式,并且可以对初始化程序进行优化,以提高模块的启动速度和稳定性。

九、质量信息与注意事项

质量测试

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
…… …… …… ……

这些质量测试表明了模块在不同环境条件下的可靠性。在实际应用中,我们要根据模块的使用环境来评估其是否能够满足要求。

注意事项

使用LCDs/LCMs时,要注意查看www.newhavendisplay.com/specs/precautions.pdf 中的注意事项,同时可以了解http://www.newhavendisplay.com/index.php?main_page=terms 的保修信息和条款条件。

总之,NHD - 0216BZ - FL - YBW字符液晶显示模块具有丰富的功能和特性,在设计应用时,我们要充分了解其各项参数和要求,合理使用,以实现最佳的显示效果和稳定性。

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • 相关推荐
  • 热点推荐

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分