电子说
在电子设备的设计中,液晶显示模块是人机交互的重要组成部分。今天,我们就来深入了解一下Newhaven Display International推出的NHD - 0216PZ - FL - YBW字符液晶显示模块,看看它有哪些特性和应用要点。
NHD - 0216PZ - FL - YBW是一款2行×16字符的液晶显示模块,型号编码蕴含了丰富的信息:
该模块内置ST7066U控制器,支持+5.0V电源供电,采用1/16 duty、1/5 bias的驱动方式,并且符合RoHS标准。
机械设计方面,相关信息属于Newhaven Display International的专有财产,未经许可不得复制、再现或披露。
| 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.6V) |
| 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.8 | 5.0 | 5.2 | V |
| Supply Current | IDD | VDD = 5.0V | 1.0 | 1.5 | 2.5 | mA |
| Supply for LCD (contrast) | VLCD | TOP = 25°C | 4.2 | 4.4 | 4.6 | 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 | - | 4.8 | 5.0 | 5.2 | V |
| Backlight Supply Current | ILED | VLED = 5.0V | 110 | 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 |
| 模块内置ST7066U控制器,其规格书可从http://www.newhavendisplay.com/app_notes/ST7066U.pdf下载。DDRAM地址分配如下: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 14 |
|---|---|---|---|---|---|---|---|---|---|---|
| 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F | ||||||||||
| 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 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 | |
| Entry mode Set | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | I/D | SH | Sets cursor move direction and specifies display shift. These parameters are performed during data write and read. | 37µs | |
| Display ON/ OFF control | 0 | 0 | 0 | 0 | 0 | 0 | 1 | D | C | B | D = 1: Entire display on C = 1: Cursor on B = 1: Blinking cursor on | 37µs | |
| Cursor or Display shift | 0 | 0 | 0 | 0 | 0 | 1 | S/C | R/L | - | - | Sets cursor moving and display shift control bit, and the direction without changing DDRAM data. | 37µs | |
| Function set | 0 | 0 | 0 | 0 | 1 | DL | N | F | - | - | DL: Interface data is 8/4 bits N: Number of lines is 2/1 F: Font size is 5x11/5x8 | 37µs | |
| Set CGRAM Address | 0 | 0 | 0 | 1 | AC5 AC4 AC3 AC2 AC1 AC0 | Set CGRAM address in address counter | 37µs | ||||||
| Set DDRAM Address | 0 | 0 | 1 | AC6 AC5 AC4 AC3 AC2 AC1 AC0 | Set DDRAM address in address counter. | 37µs | |||||||
| Read busy Flag and Address | 0 | 1 | BF | AC6 AC5 AC4 AC3 AC2 AC1 AC0 | Whether during internal operation or not can be known by reading BF. The contents of address counter can also be read. | 0s | |||||||
| Write data To Address | 1 | 0 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | Write data into internal RAM (DDRAM/CGRAM). | 37µs | |
| Read data From RAM | 1 | 1 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | Read data from internal RAM (DDRAM/CGRAM). | 37µs |
| 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 |
文档中给出了内置字体表,但由于内容呈现较为复杂,这里就不详细列出了。大家在实际使用中可以参考文档中的具体内容。
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
}
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. | - |
全部0条评论
快来发表一下你的评论吧 !