BACK
NEXT

Figure 2.4.2. Pin connection betwen
LCD Character to microcontroller
( Download Complete Circuit
File : LCDCharacter.PDF )
Initializing
LCD Character
Function Set
Sets the interface data lenght, the number of lines, and character
font
RS |
R/W |
DB7 |
DB6 |
DB5 |
DB4 |
DB3 |
DB2 |
DB1 |
DB0 |
0 |
0 |
0 |
0 |
1 |
DL |
N |
F |
X |
X |
Note : X = Don't care
DL : Sets interface data lenght. DL = 1, Data is sent or received in 8 bit lenght ( DB7 - DB0 ) DL = 0, Data is sent or received in 4 bit lenght ( DB7 - DB4 ) When the 4 bit lenght is selected, data must be sent or recived twice.
Entry Mode Set
Sets the increment/ Decrement and Shift modes to the desired
settigs
RS |
R/W |
DB7 |
DB6 |
DB5 |
DB4 |
DB3 |
DB2 |
DB1 |
DB0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
I/D |
S |
I/D : Increment/ Decrement the DDRAM address by 1 when a character code is writen into or read from the DDRAM I/D = "0", Decrement I/D = "1", Increment S : Shift the entire display either to the right or to left. S = 1, shift to right or left depent on I/D S = 0, display does not shift
Display On/ Off Cursor
Controls the display ON/OFF status, cursor ON/OFF and Cursor Blink function
RS |
R/W |
DB7 |
DB6 |
DB5 |
DB4 |
DB3 |
DB2 |
DB1 |
DB0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
D |
C |
B |
D : Controlling display D = 1, Display is ON D = 0, Display is OFF
In this case display data remains in the DDRAM. It can be displayed immediately by setting D = 1. C : Display cursor C = 1, Cursor is Displayed C = 0, Cursor does not display B : The character indicated by the cursor blinks when B=1
Clear Display
The execution of clear display instruction sets entry mode
to increment mode
RS |
R/W |
DB7 |
DB6 |
DB5 |
DB4 |
DB3 |
DB2 |
DB1 |
DB0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
Cursor of Display Sift
Shifts the cursor position or display to the right or left
without writing or reading display data. This function is used to corect
or search for the display
RS |
R/W |
DB7 |
DB6 |
DB5 |
DB4 |
DB3 |
DB2 |
DB1 |
DB0 |
0 |
0 |
0 |
0 |
0 |
0 |
S/C |
R/L |
X |
X |
Note : x = Dont care
S/C |
R/L |
Note |
0 |
0 |
Shift cursor position to the left |
0 |
1 |
Shift cursor position to the right |
1 |
0 |
Shift the entire display to the left |
1 |
1 |
Shift the entire display to the right |
BACK
NEXT
|