Pages: [1]   Go Down
Author Topic: LCD troubleshooting  (Read 2586 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am having problems with a LCD:

The LCD model is a TC1602A (16x2)

I have it connected to the following:

*VSS - GND
*VDD - +5
*V0 - pot
*RS - pin 12
*RW - GND
*E - pin 11
*DB4 - pin 5
*DB5 - pin 6
*DB6 - pin 7
*DB7 - pin 8
*LED+ - +5
*LED- - GND

I am using the HelloWorld example in the LiquidCrystal library

After sending to the board the LCD displays the top row with 16 blocks and a blank bottom row.

From what I have read in other forms this means that it is not initialized properly.

I have not worked with LCD displays before and I was wondering if there is supposed to be dark pixels and bright pixels or just bright pixels and the background?

Any suggestions would be appreciated

Thank you
« Last Edit: December 26, 2010, 01:09:19 am by drewmcd621 » Logged

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

Quote
After sending to the board the LCD displays the top row with 16 blocks and a blank bottom row.

From what I have read in other forms this means that it is not initialized properly.
This is correct.  It's good to see that you did your research  The failure to initialize could be due to either incorrect code or incorrect wiring.  Since the code is well proven that leaves the wiring.

Make sure that you have interpreted the LCD pins correctly.  For most displays, yours included, pin 1 is closest to the edge of the board.  Also make sure that you didn't forget to connect LCD pin 5 to GND.

Quote
I have not worked with LCD displays before and I was wondering if there is supposed to be dark pixels and bright pixels or just bright pixels and the background?

Any suggestions would be appreciated
I suggest that you go to http://www.ladyada.net/learn/lcd/charlcd.html and follow the tutorial there.  This tutorial uses the same 'Hello world' program except the pin numbers are different to give cleaner wiring.  There are photos to show you what the display looks like as well.  For the first 2/3 of the tutorial the LCD is upside down which is why the bottom row of blocks is displayed when the board is not initialized.

Don
« Last Edit: December 26, 2010, 10:17:58 am by floresta » Logged

Left Coast, USA
Offline Offline
Sr. Member
****
Karma: 7
Posts: 499
Sometimes I just can't help myself.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
16 blocks and a blank bottom row.

That means that you have connected pins 1 and 2 correctly.  Also, it looks to me like you know how to connect the LCD control pins 4, 5, and 6 (RS, R/W, and Enable).  Seeing the blocks  also means to me that you have LCD pin 3 (Vo) connected in a way that works.

However...

If you are using the (unmodified) HelloWorld example, the data pins should be connected as follows:

* LCD DB4 (pin 11 on the LCD) to Arduino digital pin 5
 * LCD DB5 (pin 12 on the LCD) to Arduino digital pin 4
 * LCD DB6 (pin 13 on the LCD) to Arduino digital pin 3
 * LCD DB7 (pin 14 on the LCD) to Arduino digital pin 2


And the LiquidCrystal statement in the sketch is
Code:
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

If you change the data pin connections, you have to change the LiquidCrystal statement accordingly.

In other words for the wiring that you told us about in your post, that statement would be
Code:
LiquidCrystal lcd(12, 11, 5, 6, 7, 8);


Bottom line:

Either change the wiring to agree with the comments (and the LiquidCrystal statement) in the sketch or change that statement in the sketch to agree with your wiring.

Quote
dark pixels and bright pixels or just bright pixels and the background?
This is a monochrome display.  A pixel is either on or off.  An "on" pixel has a different color than the background.  With proper contrast setting (voltage on LCD pin 3) an "off" pixel lets the background show through. I'm thinking that particular display has dark pixels on a light background, but different modules with similar part numbers may have different appearances.


Regards,

Dave
« Last Edit: December 26, 2010, 11:19:46 am by davekw7x » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies I had changed the HelloWorld to reflect the pin changes but I hadn't soldered the header board to the LCD as suggested in the tutorial floresta posted so I'm thinking that it might have just been a connection issue.

Thanks for the responses,
Drew
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Soldering and that tutorial did the trick.

Thanks again,
Drew
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i tried the steps that were given in the tutorial posted by floresta...i made sure the pins were right in code...but nothing displays...and it starts to get really hot on the back side of the module...anysuggestions on what i can be doing wrong???

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Usually heat means you reversed GND and +5v somewhere, I would double check your wiring.
Logged

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

Some oddball modules have the +5V and GND pins (pins 1 and 2) reversed.  Where did you get your module?

Don
Logged

Norman, OK, USA!
Offline Offline
Full Member
***
Karma: 0
Posts: 127
Klingon Machinist
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I ran into the same issues with a pair of unknown LCD modules.

It turned out the pins were reversed from what was described in the Adafruit LCD tutorial. Once I reversed the connections both LCD modules worked as expected.
Logged

M.S.

Pages: [1]   Go Up
Jump to: