Skip to content
May 1, 2010 / Nandha kumar

JHD162a LCD Display 3-Wire Interface with Arduino

Hi to all,

I have already posted a blog on the Jhd162a LCD display with Arduino.This is blog will be useful for those who are trying to interface LCD with Arduino by utilizing less number of Digital pins.

Usually to interface any HD44780 compatible LCD [JHD162a] with Arduino, we need minimum of 6 digital pins for connecting the LCD’s RegisterSelect, Enable and Data pins 4-7.

We can make use of the LiquidCrystal library to interface the LCD in the above way.[ Please Refer to my previous post ]

But, Need may arise to connect the Arduino with other devices or modules,which leads to shortage of digital pins in Arduino.hence in order to avoid this, We can interface the LCD with a maximum of 3 pins [ excluding 5V and GND ], thereby saving few more digital pins.

This 3-wire interface can be done using the Shift Registers. The work of Shift Register is to shift or carry the single data obtained as input to multiple outputs. more information about shift registers is found here . You can also download the LCD 3-wire library from this link and extract it under /arduino-directory/hardware/libraries in case of Arduino Version 0017 and or in /arduino-directory/libraries for version 0018.

I made use of the following schematic to build 3-Wire Interface.

LCD 3-Wire Interface with Arduino using HEF4094

I made use of Shift Register HEF4094 IC, 3K POT, Arduino ATMega328, JHD162a 16*2 Line LCD display to build the circuit, and followed the link http://www.arduino.cc/playground/Code/LCD3wires to build the schematic

Initially I built it using the BreadBoard. First time when I built the circuit and powered it up,uploaded the example code of the LCD3Wire library to the Arduino,But the Display dint turn-up. I checked the connections, also replaced the IC. But there was no much improvement.

BreadBoard connections

Then again I re built the schematic and this time I got the Black blocks in the First line of the LCD Display.I tuned the POT and the blocks got disappeared but the text was not getting printed on the Display.

I again tried several times reloading the sketch, checked the wiring, but I got only the same black blocks.

Then,I googled and found several 3-wire interfacing using various ICs like 74HC164, 74LC164N, 74HC595. I bought those ICs and tried those schematics from their respective weblinks. But I got only the black blocks and these schematics were complicated too. I also seeked help from Arduino forum. But the response was little slow and I was not able to clear the problem.

So, finally I seeked help from my project Guide, Mr. Thyagarajan Shanmugam.He told to try the HEF4094 Schematic again. Me and my guide sat together, built the schematic in a new Breadboard [ We had a doubt on the old Breadboard which I was using]. This time We got the same Black blocks on the display.

Again, we checked the wiring.I connected the Arduino 10,11,12 pins to the IC by placing Male pins on the BreadBoard. Since it was not in contact properly, we were not getting an text on the display. Then We fixed it and this time we found some junk characters scrolling on the Display.

We once again, checked the wiring and reset the Arduino. Atlast the Text was getting printed on the Display.The main thing is that the wiring must be properly hooked on when we are using a BreadBoard.

I also re-built the schematic in the Old BreadBoard I had and this time it was working fine.

The example code given by LCD3WireLibrary displays set of fruit names initialized in the character array in a Scrolling fashion using the random function.

Here are few pictures of the Interface

Arduino connected with Three wires , GND and 5V

LCD displaying the Text randomly from the Example code

Advertisements

8 Comments

Leave a Comment
  1. John Boxall / May 7 2010 5:32 am

    That is a really good idea – much cheaper than buying a serial LCD interface controller. Good work!

    • Nandha kumar / May 7 2010 10:53 am

      Thanks for the reply John.

      Even I attempted and failed several times to interface LCD using shiftRegister .

      I also planned atlast to buy an Serial LCD . But I tried it for one more last time with the help of my guide and I was able to achieve it, since he identified the problem in my circuit and helped me to solve it.

      Regards

      N.Nandhakumar

  2. HD LCD TV / May 16 2010 5:28 pm

    Hi! you have a great blog here! I’m definitely going to bookmark you! Thank you for your info.

  3. Karan Verma / Sep 30 2010 11:20 pm

    Hello,
    I am learning to interface an 8051 with a JHD162A LCD module, my query is related to circuit design, on the bread board have you used any electronic components such as resistance, capacitor or directly connected the LCD to the arduino module? If so then how did you decide which components to add and the required rating ?

    Thanking You

    Karan

    • Nandha kumar / Oct 2 2010 7:22 pm

      Hi Karan,

      I used the BreadBoard just to test the connections so that If something goes wrong somewhere, I can rebuild the circuit.

      Actually I am newbie to Electronics and A Computer science Graduate. So, probably I dont have much idea about the 8051 and LCD Interface. I am sorry for that. Maybe googling helps. Even I did the same.

      Main purpose that I used BreadBoard was to connect the 3k POT with the LCD to adjust its Display Contrast.

      Once again sorry that I am unable to Hep you out. Hope You get better solutions for your problem on Internet.

      Regards
      N.Nandhakumar

      • Karan Verma / Oct 15 2010 8:11 pm

        Thank You !

  4. Karan Verma / Oct 15 2010 8:12 pm

    One more thing : Did you use a pull up resistor ?

  5. Helder / Dec 25 2010 7:02 pm

    Great article! I’ll try this soon.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: