Tutorial Microcontroller 8051
 
 
 
 
 
   

BACK NEXT

Microcontroller Application LCD Character

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
Best Link

 

 

BACK NEXT

 

Lesson 1:
T o o l
1.1. Programmer
1.2.
Edsim 51
1.3. MIDE-51
1.4. ATMEL ISP

Lesson 2:
Input Output
2.1.LED
2.2.Swicht
2.3.7 Segmen
2.4.LCD Character
2.5.ADC
2.6.DAC
2.7.Motor Stepper
2.8.Keypad

Lesson 3:

Timer Counter

3.1.Basic
3.2.Mode 0
3.3.Mode 1
3.4.Mode 2
3.5.Mode 3

Lesson 4:

Serial Comm.

4.1.Basic
4.2.LED
4.3.Rotate LED
4.2 ADC
4.3.LCD

Lesson 5:
Interuption

5.1.Basic
5.2.Timer
5.2.External