Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Trouble interfacing 16*2 lcd with arduino

Status
Not open for further replies.

dragonwarrior

New Member
hi everyone.
i am new to arduino programming.
When i interfaced JHD162A LCD with my arduino (ATMEGA 8) and uploaded the "Hello World "
program in the arduino library,i get blank (no display) in the first row and black square boxes in the second row.

I connected a 5K pot on pin 3 on the lcd and i was able to adjust the contrast of the lcd.
but why this problem ? please help me..

Any help will be appreciated..
thanks in advance..
 
Are you using the LCD routines within the Arduino IDE? Are you using pin 9 or pin 10 for 'LCD E' ?

If the contrast is adjusting, then the LCD isn't initialising..... Incidentally!!! Is the display upside down... An uninitialised display has black squares on the top row...
 
yes,the lcd routine is within the arduino IDE.
I am using pin 10 on arduino for LCD 'Enable'.
i see black squares in bottom row and first row is blank.
 
Have you an LCD shield? Or are you connecting directly to the pins....

Can you show me the code..... Or which sketch are you using.... I just want to check that the sketch pin definitions are correct.
 
since i have only little knowledge on soldering,i connected the lcd pins onto a breadboard and then to the arduino pins.
I use arduino 1.0 and windows 7 as OS. I am using arduino ATMEGA8.
 
First... When using a four wire databus... It isn't a good idea to use the RW pin... Ground this out and remove pin 11 from the init...

Code:
LiquidCrystal lcd(12, 10, 5, 4, 3, 2);

Here is the wiring needed for that display..
 
now it works fine!!
There are few problems in the arduino lcd library..
I tried the updated library which helped me connect the lcd properly to the arduino and then it worked well..
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top