INTERFACING OF LCD IN 4-BIT MODE USING MICRO-CONTROLLER
In this
method of Interfacing LCD to Microcontroller using 4-bit mode is to reduce the
usage of pin.
Mostly the
Circuit having multiple function uses this method.
In this
method PORT0 of UC is connected to LCD as Follows:
P0.0 =>
rs; Register select Pin
P0.1 =>
en; Enable Pin
P0.4 =>
D4; data line
P0.5 =>
D5;
“
P0.6 =>
D6; “
P0.7 =>
D7; “
In method we
use same port for control pin as well as data line. So each data is send by
breaking it into two 4bit part.
To initialize LCD in this method a command used is 0x28
Which means 16 x 2 LCD in 4-bit mode.
Before doing that we should send a sequence of 0x30, 0x30, and
0x20.
To send this we use only cmd_hf function which send only 3, 3,
and 2 as sequence to LCD to enable in 4-Bit mode.
To send each data we should first clear the higher order bit
i.e. from P0.4 – P0.7
And masking the input is properly shown in video.
- We should mask Higher bit and rest all bit are clear.
- We send by latching.
- We should now mask lower bit and send to UC.
This is how a 4-Bit mode LCD works.
Thank you for reading.
Plz Do share and Subscribe.
Source Code: click for code
For Videos on this Example: Click on the link












