Figure 2.4.2. Pin connection betwen LCD Character to microcontroller
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 |
|
DL |
Note : X = Don't careDL : 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 |
|
I/D |
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 |
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 |
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 |
|
S/C |
R/L |
Note : x = Dont care
|
S/C |
R/L |
Note |
| Shift cursor position to the left | ||
| Shift cursor position to the right | ||
| Shift the entire display to the left | ||
| Shift the entire display to the right |