Hacktronics 20x4 LCD Ripping my hair out ;repost with complete information.

Repost...not sure why the first one posted before I was done.
I have been ripping my hair out for three days trying to get the Hacktronics 20x4 LCD to work in 4 bit mode. Here is the pin config that they recommend

1 (VSS) to GND Arduino pin*
2 (VDD) to + 5v Arduino pin
3 (contrast) to potentiometer to GND Arduino pin*
4 RS to Arduino pin 12
5 R/W to Arduino pin 11
6 Enable to Arduino pin 10
7 No connection
8 No connection
9 No connection
10 No connection
11 (Data 4) to Arduino pin 5
12 (Data 5) to Arduino pin 4
13 (Data 6) to Arduino pin 3
14 (Data 7) to Arduino pin 2
15 Backlight to Resistor to Arduino pin 13**
16 Backlight GND to GND Arduino pin*
This is the demo sketch that I am using
// character LCD example code
// www.hacktronics.com

#include <LiquidCrystal.h>

// Connections:
// rs (LCD pin 4) to Arduino pin 12
// rw (LCD pin 5) to Arduino pin 11
// enable (LCD pin 6) to Arduino pin 10
// LCD pin 15 to Arduino pin 13
// LCD pins d4, d5, d6, d7 to Arduino pins 5, 4, 3, 2
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

int backLight = 13; // pin 13 will control the backlight

void setup()
{
pinMode(backLight, OUTPUT);
digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
lcd.begin(20,4); // columns, rows. use 16,2 for a 16x2 LCD, etc.
lcd.clear(); // start with a blank screen
lcd.setCursor(0,0); // set cursor to column 0, row 0 (the first row)
lcd.print("Hello, World"); // change this text to whatever you like. keep it clean.
lcd.setCursor(0,1); // set cursor to column 0, row 1
lcd.print("hacktronics.com");

// if you have a 4 row LCD, uncomment these lines to write to the bottom rows
// and change the lcd.begin() statement above.
//lcd.setCursor(0,2); // set cursor to column 0, row 2
//lcd.print("Row 3");
//lcd.setCursor(0,3); // set cursor to column 0, row 3
//lcd.print("Row 4");
}

void loop()
{
}

Problem is that no characters are displayed and the backlight flashes on and off (like Blinky) along with onboard LED Moved backlight to +5 with resistor solving that problem. Contrast works fine. I get two lines of square boxed even though sketch set to 20x4. Program complies fine with no errors however when uploading to Ardunio UNO R3 I get the following message in lower box of compiler " Binary Sketch.........(of a 32.256 byte maximum) avrdude: stk500_getsync() : not in sync: resp=0x00"

I have soldered the pins to the LCD and pushed them into the breadboard. I have tripple checked the wiring. No matter what I do I have the same problem plus the LED on pin 13 continues to blink. Thinking I might have damaged or miswired something I loaded the Sketch onto a brand new Arduino UNO R3 (not attached to the LCD) and got the same blinking LED. Since there is nothing in the Void Loop why is the LED flashing?
This morning I updated the Arduino compiler to 1.0.2 and tried the example sketch changing the wiring to match that sketch....same exact problem.
HELP!
Please be gental with me I am an old guy and can't take much more :wink:

Thanks
Allen

Your arduino is not accepting code download while hooked up to the display. If you remove the display, will arduino accept the LCD code? Pictures! Pictures!

I think you can delete the other post or ask a moderator to.

If pin 13 LED is blinking after successfully uploading your sample sketch then it looks like the Arduino is resetting. Maybe you have a power issue?

Display disconnected, tried power from wall wart on two different Arduino UNO R3's with same results. While I am a newbie at this I have completed several projects, one using an LCD shield, lots of LED projects, one wire i2c temperature sensors and two wire i2c for LCD. Normally I can figure it out within a few hours using sample code or looking around the internet. This one has me stumped and I have three of these things to be used for pending projects.

