Welcome to hificat.com ---- HANGZHOU KinCony ELECTRONICS CO.,LTD.
About Us Contact Us          Our Patents Our Articles        Forum      SiteMap    Chinese Version

Chapter 1. Overview Chapter 2. Emulation Guide Chapter 3. Build Your First Project Chapter 4. In System Programming
Chapter 5. USB Interface Installation Chapter 6. LED Display Application Chapter 9. FAQ Chapter 10. System Configuration and Service
 
Chapter 7. Basic Experiments
7.1. Experiment with LED 7.2. Experiment with Flowing LEDs 7.3. Experiment with Keys 7.4. Experiment with Beeper
7.5. Experiment with Relay 7.6. Experiment with LED Display 7.7. Experiment with Serial Port  
 
8.1. Experiment with Matrix Key 8.2. Experiment with Stepping Motor 8.3. Experiment with 1-Wire Digital Thermometer DS18B20
8.4. Experiment with 24C01 EEPROM 8.5. Experiment with 93C46 Serial EEPROM 8.6. Experiment with DS1302 Real-time Clock
8.7. Experiment with 8-bit Serial AD Converter ADC0832 8.8. Experiment with 1602 Character LCD Module 8.9. Experiment with 12864 Graphic LCD
8.10. Experiment with Infra-red Remote Controller 8.11. Experiment with Wireless Encoding Module Chapter 11. User Feedback

Chapter 8. Advanced Experiments

8.8. Experiment with 1602 Character LCD Module

Character LCD module is a type of LCD display, designed to display characters, numerical numbers, sign, etc. 16*1, 16*2, 20*2, 40*2 are most frequently used modules.

Specifications and Pin Assignment

There are two types of 1602 LCD, with backlight one, and without backlight one. Its controller IC is HD44780. The LCD with backlight is thicker than that without backlight. Their dimensional difference are shown in below picture.

Display Content: 16 * 2 characters

Operation Voltage: 4.5 - 5.5V

Working Current: 2.0mA at 5.0V

Recommended Working Voltage: 5.0V

Character Dimension: 2.95 * 4.35 (W * H)mm

Pin No.

Symbol

Function

1

Vss

Ground

2

Vdd

+5V

3

VL

LCD contrast adjust.

When VL is connected to Vdd, LCD contrast is the lowest. When VL is connected to Vss, LCD contrast is the highest. For best visibility, use a 10k potentiometer to get the suitable resistance.

4

RS

Register select.

High level to select data register. Low level to select command register.

5

R/W

Read / Write

High level to read and low level to write. When both RS and R/W are low, command or data address can be written. When RS is low, and R/W is high, busy signal can be read. When RS is high and R/W is low, data is allowed to be written into registers.

6

E

Enable

High to low level, LCD execute commands.

7

DB0

Data bit 0. Bidirectional data bus.

8

DB1

Data bit 1 Bidirectional data bus.

9

DB2

Data bit 2 Bidirectional data bus.

10

DB3

Data bit 3 Bidirectional data bus.

11

DB4

Data bit 4 Bidirectional data bus.

12

DB5

Data bit 5 Bidirectional data bus.

13

DB6

Data bit 6 Bidirectional data bus.

14

DB7

Data bit 7 Bidirectional data bus.

+

BL+

Power Supply for BL+

-

BL-

Power Supply for BL-

Instruction and Timing

Instruction

RS

R/W

DB7

DB6

DB5

DB4

DB3

DB2

DB1

DB0

Clear Display

0

0

0

0

0

0

0

0

0

1

Cursor At Home

0

0

0

0

0

0

0

0

1

-

Entry Mode Set

0

0

0

0

0

0

0

1

I/D

SH

Display On/Off Control

0

0

0

0

0

0

1

D

C

B

Cursor or Display Shift

0

0

0

0

0

1

S/C

R/L

-

-

Function Set

0

0

0

0

1

DL

N

F

-

-

Set CGRAM Address

0

0

0

1

AC5

AC4

AC3

AC2

AC1

AC0

Set DDRAM Address

0

0

1

AC6

AC5

AC4

AC3

AC2

AC1

AC0

Read Busy Flag and Address

0

1

BF

AC6

AC5

AC4

AC3

AC2

AC1

AC0

Write Data to RAM

1

0

D7

D6

D5

D4

D3

D2

D1

D0

Read Data from RAM

1

1

D7

D6

D5

D4

D3

D2

D1

D0

 

Instruction

Function

Clear Display

Write 20H to DDRAM and set DDRAM address to 00H from AC

Cursor At Home

Set DDRAM address to 00H from AC and return cursor to its original Position if shifted. The contents of DDRAM are not changed.

Entry Mode Set

Assign cursor moving direction and enable the shift of entire display.

Display On/Off Control

Set display (D), cursor(C), and Blinking of cursor (B) ON/OFF control bit.

Cursor or Display Shift

Set cursor moving and display shifts cursor bit, and the direction, without changing of DDRAM data.

Function Set

Sets interface data length (DL: 8-BIT / 4-BIT), number of display lines(N: 2-line / 1-line) and, display font type (F: 5x11dots / 5x8 dots).

Set CGRAM Address

Set CGRAM address in address counter.

Set DDRAM Address

Set DDRAM address in address counter.

Read Busy Flag and Address

Whether during internal operation or not can be known by reading BF. The contents of address counter can also be read.

Write Data to RAM

Write data into internal RAM (DDRAM / CGRAM)

Read Data from RAM

Reads data from internal RAM (DDRAM / CGRAM).

Software and Hardware Design

Display the website link www.hificat.com in first line of 1602 LCD.

Display the telephone number 0571-85956028 in second line of 1602 LCD.

Switch to LCD display mode before this experiment.

Schematic Diagram

1602 LCD can communicate with MCU AT89C51 directly.

Program Flow Chart



COPYRIGHT2003--2008 HANGZHOU KinCony ELECTRONICS CO.,LTD. All Rights Reserved

Add:Rm 11-3-702, Pujing Jiayuan, Gongshu District, Hangzhou, Zhejiang, China.
Tel:+86-0571-85956028,Fax:+86-0571-88230070 E-mail: hificat@163.com  ICQ:164806453  Webmaster:Hificat