0
\$\begingroup\$

I have bought a 16 x 2 LCD which I want to interface to a ATMEGA 324 microcontroller. The problem is that the vendor didn't give me a good enough datasheet. It does not contain any information regarding the initializing of the LCD.

At the product description it said that the controller is HD44780. I followed the initializing sequence in the datasheet, but all I get is one line of white full rectangles. I followed other initializing sequences, but all that I got were 2 lines of white full rectangles or a full line + a line with smaller rectangles.

Do you have any idea where I could find the correct initializing sequence? The LCD looks like this:

enter image description here

And on the back it says "1602A" and "QAPASS".

I will post later the sequences which I have tried to use.

\$\endgroup\$
  • \$\begingroup\$ If you see black squares you've already done much of the work. Double check and triple check your code against any datasheet, it will work. \$\endgroup\$ – Vladimir Cravero May 14 '15 at 21:11
  • \$\begingroup\$ Actually, they are white squares xD. It has blue backlight with white characters. \$\endgroup\$ – Silent Control May 14 '15 at 21:13
  • \$\begingroup\$ Google is your friend. \$\endgroup\$ – EM Fields May 15 '15 at 0:32
  • \$\begingroup\$ @EMFields Not quite. I tried several initializations from a few datasheets and they didn't quite seem to work. My main problem is to figure out if I'm the one who's doing something wrong or if I am unable to find the correct data. \$\endgroup\$ – Silent Control May 15 '15 at 8:53
  • \$\begingroup\$ Thinking back, there's something about commands, wait times, and busy flags... I ran into the same problem years ago and drove myself nuts trying to initialize the thing and wondering whether it was me or the display keeping it from happening. I finally decided that it was probably me instead of some outfit making zillions of displays, and went searching a little deeper. I just did it again, and found this. Take a look at the last two pages; I think it's all there. \$\endgroup\$ – EM Fields May 15 '15 at 10:43
1
\$\begingroup\$

According to the table shown here the display controller is ST7066U or compatible.

According to ST7066U

The ST7066U has pin function compatibility with the HD44780, KS0066 and SED1278 that allows the user to easily replace it with an ST7066U

So you can either refer to the appropriate datasheet or search for HD44780 LCD usage info or AVR libraries. As an example you can check http://homepage.hispeed.ch/peterfleury/avr-lcd44780.html which provided interface info and includes a link to a free HD44780 LCD library.

\$\endgroup\$
0
\$\begingroup\$

Well... it was a hardware problem! It worked after I had resoldered the LCD's pins.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.