Thanks for the help so far.

What next?

When you plug in an arduino to your computer, do you see its serial port showing up on the list of serial port in arduino IDE?

Well I have been wasting my time trying to figure out why I can't respond to the other thread and now see that it has disappeared.

If pin 13 LED is blinking after successfully uploading your sample sketch then it looks like the Arduino is resetting. Maybe you have a power issue?

It seems to me that if the pin 13 LED is blinking after you have tried to upload your sketch then you have not been successful.

You have to troubleshoot your uploading problem first. Start out with the blinky sketch and see if you can successfully change the flashing rate by changing the delay times. If you can do that then you should also be able to upload your LCD code.

Display disconnected, tried power from wall wart on two different Arduino UNO R3's with same results.

Same as what?

Don

You may also try a different computer. Just have arduino, nothing connected to it, not even wall warts, try loading program to it. This is the most basic thing you need to make sure that is working. Maybe both arduinos are damaged with TTL serial chip, by accident?! Like the three young men with blind left eye and crippled right leg showing up in front of the same door in Baghdad? :wink:

Like the three young men with blind left eye and crippled right leg showing up in front of the same door in Baghdad?

I must be culturally deprived.

Don

Serial monitor is empty for new (out of the box Arduino) with Sketch loaded. Same with Arduino connected to the display and with the display removed (nothing in the serial monitor).

I will try to upload blinky and see what happens. I will also try different machine to upload.

Still tearing out my hair...not many left!

allen13331:
Thinking I might have damaged or miswired something I loaded the Sketch onto a brand new Arduino UNO R3 (not attached to the LCD) and got the same blinking LED. Since there is nothing in the Void Loop why is the LED flashing?

The only way that could happen is that the code being uploaded is not the sketch above
or the board has a blink sketch loaded in it and the upload is failing to the blink sketch is continuing
to run after the upload fails.

First thing I'd do is get uploading working.
Make sure you can upload the blink sketch and that it blinks
using an Arduino board that is connected to nothing but the USB connection.
Then go modify the blink sketch to change the blink time to blink faster or slower
and do the upload again.
Once that is working, go back to trying to get the LCD stuff working.

--- bill

First thing I'd do is get uploading working.
Make sure you can upload the blink sketch and that it blinks
using an Arduino board that is connected to nothing but the USB connection.
Then go modify the blink sketch to change the blink time to blink faster or slower
and do the upload again.
Once that is working, go back to trying to get the LCD stuff working.

I wish I had thought of that.

Don

floresta:

Like the three young men with blind left eye and crippled right leg showing up in front of the same door in Baghdad?

I must be culturally deprived.

Don

It's a story in 1,001 nights. I read it sometime ago. I only remember how one of the three men became blind and crippled though. I just wanted to use it to mean two arduino could have had the same damaged chip as coincident. It turns out, they are just blind in the left eye and have matching disfigures other than crippled legs:

Search "When it was the Tenth Night," here http://www.gutenberg.org/files/3435/3435.txt

Just in the nick of time, I had one hair left.
Thanks to your suggestions I went back to square one and tried to load Blink. No luck loading Blink so I took a look at my com ports and I had 10+ of the darn things ranging into the high 20's. On top of that apparently 1.0.2 does not warn if the com port was not found, or at least it did not with mine. So going back to square one I confirmed which com port that Arduino was using and selected it from the menu and the darn thing uploaded and started working. Talk about feeling like and idiot! All is good with life again and I hope the rest of the hairs grow back.

Thanks for all the help...I learned an important lesson here.

the darn thing uploaded and started working.

It teaches you two things about debugging:

  1. it pays to think outside of the box: in debugging, you cannot assume. Bugs are rarely where you think they are. Remember that and it will save you lots of frustration.
  2. it pays to get a real programmer / debugger.

Did you install a blue tooth dongle recently by any chance?