Warning: mysql_query(): Unable to save result set in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 411

Warning: Cannot modify header information - headers already sent by (output started at /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php:411) in /home/efkids/public_html/app/controllers/projects_controller.php on line 163

Warning: Cannot modify header information - headers already sent by (output started at /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php:411) in /home/efkids/public_html/app/controllers/projects_controller.php on line 164
EFKids - PIC Basic - Three Wire Interfacing with an LCD Screen JHD162A
Post a Comment
Back to Projects
< PrevNext >
  Welcome Guest !
Learn Basics

PIC Basic - Three Wire Interfacing with an LCD Screen JHD162A

  PRO130

This project is first part of a series of projects designed to experiment and understand how PIC microcontroller can be effectively used to interface with external circuit and get data from and control external devices. Once you have completed hands on experiment with this series you should able to design a minimal robot or other such relatively complex programmable control system.

To see a list of all basic PIC projects planned in this series please click here. To get a basic understanding of PIC microcontrollers and how to use them please click here. This link covers the basic FAQ of PIC for newbies as there is a lot of literature available on the web for advanced users.

LCD is great debugging tool that can provide valuable information as to what is going on inside the PIC when an embedded program is running. The other option to get debug information is by piping debug info into a computer through an RS232 interface. But I prefer LCD as it will not tie you down to a PC (especially when you are doing robotics). In the earlier project click here. we have already seen how to interface an LCD with PIC. But it used 7 of the PIC pins to do this interfacing. In most situations we may not have so many PIC pins available for just debugging purpose. This project shows how we can interface LCD using just three of the PIC pins.

The LCD JHD162A has 16 pins in total and uses 12 of these pins to communicate with input devices. Eight of these pins accept a one byte (8 bits) of data and works as a parallel port. It can also be configured to accept 4 bits of data at a time using pins 11-14. To do the 3 wire communication we will take the help of shift registers which will store the entire 8 bits of data and communicate with the LCD, instead of PIC directly feeding this information to LCD. Register will also be used to communicate with the RS pin (pin 4). PIC communicates with shift registers one bit at a time (using first wire) and a clock pulse (second wire) in a serial format. Once the data is set on the register output pins, the PIC uses a clock line (third wire) to initiate reading the data from the registers by triggering the enable pin of LCD (E pin, pin 6).

Refer to the schema above to get an idea of how 3 wire interfacing is done. This project is also help you understand how serial to parallel communication can be achieved. We recommend you to refer to LCD Integration project for additional information.

Also go through the datasheets for PIC16F72 to get a good understanding of other details of the microcontroller.
The C compiler used for this project is Hi-TECH light
Click to view PIC code
The compiled HEX file. (this can be directly burned into your PIC)
click here


List of parts used in the project
Ref Part type Part Name Value Count Info
 Bat1BATTERYPACKBattery Pack 12V AA12V1 See Picture
 C1,C2CAPACITORCapacitor 27pF27pF2 See Picture
 C3,C5ELECCAPACITORElectrolytic Capacitor 220uF220uF2 See Picture
 C4CAPACITORCapacitor 100n100n1 See Picture
 Cr1CRYSTALCrystal 4.0 MHz4.0MHz1 See Picture
 IC BaseHOLDERIC Base 16 Pin16Pin4 See Picture
 IC1ICPIC16F7216F72PIC1 See Picture
 IC2ICIC LM78057805IC1 See Picture
 IC3,IC4ICIC 7417474174IC2 See Picture
 LCDDISPLAYLCDLCD 16x2 JHD162AJHD162ALCD1 See Picture
 PCBPCBPCB Gen Purpose DD 4x34x3inch1 See Picture
 POT1POTPot Meter 5K5K1 See Picture
 R1RESISTORResistor 10K10K1 See Picture


Approximate cost for building this project is Rs 604.00


Note: In addition to the above components you may also require a breadboard and power supply / batteries for building this project.


Post a comment or question
Post Type:
Comment:
Please login to post a comment or question
Click here to login or register
Social Likes
Join EFKids Club


text image
* Enter the text above for captcha
Join EFKids Club to get notified when new projects are added.


Electronics For Kids Copyright 2010 - 18 .   EFKids
About EFKids

Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0