Offline
Newbie
Karma: 0
Posts: 45
|
 |
« on: March 07, 2012, 05:56:44 pm » |
As title, i have a problem to connect an LCD 16x2 ( JHD162A ) to my Arduino Diecimila. I've used this guide for connection http://www.ladyada.net/learn/lcd/charlcd.html. When i power up my lcd seems to work all, i can change contrast with potentiometer, backlight work and logic(second line black squares) work too. But when i upload "HelloWorld" sketch( and update line LiquidCrystal lcd(7, 8, 9, 10, 11, 12); ) LCD don't print nothing, i've tryed different sketchs but still does not work. I've checked connection and seems all to be right. Where can be the problem?
|
|
|
|
« Last Edit: March 07, 2012, 06:07:56 pm by Yaro »
|
Logged
|
|
|
|
|
|
|
Toronto, Canada
Offline
Edison Member
Karma: 2
Posts: 1233
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
|
 |
« Reply #2 on: March 07, 2012, 06:21:17 pm » |
Look at this line :
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
LiquidCrystal(rs, enable, d4, d5, d6, d7);
Did you connect the pins at the right place ? example : pin 7 to rs, pin 8 to enable, etc
The link is a standard LCD display. The LCD library should work. It work with me. I have IDE 022. And I have different LCD displays too, but the pins out are standard LCD display. As long the pins correspond to the pins inside the function, and the code is correct, it should work.
|
|
|
|
|
Logged
|
|
|
|
|
WV
Offline
Full Member
Karma: 0
Posts: 160
Arduino, Helps With the ADD
|
 |
« Reply #3 on: March 07, 2012, 09:00:01 pm » |
Dont forget the PoT ,, or you wont see a thing 
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 45
|
 |
« Reply #4 on: March 08, 2012, 09:04:42 am » |
Look at this line :
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
LiquidCrystal(rs, enable, d4, d5, d6, d7);
Did you connect the pins at the right place ? example : pin 7 to rs, pin 8 to enable, etc
The link is a standard LCD display. The LCD library should work. It work with me. I have IDE 022. And I have different LCD displays too, but the pins out are standard LCD display. As long the pins correspond to the pins inside the function, and the code is correct, it should work.
I've connected pins from 7 to 12 to lcd like in the guide, so yes. I need to add line LiquidCrystal(rs, enable, d4, d5, d6, d7); too? Dont forget the PoT ,, or you wont see a thing  As i said, i have connected pot and power, and seems all working, i can change contrast with pot. When i start arduino, lcd seems inizialize(for 1 sec the second row have black squares, after they disappear and lcd don't print nothing).
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3457
|
 |
« Reply #5 on: March 08, 2012, 10:43:10 am » |
i've tryed different sketchs but still does not work. Perhaps if you posted the sketch that didn't work we could help.
Do not post a link to the sketch that you think you used, we need a copy/paste version of the sketch that you actually used.Don
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 45
|
 |
« Reply #6 on: March 08, 2012, 12:36:54 pm » |
Here: /* LiquidCrystal Library - Hello World Demonstrates the use a 16x2 LCD display. The LiquidCrystal library works with all LCD displays that are compatible with the Hitachi HD44780 driver. There are many of them out there, and you can usually tell them by the 16-pin interface. This sketch prints "Hello World!" to the LCD and shows the time. The circuit: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2 * LCD R/W pin to ground * 10K resistor: * ends to +5V and ground * wiper to LCD VO pin (pin 3) Library originally added 18 Apr 2008 by David A. Mellis library modified 5 Jul 2009 by Limor Fried (http://www.ladyada.net) example added 9 Jul 2009 by Tom Igoe modified 22 Nov 2010 by Tom Igoe This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystal */
// include the library code: #include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); }
void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(millis()/1000); }
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3457
|
 |
« Reply #7 on: March 08, 2012, 01:58:47 pm » |
Lets get rid of all of the irrelevant stuff and the changing data and see what happens.
Try the following sketch. It doesn't matter which Arduino pins you use, just make sure that the pins in the LiquidCrystal lcd() comment match up with the numbers in the actual LiquidCrystal lcd() statement.#include <LiquidCrystal.h>
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7); LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() { lcd.begin(16, 2); lcd.print("hello, world!"); lcd.setCursor(0,1) lcd.print("it works!"); }
void loop() { } Be aware that if you initially have blocks on the second row of your display then you will have to stand on your head to read the text.Don
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 45
|
 |
