Pages: [1] 2   Go Down
Author Topic: 16x1 LCD BUG  (Read 1485 times)
0 Members and 1 Guest are viewing this topic.
Mangalore, India
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After frying smiley-cry a JHD162A, I bought a JHD161A, a 16x1 display.
But, even now I'm in dire straits.
The LCD lights up, but all I can see is the 1st 8 blocks darkened fully when initialized as 16x2.
Got the same result even when I initialized it as 8x2.
What's wrong with it??
The display has only one IC blob.

Quote
LiquidCrystal lcd(0, 1, 2, 3, 4, 5);

Please help.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The display has only one IC blob.
It's not a bug, it's a feature!  Internally your 16x1 LCD is configured as an 8x2 so change your lcd.begin statement to reflect that fact.  Follow the LCD Addressing link at http://web.alfredstate.edu/weimandn to find out why this is the case.

Quote
Got the same result even when I initialized it as 8x2.
Then you have another problem.  
What did you do with LCD pin 5?  
Post your entire sketch and a photo if possible.  

Also, it's not too good an idea to use digital pins 0 and 1 if you have others available.


Don
« Last Edit: October 30, 2011, 09:33:47 am by floresta » Logged

Mangalore, India
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
/*

  The circuit:
 * LCD RS pin to digital pin 7
 * LCD Enable pin to digital pin 6
 * 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)
 * LED+, LED- to +5V, GND
 
*/
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(8, 2);
  // Print a message to the LCD.
  lcd.print("hellfire");
}

void loop() {
  // set the cursor to column 0, line 1
}

Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

  • The code is good.
  • The LCD module is probably good since you get the darkened blocks.
  • That leaves a wiring or connection problem as the most likely reason for your display not working.  You didn't respond to my question about LCD pin #5.

So we now need a photograph that clearly and unambiguously shows the connections between your Arduino and your LCD module.

Also: you should use the 'code' button (not the 'quote' button) when posting code.


Don

Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 170
Posts: 12459
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Also: you should use the 'code' button (not the 'quote' button) when posting code.
When copying from the IDE it adds the quote tags iso code tags (file edit menu) its a bug in the IDE
« Last Edit: October 30, 2011, 01:11:09 pm by robtillaart » Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well - a quote is better than nothing.
Don
Logged

Mangalore, India
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pin 5 is grounded!
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So we now need a photograph that clearly and unambiguously shows the connections between your Arduino and your LCD module.

Still waiting ...

Don
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
here are d pics..
* DSC01002.JPG (0 KB - downloaded 1 times.)
* DSC01003.JPG (0 KB - downloaded 1 times.)
* DSC01004.JPG (0 KB - downloaded 5 times.)
That's quite a compression technique that you are using.  You managed to fit each picture into a file that is 0KB in size.  Also, your keyboard seems to be messing up some letters when you type.

Don
« Last Edit: November 01, 2011, 09:08:27 am by floresta » Logged

Mangalore, India
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sorry guys.. i uploaded from my cell..

bt i hd gt d same prob even in my 16x2..
even d same thing when connected to 5v battery

Quote


* DSC01002.JPG (122.52 KB, 640x480 - viewed 19 times.)

* DSC01003.JPG (117.46 KB, 640x480 - viewed 10 times.)

* DSC01004.JPG (125.94 KB, 640x480 - viewed 10 times.)
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
bt i hd gt d same prob even in my 16x2..
even d same thing when connected to 5v battery
Please provide an English translation.   Vowels and capital letters help.

Don-
« Last Edit: November 01, 2011, 10:31:15 pm by floresta » Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So we now need a photograph that clearly and unambiguously shows the connections between your Arduino and your LCD module.

Where is the Arduino?

Don
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 121
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try the code where you write
Code:
LiquidCrystal lcd(.......);
the pin numbers without spaces like 2,3,4,5,6,7
I did this by accident when trouble shooting the same issue and it works now. It may be the LCD make or mistake in example code 'cos I use the same looking LCD that we see in all tutorials.
And I needed to use contrast control with this LCD. By default (pin#3 open) it displays nothing. I used pot between pin#3 and pin#1 or tied it direct to GND
« Last Edit: November 02, 2011, 02:47:06 pm by vanakaru » Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I did this by accident when trouble shooting the same issue and it works now.
You could stick your fingers in your ears and spin around three times.  That should have the same effect as removing the spaces.

Quote
And I needed to use contrast control with this LCD. By default (pin#3 open) it displays nothing. I used pot between pin#3 and pin#1 or tied it direct to GND
This part is valid.

Don
« Last Edit: November 02, 2011, 04:48:12 pm by floresta » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 121
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could stick your fingers in your ears and spin around three times.  That should have the same effect as removing the spaces.Don

How many times a day you try this? You sound like bit of an expert on this.
But you are right removing spaces has no effect. However nothing worked before, so maybe there was something else that got changed too. What it may be I have no clue. I used the same example and it did not work and then suddenly it did.
I have experienced this many times with Arduino. Something that supposed to work does not and next time it does. So I shall try that finger in your ears trick next time I am in the similar spot. Sounds as good advise as any.
Logged

Pages: [1] 2   Go Up
Jump to: