Can't get my LCD screen to work. Help?

Hey, I have the "MTC-16204A REV-A" from Microtips, I followed this guide exactly and double checked all the wiring. Datasheet "http://www.datasheetarchive.com/dlmain/Datasheets-312/167234.pdf". I have the arduino uno and the code I used is below :slight_smile: thank you!

/*
  LiquidCrystal Library - Hello World
 
 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the 
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.
 
 This sketch prints "Hello World!" to the LCD
 and shows the time.
 
  The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)
 
 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe
 
 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/LiquidCrystal
 */

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
}

Well what does it do? Does anything at all happen, does the backlight come on, do you see black boxes on the screen. Did you remember to have a pot connected to the contrast pin?

Post some pictures of your setup. Please try to make the pictures a reasonable size.

[Removed]

Here are pictures of the entire thing in attachments below :slight_smile: I had to do 2 posts because the photos were too big. the other one is below. thank you!

here is second one

In your picture, as far as I can tell, pins 1 (gnd) and 2 (+5V) of the LCD are not wired. Those are the +5V and ground pins.

edit: It would help if the photos were smaller (1024X768) so one would not have to scroll around to view.

I powered pin2 and connected pin1 gnd to gnd. all it did was brighten the display. No blocks or anything. just a whitish color to the display. :slight_smile:

double check you pin-1. make sure it is the correct end.

RS is 4 in from the end [ op's ]

pin 14 is on the end closest to the screw
pin 16 is in the middle, then pin 15, and THEN pin-1

so RS is 6 pins in. from the center 'end'

LCD.bmp (383 KB)

I don't get what you mean dave?

re-visit the data sheet.

LCD-pins.bmp (215 KB)

it looks like you are counting pin 16 as pin one and counted 4 over to put RS,
enable is on pin4 and needs to be on pin 6

LCD-pins-4.bmp (901 KB)

I got it to print hello world. but it only displays "Hello W" and nothing else? It cut's off and doesn't display the whole thing. any suggestions? :slight_smile: thank you

It's possible that you damaged one or both of the LCD controllers when you had the improper wiring. Try sending 80 characters to the display and see what happens.

Use this program as a guide:

#include <LiquidCrystal.h>

//LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
  LiquidCrystal lcd(12, 11, 5, 4, 3, 2);       // put your pin numbers here

void setup()
  {
    lcd.begin(20, 4);                          // put your LCD parameters here
    for (char i=47; i<127; i++)                // send 80 consecutive displayable characters to the LCD
      {
        lcd.print(i);
        delay(100);                            // this delay allows you to observe the addressing sequence
      }
  }


void loop()
  {  
  }

Don

Only half of the screen works but when I adjust the pot all black boxes appear. should I throw the LCD out then if it is broke?

Well, don't exactly throw it out, but when you buy another and get it working you can give this one another try with the benefit of hindsight. :smiley:

I am assuming it's broken on one side. I guess I could use half of it for some scrap project or something. Since at least half of it works. I have one other serial lcd but I wanted to try this one. I am ordering 2 more from sparkfun. Thanks for all the help!!

Just putting it out there nice name :wink: but try connecting the second half of the control pins, like my hitachi has 8 control pins looks like you only have four. in some lcds the other four is the other half of the screen. good luck

... but try connecting the second half of the control pins, like my hitachi has 8 control pins looks like you only have four. in some lcds the other four is the other half of the screen. good luck

If you believe this then I have a bridge you might be interested in purchasing.

Don

I can kind of see i_luv_arduino's point. Is that possible? that I need to connect other pins?

Is that possible? that I need to connect other pins?

No. But you do need to connect the required pins correctly. Since your LCD module has a non-standard pinout you will not be able to just follow the pictures in most tutorials.

I suggest that you disconnect everything and start over following this generic outline:

(1) If the module has a backlight then get it working properly. This involves only pins 15 and 16 on most LCD modules. Make sure to use a current limiting resistor if there is none on the LCD module.

(2) Get the power and contrast working properly. This involves only pins 1, 2, and 3 on most LCD modules. You should be able to just barely see blocks on one row of a two row display and on two rows of a four row display.

NOTE: The Arduino has not been used yet, except as a possible source for the power needed for the first two steps. Do not try to go any further until this is working. If you don't see the blocks then no amount of program code will help.

(3) Connect the LCD R/W pin (pin 5) to GND.

(4) Connect the six control and data wires between your LCD module and your Arduino.

(5) Upload your sketch and it should work.

Troubleshooting:

If you have a 16x1 display and there are blocks only on the left half of the row in step 2 then use

lcd.begin(8, 2);

in your sketch.

If you still don't get a display then make sure that your wiring matches the numbers in the descriptor (or vice versa).

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

If you get a display but it is garbled or has some other problems then try again with a 'static' sketch, one that displays a simple message on the top row of the display and then stops. All of your code should be in setup() and loop() should be empty between the brackets.

#include <LiquidCrystal.h>

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

void setup()
  {
  lcd.begin(16, 2);                          // put your LCD parameters here
  lcd.print("hello, world!");
  lcd.setCursor(0,1);
  lcd.print("it works!");
  }

void loop()
  {
  }

If you are still having problems then we need to see a photograph of your setup that clearly and unambiguously shows all of the connections between your Arduino and your LCD module. We also need a copy/paste version of the code that you are actually using, not a link to the code that you think you are using.

Don