In this post/tutorial i am going to teach you how to interface graphical lcd jhd12864E with microchip pic16f877 microcontroller. I am going to display my website name “www.microcontroller-project.com” and a special pattern that displays thick lines on dotted graphical lcd display. In graphical lcd name “jhd12864” the number 128×64 means lcd has 128 coulombs and 64 rows. On graphical lcd’s data(character, numbers) is displayed on dots. A joint between coulomb and row is termed as dot. Total dots present in jhd12864 lcd are 128 x 64 = 8192 dots. When dots are combined they make a dot cluster. This cluster of dots in square form is know as matrix. On these 8192 dots we can display/make our data(character, number, image). In graphical lcd’s we are free to make character’s of our desired size unless the size is in the matrix of graphical lcd.
Before proceeding i would recommend you to please go through a small tutorial. This tutorial will helps you to understand how text is displayed on graphical lcd, how graphical lcd dots are arranged in pages, how graphical lcd is initialized(Graphical Lcd initializing commands), each and every pin of graphical lcd is deeply explained in the tutorial. You can easily understand the code below if you go through the tutorial.
Projects Requirements
- Microcontroller(Microchip Pic16f877)
- Graphical Lcd(JHD12864E)
- Crystal (20MHZ)
- Capacitors (30pf)
- Potentiometer-Variable resistor(0-100k)
- Connecting Wires
- Power Source (Battery, Adapter etc)
Graphical Lcd which i am using is JHD12864E. It comes in 20 Pin Package. Pin out of JHD12864E is given below. Its an 8-bit lcd. It comes with two built in controllers. Each controller is selected with chip select pins (cs1 and cs2). Visit the tutorial link given above to properly understand the pin functions and how to use them properly.
Lcd data pins are connected to Port-B of pic16f877 microcontroller. Lcd is interfaced in 8-bit mode with microcontroller. RS(register select) Pin of Lcd is connected to Port-D pin#7. RW(Read/Write) Pin of Lcd is connected to Port-D Pin#6. EN(Enable) Pin of Lcd is Connected to Port-D pin#5. CS1(Chip select) Pin of Lcd is connected to Port-D pin#4. CS2(Chip select) of lcd is connected to Port-C pin#4. RST(Reset) pin of Lcd is Connected to Port-D pin#2. A variable resistor is used between pins VEE and V0. This variable resistor is very important, it sets the Lcd contrast. Just connect the resistor, vary the resistance by rotating the knob, Adjust the best quality of lcd display that suites you. You can view highly black colour dots by increasing the resistance. If you want to see fant text reduce the resistance. LED+ and LED- are back light pins. I usually switch on the back light same i did for this project.
Read more: Interfacing Graphical LCD(GLCD-JHD12864E) with Microchip PIC16f877 Microcontroller
The post Interfacing Graphical LCD(GLCD-JHD12864E) with Microchip PIC16f877 Microcontroller appeared first on PIC Microcontroller.