LCD with LCD 4-Bit funny characters

I’ve got a 16x2 LCD and got it kind of working with the LCD 4-bit library. The problem is for example when I use “lcd.printIn(“1234”)” What I get on the LCD is “123>” or when I put a character say “lcd.printIn(“a”)” I get a funny character on the display.

What the problem could be?

Any help is appreciated.


Double check that all the wiring matches all code, you may have a couple of wires reversed.

I've checked all the wiring, all are fine.

I've wired it like this:

Is that right?


It's a little odd that pin 4 is not connected to a digital pin but it really depends on the library . you won't know if the wiring is ok unless you make sure that the pins used in the sketch match the wiring and the library code.

Did you try using the LiquidCrystal library with it wired as described in the reference?

I tried the LiquidCrystal library with this wiring:

Is this right?

I didn't have any luck with the above wiring.


The information on that site may be ok, although it would have been better if the wiring was the same as that used by the distributed arduino LiquidCrystal hello world example. If you wire according to that site, make sure you use the corresponding pin designations.

I have one concern, there is no contrast pot – contrast is provided by a PWM signal on arduino pin 5 but the example sketch does not write a value on this pin. If you want to use PWM try writing a range of values to see if you can find one that sets the correct contrast. Otherwise you should connect a 10k or 20k pot between +5 and Gnd with the center pin connected to LCD pin 3

Its difficult to see your display from over here ;) You don't' say what didn't work when you tried it, was it the same as your previous test or did you have different symptoms.

When tried with the LCD 4-Bit library, I get data but some of the characters are funny.

When I tried the example in the last link (, which uses the LiquidCrystal I don’t get any data in therefore nothing is shown on the LCD.

Also where can I get the wiring diagram for LiquidCrystal hello world example?


LCD pin 4 goes to Arduino pin 12 LCD pin 5 goes to Arduino pin 11 LCD pin 6 goes to Arduino pin 10 LCD pin 11 goes to Arduino pin 5 LCD pin 12 goes to Arduino pin 4 LCD pin 13 goes to Arduino pin 3 LCD pin 14 goes to Arduino pin 2

Power, ground and the backlight are unchanged. Connect a contrast pot as described in my earlier post.

Good Luck!

Thanks very much. I will try that and will let you know the outcome.

So for a simple exmaple shall I use the LiquidCrystal example that comes with Arduino library?


Yes, that pinout is for the example sketch here:

don't forget to connect a contrast pot ;)

I used the pin numbers as you gave me.

And connected the pin 3 of the LCD to a pot for contrast adjustment.

Code is as follows:

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

void setup()
lcd.print(“Hello, world!”);

void loop() {}

For Hello, world! I get:

And for 1234, I get:

Exatcly the same result as before with LCD 4-BIT library.

Any ides?


Exactly the same – have you posted the wrong pictures?
Those two outputs don’t anything like the same to me.

The picture at the top is close to working. The punctuation characters are correct (the comma and exclamation points) but the characters with the high ascii values are wrong. Double check your wiring.

The pictures are correct, this is exactly what I get when using lcd 4-bit library.

I have checked the wirings they're all fine. Do you think it might be the solderings even?


I was questioning why you say the results are exactly the same, those two pictures look very different to me.

You could try printing all the ascii characters – print 16 at a time (or 32 if you print on two lines), delay a few seconds then clear the display and print the next characters until you display the entire character set. You can download the HD44780 datasheet to see what each character should be.

I think you may see all the characters but in the wrong places, if so, swapping the lines may get things going for you.

Good luck!

I printed all the characters as ASCII also, but got exactly the same characters as when inputing them as non ASCII.

Anymore ideas?




Check pins 13 (D6) and 14 (D7) on your LCD module. It appears that these two lines are shorted so that they both get the same signal. If either one is supposed to be HIGH then they both go HIGH.


I guess I was not clear on what I as asking you do try. In the picture you posted, some of the characters where correct (the characters with ascii values less than 63) I was suggesting that you look at what was displayed when every character (from 32 to 255) was displayed to see if the LCD was displaying all the characters but in the wrong places. I was also suggesting that you look at the datasheet for your LCD controller chip and find the table showing what characters are displayed for all of the values written to it. By looking at what you see as all the characters are displayed and comparing this with the table of what should be displayed you may be able to find out more about what is causing your problems

Check pins 13 (D6) and 14 (D7) on your LCD module. It appears that these two lines are shorted so that they both get the same signal. If either one is supposed to be HIGH then they both go HIGH.

I don’t quite get what you mean by this? Also if it helps my LCD has 16 pins.


floresta is saying that that the output you are seeing indicates that there is a wiring problem that is causing some characters to display correctly and others not. The most likely cause is a short circuit between lcd pins 13 and 14. Check your connections and soldering to make sure these two pins are not making electrical contact with each other.

Will check that,