Pages: [1] 2 3   Go Down
Author Topic: can never get a LCD to work with UNO  (Read 3172 times)
0 Members and 1 Guest are viewing this topic.
LONDON UK
Offline Offline
Full Member
***
Karma: 0
Posts: 105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have been trying for months to get a display working with a UNO ,both 2 line and 4 line sparkfun LCDs wit the common chip on board.
it lights up but theres nothing to see on the display .ive used sample progs from tronixstuff and UNO examples and arduino cookbook examples but nothing works as it should .
it should be easy with pins 4 5 6 7 8 9 connected and some V and grnd but no figures on display .
no scrolling no nothing .
i have a 10k trim pot to adjust the display but just no display figures .
help

progs upload but theres nothing on display its barren
Logged

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

There have been dozens (it seems like hundreds) of posts similar to yours in this forum over the past few years.  It would only take a cursory look at them to see that we cannot help you unless you post the exact code that you used along with a clear photograph of your connections.

Don
Logged

Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have been trying for months to get a display working with a UNO ,both 2 line and 4 line sparkfun LCDs wit the common chip on board.
it lights up but theres nothing to see on the display .ive used sample progs from tronixstuff and UNO examples and arduino cookbook examples but nothing works as it should .
it should be easy with pins 4 5 6 7 8 9 connected and some V and grnd but no figures on display .
no scrolling no nothing .
i have a 10k trim pot to adjust the display but just no display figures .
help

progs upload but theres nothing on display its barren

This is probably all about the pins. The sample from tronixstuff is probably the kiss of death unless you are using their shield, which I believe is unique. I assume you are not using their shield. I have a cheapo eBay shield on a tronixstuff EtherTen, and fell into the same trap. I had the first success with code from

http://www.emartee.com/product/41909/Keypad%20LCD%20Shield%20%20Arduino%20Compatible

which may help. I do not use the Emartee shield, but mine looks very like it. The first thing to do is adjust the contrast to sees black boxes.
Logged

LONDON UK
Offline Offline
Full Member
***
Karma: 0
Posts: 105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i got some basic blocks on the display using pins 12 11,  5 4 3 2 as the example in the arduino cookbook ,contrast works ok but no symbols dancing across the blocks ...no hello world example or scroll ...
Logged

LONDON UK
Offline Offline
Full Member
***
Karma: 0
Posts: 105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i checked the connections over and over and theyre identical to that shown in the arduino cookbook .
lcd chip is the HD44780 standard controller .
its all a bog standard setup ,with 4 pins data transfer
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
trying for months

Those things are fairly simple to get to work. So if it has taken you that long, you may want to think about your thought process instead.
Logged

LONDON UK
Offline Offline
Full Member
***
Karma: 0
Posts: 105
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

off an on so as i have other hobbies i pursue so i dont need to examine my thought process mr smart ass .
if you dont have any usefull input.

the problem maybe out of date progs as when i compare them they are slightly different


Moderator edit for language.
Do not repeat.
Sp. "useful"
« Last Edit: December 08, 2012, 02:05:30 pm by AWOL » Logged

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

i checked the connections over and over and theyre identical to that shown in the arduino cookbook .
lcd chip is the HD44780 standard controller .
its all a bog standard setup ,with 4 pins data transfer
We have seen all of this before.

I will try once more.

Post your code.  We are not interested in what code you think you copied or where you copied it from.  We want to see exactly what you used.

Post a photo that clearly and unambiguously shows both ends of all of the connections between your Arduino and your LCD module.


Don
Logged

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just dug out the code I used when I tested my LCD a while ago. It's based on Mike Bramwell's code- I can't remember where that came from. It has this line, which I don't pretend to understand. I just used it as is and it worked...

Code:
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

I assume the order of those pin numbers is important. I see from your post, @knuckles, that you mention pins 4, 5, 6, 7, 8, 9 and wonder if you've got them coded in the order 4, 5, 6, 7, 8, 9 whereas it should maybe be 8, 9, 4, 5, 6, 7?

(But if you posted the code as suggested, we would know.....)
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

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

Quote
It has this line, which I don't pretend to understand. I just used it as is and it worked...
Well this is fully explained but very carefully hidden on the Arduino site.

Start here: http://arduino.cc/en/Tutorial/LiquidCrystal
Scroll down to the bottom
Use the Liquid Crystal Library link to get here: http://arduino.cc/en/Reference/LiquidCrystal
Use the LiquidCrystal() link to get here: http://arduino.cc/en/Reference/LiquidCrystalConstructor
And there it is under 'Syntax'

Wouldn't it be easier if they completely documented the examples?

Code:
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here


Don
« Last Edit: December 08, 2012, 02:21:53 pm by floresta » Logged

Dallas, TX
Offline Offline
Sr. Member
****
Karma: 10
Posts: 318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It has this line, which I don't pretend to understand. I just used it as is and it worked...
Well this is fully explained but very carefully hidden on the Arduino site.

Don
Quote

...on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign outside the door saying "Beware of the Leopard."
Logged

Georgia, US
Offline Offline
Jr. Member
**
Karma: 2
Posts: 84
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

also, try this:
Code:
LiquidCrystal PLCD0(RS,255,EN,D4,D5,D6,D7);
I also haven't been able to get a 6-parameter sketch to work, but a 7-parameter does.
Logged

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

Quote
I also haven't been able to get a 6-parameter sketch to work, but a 7-parameter does.

http://arduino.cc/forum/index.php/topic,131798.msg992617.html#msg992617

Don
Logged

Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just try the line

LiquidCrystal lcd(8,9,4,5,6,7);
 

Don't be tempted to re-write the number in order.

Logged

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

Quote
Just try the line

LiquidCrystal lcd(8,9,4,5,6,7);
 

Don't be tempted to re-write the number in order.

This is horrible advice. 

Your recommendation points out the fact that you really don't understand it's purpose.  Why don't you follow the links in reply #9 to find out?


Don
Logged

Pages: [1] 2 3   Go Up
Jump to: