PIC16C84_HD44780U_LCD_8 bit_5 x 8 font_2 Line
This project includes
Dot Matrix Liquid Crystal Display controller/Driver HITACHI HD44780U (LCD-II), PIC Microcontroller,2 line 8 character 5 x 8 font LCD, 74LS245 and 7404.
Introduction to HD44780U
8 data pins D7:D0
HD44789U have 8 Bi-directional data/command ports.
RS: Register Select
If RS = 0 then Instruction Register is selected, RS = 1 Data Register is
selected.
R/W: Read or Write
If R/W = 0 then data is write to instruction register or data register of the
HD44780U n data isIf R/W = 1 then data is read from instruction register or data register of the
HD44780U
E: Enable (Latch data)
This pin is used to latch the data present on the data pins. A high-to-low edge
is needed to latch the data.
Interfacing HD44780U with microcontroller
Interfacing micro controller with LCD display driver have two operations, one is modifying instruction register and other is modifying data register. Instruction register is used for setting interface data length, number of lines, shift operation e.t.c. and data register is used to store display characters.
RA0 is connected to the E (Enable), RA1 to R/W’ (Read/Write) and the RA2 to RS (Register Select).
To modify registers first check the busy flag, int Busy (void) function perform this operation. If busy flag is zero then set RS = 0 for Instruction Register and RS = 1 for Data Register. If R/W = 0 for writing the data to instruction register or data register of the HD44780U, A high-to-low edge in Pin E is needed to latch the data.
void Command (int Value) function to write data to instruction register and void Display (int Value) function is to write data to data register.
PIC Microcontroller is interfaced with the HD44780U with 8-bit data length.
To simulate circuit in this project, initially activate Mixed Mode simulator from the Schematic Editor window. Selecting Run Transient analysis from Simulation menu can perform simulation.
The source code in the
code editor window
has to be
compiled
after making any modifications
(editing).
Also the code can be
debugged
during
simulation.