LCD showing black boxes, old problem with a twist I guess!

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all,

I have interfaced lcd with atmega328p using 4 data lines. I'm getting black boxes in both the lines but when I watched the lcd from an angle I clearly saw the output, which I think suggests contrast issues so I connected the potentiometer to control the contrast in between Vss,Vdd and Vee, after adjusting it there was no black boxes but whenever I reset the circuit I need to readjust the potentiometer. What can I do to solve this issue?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Black boxes are usually a sign that you have not initialised it into the right mode. What driver software are you using? Something reliable or something you wrote yourself? (almost everyone seems to get the timing set out in the HD44780 manual wrong if they attempt their own software!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Black boxes are usually a sign that you have not initialised it into the right mode.

That refers to black boxes on one row of characters but he has black boxes on both which, as he has surmised, suggests a contrast problem.

 

What can I do to solve this issue?

The required contrast voltage is affected by both temperature and by power supply voltage so I would start by investigating those issues.

 

Don

 

 

 

 

 

 

Last Edited: Tue. Jun 6, 2017 - 01:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've used a bunch of these LCD/Keypad shields for projects, never had a problem with contrast, so wire your display like this and you should not have any problems.

https://www.dfrobot.com/wiki/ima...

 

Jim

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

floresta1212 wrote:
The required contrast voltage is affected by both temperature and by power supply voltage so I would start by investigating those issues.

It is a bit puzzling to me as well.  While we do indeed have a pot on the contrast on [nearly] all of our character LCD production apps over the years, it is almost always "set it and forget it" at build time.  A few production apps actually "dot" the pot with sealer to discourage inadvertent changing.

 

Temperature?  From the description I'm thinking "bench" so there shouldn't be huge swings.  Unless, perhaps, the enclosure is getting hot-hot-hot?  But then the contrast would change in operation after being set, as the enclosure heats up.  [lol -- making me think of a freezer app where a heater was needed in the enclosure to allow the LCD to be read at all]

 

Voltage?  Probably makes the most sense.  Should be easy enough to measure periodically when "good" and "bad".

 

Hmmm--what if the pot is flaky and doesn't hold a setting?  have you tried more than one pot?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's always the option to PWM the contrast from the micro (I did this on one occasion when I simply didn't have a pot!). The voltage is usually around 0.1V so if Vcc is 5.0V you want about 1/50th which on a timer counting 256 means setting the PWM at about 5. You can even give the user the option to change it and store it in EEPROM (but don't let the display go invisible while its being adjusted!!).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

I've used a bunch of these LCD/Keypad shields for projects, never had a problem with contrast, so wire your display like this and you should not have any problems.

https://www.dfrobot.com/wiki/ima...

 

Jim

You might want to take a look at this sticky thread at the beginning of the 'Displays' section of  the Arduino forum.  It is precisely this LCD/Keypad shield that has the problem addressed in that thread.

 

Don

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The latest version has added a 10k base resistor, so that explains why my LCD/KP shields I have worked just fine for over a year and still going strong.

Thanks for pointing that out, the image I pulled with google is an older version that has been corrected. 

But the OP is having problems with contrast, and or module init issues, not back light....

 

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I find that the blue background with white characters LCD [ HD44780 controller ] can have 0 volts on the contrast so test it tied to ground.   Some LCDs without backlights have the best contrast at +0.7volts.   In this case you can use a simple signal diode like the 1n914 instead of a potentiometer on the contrast pin.  Tie the cathode to ground and the anode on the contrast pin.

 

Black box characters means an improper initialization of the LCD.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta wrote:

Black box characters means an improper initialization of the LCD.

 

Not always...

 

https://www.avrfreaks.net/forum/t...

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Even after changing the pot the problem was same. So I traced the circuit again and I found that there was some 157 ohms resistance in between the LCD's led pins and after removing most of the components (to trace out from where the resistance came from) , I connected the LCD again and it did worked. There was no connection issues except for that from LED pins, although this doesn't sound convincing troubleshoot but this worked for me!

 

Apologies for my English. Thank you so much for your help.