« Reply #8 on: March 08, 2012, 06:16:22 pm » |
Doesn't work, tomorrow i will post photo of connections, lcd backgroud and a video of what i see. May be the voltage too high? i've connected all vcc to arduino +5V(and a 10k pot to contrast). On datasheet i've found that: 6.ELECTRICAL SPECIFICATIONS(Ta=250C,Vdd=5.0V) Item Symbol Condition Standard Value Min Type Max Unit Supply Voltage for logic Vdd-GND - 4.5 5.0 5.5 V Supply Current for logic Idd - 1.0 - mA Driving Current for LCD Iee - 0.6 - mA Driving Voltage for LCD Vdd-V5 4.2 4.5 4.8 V Input Voltage H level Vih 2.2 - Vdd V Input Voltage L level Vil Vdd=5V -0.3 - 0.6 V Output Voltage H Voh Ioh=-0.205mA 2.4 - - V Output Voltage L Vol Io1=1.2mA - - 0.4 V
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 45
|
 |
« Reply #9 on: March 09, 2012, 10:55:40 am » |
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 0
Posts: 117
|
 |
« Reply #10 on: March 09, 2012, 12:31:52 pm » |
After you load the sketch hit the reset button and see what happens. On my Uno (r2) if I have any of the lcd pins hooked up to either pin 3 or 7 then it will not run. It will work if I move to any of the other pins. The new Uno(r3) has fixed this by building a better reset circuit.
|
|
|
|
|
Logged
|
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3457
|
 |
« Reply #11 on: March 09, 2012, 12:41:16 pm » |
Your photographs are not very helpful because there is no single picture where I can trace the wires between your Arduino and your LCD module.
I do not trust those video download links so I have not seen the videos.
From what I can see in the '9gvimd' picture you have not interpreted the pins correctly. Pin 1 is near the outside edge of the PC board and pin 16 is near the center.
Don
|
|
|
|
« Last Edit: March 09, 2012, 12:43:05 pm by floresta »
|
Logged
|
|
|
|
|
IRL
Offline
Full Member
Karma: 0
Posts: 138
|
 |
« Reply #12 on: March 09, 2012, 01:35:56 pm » |
tin solder is notorious bad with these row headers.
Do you have any other display?
Have you tried to use it in 8bit mode + measured all signals directly on the LCD (if anything arrives at all)?
|
|
|
|
|
Logged
|
I also have PIC related web domain.
|
|
|
|
Western New York, USA
Offline
Faraday Member
Karma: 17
Posts: 3457
|
 |
« Reply #13 on: March 09, 2012, 01:48:34 pm » |
Have you tried to use it in 8bit mode + measured all signals directly on the LCD (if anything arrives at all)? It doesn't matter what mode he uses it in and what signals are sent to the data pins if he doesn't provide power to the IC controller via pins 1 and 2.Don
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 45
|
 |
« Reply #14 on: March 09, 2012, 02:36:08 pm » |
Your photographs are not very helpful because there is no single picture where I can trace the wires between your Arduino and your LCD module.
I do not trust those video download links so I have not seen the videos.
From what I can see in the '9gvimd' picture you have not interpreted the pins correctly. Pin 1 is near the outside edge of the PC board and pin 16 is near the center.
Don
Sorry, i thought they were more understandable, i will try to do better photos. As you see in the photo '2vdqwj9' i've powered pin 1-2 with two wire above the board, external are gnd and internal are +5 volt, the third pin from right is for contrast(pin3), next are rs(pin4), mass(pin5), enable(pin6), 4 unused pin(pin7-10), and db4(pin11), db5(pin12), db6(pin13), db7(pin14), they go to arduino in, rs (arduino pin 7 ), e (arduino pin 8 ), from arduino pin 9-12 are db4-db7. If i had not power them i shouldn't see "black" squares when i power arduino. Videos are uploaded on videoweed, it's a streaming video site, just click on bottom left 'symbol play' in the video window, not in center like youtube. If you want i can upload it on another site that you tell me. tin solder is notorious bad with these row headers.
Do you have any other display?
Have you tried to use it in 8bit mode + measured all signals directly on the LCD (if anything arrives at all)?
I don't have any other displays, and as i said i check all wires form lcd to arduino with an ohmeter, so signal should arrive. After you load the sketch hit the reset button and see what happens. On my Uno (r2) if I have any of the lcd pins hooked up to either pin 3 or 7 then it will not run. It will work if I move to any of the other pins. The new Uno(r3) has fixed this by building a better reset circuit.
Nothing, i can try to move pin 7 to pin 6, i'll say you what happen. But i don't think this is the problem, because in the guide he use an arduino duemilanove, and i've an arduino diecimila. I'm going angry with this lcd.
|
|
|
|
« Last Edit: March 09, 2012, 02:40:43 pm by Yaro »
|
Logged
|
|
|
|
|
|