Académique Documents
Professionnel Documents
Culture Documents
I) Caractristiques techniques.
I.1) Description des broches et connexion de lafficheur LCD avec un micro contrleur.
Le dialogue avec un C ou P se fait par un bus de donnes de 8 bits ou de 4 bits. Les changes dinformations sont synchroniss par des signaux de commandes: - R/W (Lecture/criture). - RS(Register Select : Registre de slection). - E (Enable : Mmorisation).
Mode 4 bits
LCD 4x20 VDD 2 P1 4.7K C1 22nF +5V
VO
7 8 9 10 11 12 13 14
7 8 9 10 11 12 13 14
En mode 4 bits les entres DB0 DB3 doivent tre non connectes
4 5 6
4 5 6
Page 1/11
00
01
02
03
04
05
06
07
08
09 0A
0B 0C 0D 0E
0F 10
11
12
13
@
Code ASCII
40
41
42
43
44
45
46
47
48
49 4A
4B 4C 4D 4E
4F 50
51
52
53
@
Code ASCII
14
15
16
17
18
19
1A
1B 1C 1D 1E
1F
20
21
22
23 24
25
26
27
@
Code ASCII
54
55
56
57
58
59
5A 5B 5C 5D 5E
5F
60
61
62
63 64
65
66
67
Contrleur LSI
RS=0 Instruction Register
AFFICHEUR LCD 4 x 20
RS R/W E DB0 .. DB7
Page 2/11
0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011
xxxx0000
xxxx0001
(2)
xxxx0010 xxxx0011
(3)
(4)
xxxx0100
(5)
xxxx0101
(6)
xxxx0110
(7)
xxxx0111
(8)
xxxx1000
(1)
xxxx1001
(2)
xxxx1010
(3)
xxxx1011
(4)
xxxx1100
(5)
xxxx1101
(6)
xxxx1110
(7)
xxxx1111
(8)
Page 3/11
DB0 to DB7
Mode 4 bits :
RS 60ns RW 450ns 20ns 450ns 20ns 20ns
Page 4/11
5ns
Mode 4 bits :
RS 60ns RW 450ns 20ns EN 20ns 360ns DB4 to DB7 5ns 360ns 5ns 450ns 20ns 20ns
Page 5/11
REMARQUE IMPORTANTE: Lcriture dune donne une adresse, affiche le caractre correspondant au code ASCII et incrmente ou dcrmente le compteur dadresse ADD (compteur adresse de la DDRAM). Exemple: Soit I/D=1 (Mode par dfaut: incrmentation), si ladresse courante est $00, lenvoie de $43 (code ASCII de la lettre C) dans le registre de donnes aura pour effet dafficher un C lcran et dincrmenter le compteur dadresse ADD de 1, sa valeur sera gale $01 aprs linstruction.
Page 6/11
Temps dxcution = 40 S.
Page 7/11
Page 8/11
Entry mode set Display on/off control Cursor or display shift Function set Set CGRAM address Set DDRAM address
I/D
0 0 0 0
0 0 0 0 1
0 0 0 1 BF
0 0 1
0 1
1 DL
S/C N
R/L F
* *
* *
Read busy flag 0 & address Write data to CG or CCRAM Read data from CG or DDRAM 1 1
0 1
I/D = 1: Increment I/D = 0: Decrement S = 1: Accompanies display shift S/C = 1: Display shift S/C = 0: Cursor move R/L = 1: Shift to the right R/L = 0: Shift to the left DL = 1: 8 bits, DL = 0: 4 bits N = 1: 2 lines, N = 0: 1 line F = 1: 5 10 dots, F = 0: 5 8 dots BF = 1: Internally operating BF = 0: Instructions acceptable DDRAM: Display data RAM CGRAM: Character generator RAM
Page 9/11
Power on
BF cannot be checked before this instruction . Function set (Interface is 8 bits long.)
BF cannot be checked before this instruction . Function set (Interface is 8 bits long.)
BF cannot be checked before this instruction . Function set (Interface is 8 bits long.)
BF can be checked after the following instructions . When BF is not checked, the waiting time between instructions is longer than the execution instuction time. Specify the number of display lines and character font .) The number of display lines and character font cannot be changed after this point .
Initialization ends
Page 10/11
Wait for more than 15 ms after V CC rises to 4.5 V BF cannot be checked before this instruction . Function set (Interface is 8 bits long.)
BF cannot be checked before this instruction . Function set (Interface is 8 bits long.)
BF cannot be checked before this instruction . Function set (Interface is 8 bits long.) Function set (Set interface to be 4 bits long .) BF can be checked after the following instructions . When BF is not checked , the waiting time between instructions is longer than the execution instuction time. Function set ( Specify the number of display lines and character font.) The number of display lines and character font cannot be changed after this point . Display on Display clear Cursor On and Blinking
0 0
0 0
0 1
0 0
1 0
0 0
0 0
0 0
0 1
0 1
0 1
0 1
Initialization ends
Page 11/11