LCD module Interfacing
R. Theagarajan. ME., MSc., PhD Rtd. Professor in Engineering email: rtheagarajan@yahoo.com rtrajan59@gmail.com
LCD module
It is an module contains separate controller • • • •
1 line, 2 lines, 4 lines 8, 16, 20, 24, 32, 40 characters in each line Hitachi controller - HD44780 Xx pin module
LCD module
It is an module contains separate controller • • • • •
1 line, 2 lines, 4 lines 8, 16, 20, 24, 32, 40 characters in each line Hitachi controller - HD44780 Xx pin module Data Bus D0 – D7
LCD module
It is an module contains separate controller • • • • • • • •
1 line, 2 lines, 4 lines 8, 16, 20, 24, 32, 40 characters in each line Hitachi controller - HD44780 Xx pin module Data Bus D0 – D7 Read / Write pin Command / Data pin Enable pin – 1 level to 0 level transition
LCD module
It is an module contains separate controller • • • • • • • • • •
1 line, 2 lines, 4 lines 8, 16, 20, 24, 32, 40 characters in each line Hitachi controller - HD44780 Xx pin module Data Bus D0 – D7 Read / Write pin Command / Data pin Enable pin – 1 level to 0 level transition Vcc power supply line Ground line
LCD module
It is an module contains separate controller • • • • • • • • • • •
1 line, 2 lines, 4 lines 8, 16, 20, 24, 32, 40 characters in each line Hitachi controller - HD44780 Xx pin module Data Bus D0 – D7 Read / Write pin Command / Data pin Enable pin – 1 level to 0 level transition Vcc power supply line Ground line Brightness control pin
LCD module +5
2
Brightness control
1
Data Bus
LCD module +5
2
Brightness control
1 RS
Data Bus C/D
LCD module +5
2
Brightness control
1 RS
Data Bus C/D R/W
LCD module +5
2
Brightness control
1 RS
Data Bus C/D R/W
EN
LCD module +5
2
Brightness control
1 RS R/W EN
Data Bus C/D
LCD module +5
2
Brightness control
1 RS
Data Bus
C/D R/W
EN
LCD module +5
2
Brightness control
1 RS R/W EN
Data Bus
C/D
LCD module +5
2
Brightness control
1 Data Bus
RS R/W EN
C/D
LCD module interface LCD module
ď C Port A
Data Bus
LCD module interface LCD module
ď C
RS
Port A PB 0
Data Bus C/D
LCD module interface LCD module
ď C
RS
Port A PB 0 PB 1
Data Bus C/D R/W
LCD module interface LCD module
ď C
RS
Port A PB 0 PB 1 PB 2
Data Bus C/D R/W EN
LCD module interface LCD module
ď C
RS R/W EN
Port A PB 0
PB 2
Data Bus C/D
Command Word / Instruction set Clear Display D7
D6
D5
D4
D3
D2
D1
D0
0
0
0
0
0
0
0
1
RS
R/W
0
0
C/D
Command Word / Instruction set Return cursor to home position D7
D6
D5
D4
D3
D2
D1
D0
0
0
0
0
0
0
1
*
RS
R/W
0
0
C/D
* Don’t Care
Command Word / Instruction set Calculator type
Entry mode set
Typewriter type
D7
D6
D5
D4
D3
D2
D1
D0
0
0
0
0
0
1
I/D
0
RS
R/W
0
0
C/D
I - Increment D - Decrement
Command Word / Instruction set Display On / Off control D7
D6
D5
D4
D3
D2
D1
D0
0
0
0
0
1
D
C
B
RS
R/W
0
0
C/D
D – Display C – Cursor B - Blinking
1 – On 0 – Off
Command Word / Instruction set Data Length - DL Display Lines – N Character front - F
Function set D7
D6
D5
D4
D3
D2
D1
D0
0
0
1
DL
N
F
*
*
RS
0 C/D
R/W
0
DL = 1 – 8 bits DL = 0 – 4 bits N = 1 – 2 lines N = 0 – 1 line
F = 1 – 5x10 dots F = 0 – 5x7 dots
Command Word / Instruction set Write Data into DD RAM D7
D6
D5
D4
Data RS
R/W
1
0
C/D
D3
D2
D1
D0
Command Word / Instruction set Read Busy Flag D7
D6
D5
D4
D3
D2
D1
D0
BF Address Counter RS
0 C/D
R/W
1
BF = 1 – Internally Operating BF = 0 – Can accept instruction
Avoid Plastics Plant a Tree Let us take care of our earth for future generation