Pages: [1]   Go Down
Author Topic: LCD stopped working, intermittent error stk500_rec() programmer is not respondin  (Read 773 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After testing a simple communication between processing and arduino, I can no longer get text to appear on my LCD display (although the backlight still works).

Previously, I’ve been trying to get my Uno board to communicate through the serial port with my Mac. I had previously successfully run the example scripts provided for blinking the LED, sweeping the servo, and writing text to my 4 line LCD display.

However, after playing with the processing code, now when I try to run sketches on the Arduino I sometimes get this error: “arduino avrdude: stk500_recv(): programmer is not responding”. When that happens, I check under Tools>Serial Port and see that the USB connections are gone, with only Bluetooth remaining.  So I restart the Arduino and the Mac and fiddle and when the error message stops appearing (I’m not sure what makes this problem occur or disappear), then I notice that the USB serial ports are back, and I can load programs onto the Uno board again, so I know that the USB connection is working at least part of the time.

And I’ve been able to go back and run the example scripts for blinking the LED (on pin 13) and for sweeping the servo (pin 9). So, I know that simple scripts are running on the Uno, so the chip seems to be OK.

But the LCD still won’t work. I’ve tried running the example script HelloWorld but no text appears on the LCD.

I’ve checked all the wires and the proto board best I can (I’ll have to get a multimeter from Radio Shack in the next day or so to check voltages on pins).

Can anyone suggest a next trouble shooting step? Could I have accidentally modified some part of the Arduino software or libraries that only affect the LCD and not the servo or the onboard LED (since the MyBlink example still works)?

Thanks.
Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12179
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Schematic?  How is it being powered?  Have you uploaded with the LCD disconnected successfully?  Which LCD?
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Schematic?  How is it being powered?  Have you uploaded with the LCD disconnected successfully?  Which LCD? From MarkT

Mark, thanks for getting back to me.
I’m using an Arduino R3 board, sold by NKC Electronics (says it is made in Italy). The R3 board and all related electronics are powered via the USB cable which connects to the USB port on my Mac Powerbook.
The LCD display module is a 4line x 16 column from Hacktronics, and I’ve followed their wiring instructions, with some variance in the resistor and potentiometer I’ve selected:
•   resistor at pin 15 (backlight) is orange-orange-brown-gold (330K), whereas they recommend 40K minimum to limit current (but note that the backlight has continued to operate).
•   potentiometer at V0 (LCD power) is a trimpot that I received in a box of Arduino accessories from G&O Accessory (fulfilled by NKC Electronics). I have used it to provide between 4.85 and 4.9 volts to V0 via the center tap, the outside pins are +5V and GND.
•   I should also point out that I soldered the header pins onto the module myself, so there’s a risk of cold solder joints, though  the display was working for the first few days.

Here’s the wiring instructions:
LCD PIN   LCD NAME   Arduino PIN
1           VSS           GND
2           VDD           5V
3           V0 (contrast)   Potentiometer
4           RS           12
5           R/W           11
6           Enable   10
7   No connect   
8   No connect   
9   No connect   
10   No connect   
11   Data 4   5
12   Data 5   4
13   Data 6   3
14   Data 7   2
15   Backlight   13, resistor
16   B.Light GND   GND


The LCD module is plugged into a breadboard into which I had also periodically plugged in other projects back when the LCD was working, including a photo sensor and associated resistor, and a stepper motor. These other projects shared the power and ground with the LCD module (either plugging into the power or ground busses, or plugging wires directly into the protoboard rows for the LCD that receive either power or ground). I’ve removed the other projects for now.

Since the LCD worked previously, and since the other projects continued to work while they were on the board, I would have thought I fried the LCD somehow, except that the backlight continued to work and I began receiving the intermittent programmer error I mentioned previously. Here is the code I am running, I got it from the Hacktronics website, and uncommented the lines to work with a 4 line LCD instead of 2 line, and I tried unsuccessfully to add a debugging print out to the serial monitor:


Code:

// 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()
{
  delay (5000); //gives me time to go to menu to open serial monitor
                // need to find a command to do that!
                // this does not work as a diagnostic
    Serial.print("Ping: "); // one of these lines should write to the serial monitor
    Serial.println("Ping");// one of these lines should write to the serial monitor
pinMode(backLight, OUTPUT);
  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  lcd.begin(16,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, Ben");    // change this text to whatever you like. keep it clean.
  lcd.setCursor(0,1);           // set cursor to column 0, row 1
  lcd.print("Pull Date,Time");
 
  // 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("Pull Weather");
  lcd.setCursor(0,3);         // set cursor to column 0, row 3
  lcd.print("Pull NFL Score");
}

void loop()
{
}



Thanks again for the help, Bryan
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


My LCD still won’t work. I ran simple diagnostics to make sure that I could program the Uno to turn the LCD backlight on and off, and to send “Hello World” to the serial monitor, so I think the problem is isolated to the LCD display. Can anyone suggest further diagnostics?

Here’s the code I wrote for the diagnostic:

Code:
/*
  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, 10, 5, 4, 3, 2);

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

void setup()
{
  // First set up and write to Serial Monitor
 
 Serial.begin(9600);
 // Serial.write("testing Serial.write");
 // Serial.print('A');
 Serial.println("testing Serial.println"); 

  // Diagnostic - turn backlight on and off
 
  pinMode(backLight, OUTPUT);
  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  delay(1000);
 
  Serial.println("First Blink"); 

 
  pinMode(backLight, OUTPUT);
  digitalWrite(backLight, LOW); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  delay(1000);
 
  pinMode(backLight, OUTPUT);
  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  delay(1000);
 
  Serial.println("Second Blink"); 

  pinMode(backLight, OUTPUT);
  digitalWrite(backLight, LOW); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  delay(1000);
 
  pinMode(backLight, OUTPUT);
  digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
  delay(1000);

  Serial.println("Backlight should stay on now"); 

 lcd.begin(16,4);              // columns, rows.
  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!");
 
   Serial.println("hello, world!"); 

}

void loop()
{
  // set the cursor to column 0, row 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);
}





Here’s the output from the serial monitor:
Teprintln [NB – this should say “Test println” but its garbled, I used ‘shift control M’ to turn on the serial monitor manually… is there an easier way to turn on the serial monitor automatically as soon as the program is uploaded?]

First Blink

testing Serial.println

First Blink

Second Blink

Backlight should stay on now

hello, world!

(end of serial monitor output)

Thanks, Bryan

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The LCD is working now, I've replaced the potentiometer on pin 3 of the LCD. Thanks again for the help - Bryan
Logged

Pages: [1]   Go Up
Jump to: