Pages: 1 [2] 3   Go Down
Author Topic: Problem with connecting an LCD 16x2  (Read 3407 times)
0 Members and 1 Guest are viewing this topic.
Western New York, USA
Offline Offline
Faraday Member
**
Karma: 26
Posts: 4117
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The single row of blocks means that your LCD controller is not being initialized properly.  This is almost always due to incorrect or defective connections.
By the way, your display is still upside down - but you will discover this when you get it working.


Quote
mass(pin5),
What does this mean?  Pin 5 must be connected to GND (pin 1).

Don
« Last Edit: March 09, 2012, 03:02:16 pm by floresta » Logged

IRL
Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I meant if you checked the signals using LEDs or logic analyzer.

I use LEDs + 4.7k, tag them to ICs or displays using just a little solder.

Maybe you can slow down the software, and then you can see specific flashes,
otherwise also they should be observeable to light up for an instant.

I often had trouble with PIC ICSP in past years, or tristate/alternate pheripherals,
tagging LEDs cleared that up.

Logged

I also have PIC related web domain.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The single row of blocks means that your LCD controller is not being initialized properly.  This is almost always due to incorrect or defective connections.
By the way, your display is still upside down - but you will discover this when you get it working.


Quote
mass(pin5),
What does this mean?  Pin 5 must be connected to GND (pin 1).

Don
Sorry, i meant GND. But i've see on the guide the same initialization with a single row of 'black' blocks.

Well I meant if you checked the signals using LEDs or logic analyzer.

I use LEDs + 4.7k, tag them to ICs or displays using just a little solder.

Maybe you can slow down the software, and then you can see specific flashes,
otherwise also they should be observeable to light up for an instant.

I often had trouble with PIC ICSP in past years, or tristate/alternate pheripherals,
tagging LEDs cleared that up.


You have connected a resistance of 4.7k between vcc and +LEDs pin?
Can you explain me how i can slow software? I need to change parameters in the liquidcrystal library?
Logged

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

Quote
Sorry, i meant GND. But i've see on the guide the same initialization with a single row of 'black' blocks.
That's before the initialization.  It's before the Arduino is even connected to the LCD module.

Quote
You have connected a resistance of 4.7k between vcc and +LEDs pin?
Can you explain me how i can slow software? I need to change parameters in the liquidcrystal library?
Don't waste your time by tinkering with the software.  You most likely have an improper connection.

Quote
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
How about dealing with this problem?

Don

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
How about dealing with this problem?

Don


Tomorrow i'll take better pictures and i'll upload it. And if i'll find a breadboard i'll try to rewire all.

Ty for your help.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here better images:

http://i42.tinypic.com/6oiz69.jpg

http://i42.tinypic.com/33tht38.jpg

http://i44.tinypic.com/dpx2tu.jpg

http://i44.tinypic.com/syuzhx.jpg

http://i44.tinypic.com/2hegjgy.jpg

http://i44.tinypic.com/waq1r9.jpg

http://i43.tinypic.com/1zupuh.jpg
Logged

IRL
Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it correct you power up the LCD directly?

The method I use since recently is to wait at least a second (after startup), then power the LCD through digital I/O, then also wait the period mentioned in the manual before initialization.

Well it's different if you use a library, or if you do it all manually. It's not that difficult by the way.

Your connections seems to be correct and you wrote that you checked them using a multimeter.

About the LEDs + 4.7k Ohms, I use high brightness LEDs, they still can be used with 4.7k and this has no impact on the LCD I/O.

Slowing down the MCU simply means to choose a different clock frequency (some new PICs have internal oscillator which can be selected via software even after startup). Doesn't Atmel MCU too have internal 8 MHz oscillator?
Logged

I also have PIC related web domain.

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

Where is the series resistor that is required for the LED backlight? 

You have your backlight directly in parallel with the VSS and VCC pins.

It is possible that the excessive current drawn by the backlight is causing your power supply voltage to drop to the point where the LCD controller does not function properly.


Don
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I dind't add a resistor to LED because i didn't see it in the guide.
What resistance do i need to wire with LED+? 220ohm is enough?

I've found here datasheet:
http://www.geeetech.com/Documents/LCD1602%20White%20Datasheet.pdf
But i can't find what type of resistor i need.


Is it correct you power up the LCD directly?

The method I use since recently is to wait at least a second (after startup), then power the LCD through digital I/O, then also wait the period mentioned in the manual before initialization.

Well it's different if you use a library, or if you do it all manually. It's not that difficult by the way.

Your connections seems to be correct and you wrote that you checked them using a multimeter.

About the LEDs + 4.7k Ohms, I use high brightness LEDs, they still can be used with 4.7k and this has no impact on the LCD I/O.

Slowing down the MCU simply means to choose a different clock frequency (some new PICs have internal oscillator which can be selected via software even after startup). Doesn't Atmel MCU too have internal 8 MHz oscillator?
I'm using liquidcrystal library. So i don't need to change timing right?
« Last Edit: March 11, 2012, 01:18:34 pm by Yaro » Logged

IRL
Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I suggested powering the LCD through digital I/O
Logged

I also have PIC related web domain.

Offline Offline
Full Member
***
Karma: 5
Posts: 199
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

where is led- connected to on your arduino. I see that you connected R/W to led-, when R/W should be connected to ground for writing. If you're powering the backlight off of a separate power supply, then rewire R/W to an arduino ground.
Logged

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

Quote
I've found here datasheet:
http://www.geeetech.com/Documents/LCD1602%20White%20Datasheet.pdf
But i can't find what type of resistor i need.

That is not the datasheet for your LCD module but it looks fairly typical.

Look in the middle of page 6 in section 7.  The nominal current for the LED is 110mA and with that current the voltage drop across the LED will be 4.2 Volts.  Since you are using a 5 Volt supply the series resistor will have to drop 0.8 Volts.  The required resistance is 0.8 V divided by 0.110 A which gives 7.27 Ohms.  I would try a 10 Ohm resistor but you could probably use a much larger value and still have a usable amount of backlight. 


Don
Logged

IRL
Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I've found here datasheet:
http://www.geeetech.com/Documents/LCD1602%20White%20Datasheet.pdf
But i can't find what type of resistor i need.

That is not the datasheet for your LCD module but it looks fairly typical.

Look in the middle of page 6 in section 7.  The nominal current for the LED is 110mA and with that current the voltage drop across the LED will be 4.2 Volts.  Since you are using a 5 Volt supply the series resistor will have to drop 0.8 Volts.  The required resistance is 0.8 V divided by 0.110 A which gives 7.27 Ohms.  I would try a 10 Ohm resistor but you could probably use a much larger value and still have a usable amount of backlight. 


Don

Using a diode is not that uncommon for that kind of voltage drop.

Using LEDs is a means of debugging, some people use a logic analyzer for this purpose.

One example, I use I2C, the code worked for one project but not for another. Using a piezo I quickly figured out the signals are emitted on the wrong pins (the project indeed used the I2C files from another directory, not the one's in the project directory).

Over the years you'd become familiar with debugging issues, I use MCUs since 2004.
Logged

I also have PIC related web domain.

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

Quote
Using a diode is not that uncommon for that kind of voltage drop.

But we are not really talking about voltage drop here, we are talking about current limiting.  A series diode won't work in this situation.

Quote
Over the years you'd become familiar with debugging issues, I use MCUs since 2004.

So you are essentially a beginner.  Microprocessors have been around since the 1970's and these LCD modules date from the 1980's.  Some of us have been working with them all that time.

Don
« Last Edit: March 11, 2012, 06:01:20 pm by floresta » Logged

IRL
Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes correct the diode won't limit the current directly however it will do the thing, since 4.2v and 0.7v add up to 4.9 volts. I use it myself, the LED backlight has a resistor but that is not enough, very bright, adding a diode, brightness dropped down to moderate levels. It's not always handy to have so many resistors around.

And in 10 years people will ask me if I'm not considering to retire to already...

By the way small power supplies + wires already have internal resistance of a few Ohms, not to forget the voltage regulator.
Logged

I also have PIC related web domain.

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