Lecture 43 : Interfacing PIC16F877 Microcontroller with an LCD
To interface LCD (Displaytech 162A) with PIC16F877microcontroller and to display “IITK” in the Liquid Crystal Display (LCD).
- MPLAB IDE (PIC microcontrollers simulator)
- PIC BURNER 3 with software to load the code
- LCD (Displaytech 162A)
- Computer System with Windows operating system and RS 232 cable
- PIC16F877 Microcontroller
- +5V D.C Power Supply
- Resistors – 10K Ω-1,50Ω-1
- Capacitors – 27 µ F-2
- Potentiometers – 10K Ω -1
- 20MHz Crystal oscillator
- SPST switches -1
- Write the assembly code in MPLAB IDE simulator , compile it and check for errors
- Once the code was error free, run it and check the output in the simulator.
- After checking the code in the simulator, load the code (in .HEX format) into PIC16F877 microcontroller using PIC BURNER3.
- Make connections as shown in the circuit diagram.
- Switch on the power supply and observe “IITK” displayed in the LCD.
Liquid Crystal Display (LCD-Displaytech 162A )LCD Displaytech 162A consists of a LCD panel, a controller IC (KS0070B) and a back light LED. The LCD module consists of total 16 pins in which, 2 are for power supply, 2 pins for Backlight LED, one pin for contrast adjustment, 3 pins are for control signals and 8 pins are data pins. In order to display any data, we need to do certain initiations. The following are the main three steps in displaying any data in the LCD display.
- Initializing LCD by sequence of instructions
- Executing commands depending on our settings in the LCD
- Writing data into the DRAM locations of LCD in the Standard Character Pattern of LCD
For doing above steps, refer the manual for LCD and follow the instructions and timing diagrams strictly.
MPLABIDEMPLABIDE is a free software which can be downloaded from the website www.microchip.com
Working with MPLABIDE :
MPLABIDE is a simulator for PIC microcontrollers to write and edit the code in assembly language, compile it and also to run the code. Output can be verified using simulator.
For more detail: Lecture 43 Interfacing PIC16F877 Microcontroller with an LCD
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic – Simulation – PCB Layout – Gerber Viewer
JLCPCB Prototype: Only $2 for 10pcs 10×10cm, 24 hours Quick Turn, DHL Delivery in 3 days