电子说
在电子设备的设计中,液晶显示模块是不可或缺的一部分,它为用户提供直观的信息展示。今天我们要深入探讨的是Newhaven Display International推出的NHD - 0208AZ - FSW - GBW - 3V3字符液晶显示模块。
文件下载:NHD-0208AZ-FSW-GBW-3V3.pdf
NHD - 0208AZ - FSW - GBW - 3V3是一款具有特定规格和特性的液晶显示模块。从型号来看:
它能够清晰地显示2行8字符的内容,满足基本的信息展示需求。
内置了ST7066U控制器,其详细规格可从http://www.newhavendisplay.com/app_notes/ST7066U.pdf下载。
采用 +3.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 (+3.0V) |
| 3 | V0 | Adj Power Supply | Power supply 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 | Power supply for LED Backlight (+3.0V) |
| 16 | LED - | Power Supply | Ground for Backlight |
| 该模块有一系列的指令,用于控制显示和操作,例如: | Instruction | Instruction Code | Description | Description Time (270KHz) |
|---|---|---|---|---|
| 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.52 ms | |
| Return Home | 0 0 0 0 0 0 0 0 1 X | Set DDRAM address to "00H" from AC and return cursor to its original position if shifted. The contents of DDRAM are not changed. | 1.52 ms | |
| Entry Mode Set | 0 0 0 0 0 0 0 1 VD S | Sets cursor move direction and specifies display shift. These operations are performed during data write and read. | 37 us | |
| Display ON/OFF | 0 0 0 0 0 0 1 D C B | D = 1:entire display on C = 1:cursor on B = 1:cursor position on | 37 us |
这些指令通过不同的组合和设置,可以实现对显示内容、光标位置等的精确控制。
/**********************************************************/
void command(char i)
{
P1 = i;
D_I = 0;
R_W = 0;
E = 1;
Delay(1);
E = 0;
}
/**********************************************************/
void write(char i)
{
P1 = i;
D_I = 1;
R_W = 0;
E = 1;
Delay(1);
E = 0;
}
void init()
{
E = 0;
Delay(100);
command(0x30);
Delay(30);
command(0x30);
Delay(10);
command(0x30);
Delay(10);
command(0x38);
command(0x0c);
command(0x10);
command(0x06);
}
/**********************************************************/
void command(char i)
{
P1 = i;
D_I = 0;
R_W = 0;
Nybble();
i = i < < 4;
P1 = i;
Nybble();
}
/**********************************************************/
void write(char i)
{
P1 = i;
D_I = 1;
R_W = 0;
Nybble();
i = i < < 4;
P1 = i;
Nybble();
}
void Nybble()
{
E = 1;
Delay(1);
E = 0;
}
void init()
{
P1 = 0;
P3 = 0;
Delay(100);
P1 = 0x30;
Delay(30);
Nybble();
Delay(10);
Nybble();
Delay(10);
Nybble();
Delay(10);
P1 = 0x20;
Nybble();
command(0x28);
command(0x10);
command(0x0F);
command(0x06);
}
该模块经过了一系列的质量测试,包括高温存储、低温存储、高温操作、低温操作、高温高湿操作、热冲击抵抗、振动测试和静电测试等。例如,高温存储测试在 +80°C下进行48小时,低温存储测试在 - 30°C下进行48小时。
使用LCD/LCM时,需要注意一些事项,具体可参考www.newhavendisplay.com/specs/precautions.pdf。同时,关于保修信息和条款可查看http://www.newhavendisplay.com/index.php?main_page=terms。
在实际设计中,工程师们需要根据这些特性和参数,合理地将该模块应用到自己的项目中。你在使用类似液晶显示模块时,遇到过哪些问题呢?欢迎在评论区分享你的经验。
全部0条评论
快来发表一下你的评论吧 !