Go Down

Topic: (Newbie) LCD was working - now blank (Read 2 times) previous topic - next topic

DaveInSanFran

I have a brand new Jameco (newhaven) serial LCD 16x2 display:
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2118651_-1

Data sheet:
http://www.jameco.com/Jameco/Products/ProdDS/2118651.pdf

My simple test program worked great.  But after trying something a little more complicated, I can't get anything on the display anymore.  The LCD's pin 1 goes to digital 1, pin 2 to arduino data ground, pin 3 to arduino 5v.

Code: [Select]
// This worked originally to repeat the text on screen
void setup()
{
Serial.begin(9600);
}

void loop()
{
   Serial.print("Hello! ");
   delay(500);
}


After adding some ShiftBrite LEDs to my circuit and the control code from here:
http://www.macetech.com/blog/node/54

the LCD no longer works, even after reverting to my basic circuit and sketch example.  All I get is an illuminated, but blank panel.

I tried something a little more sophisticated, including some delays, but I still can't get text on the screen.  (The ShiftBrite ran on different digital pins, so I think the failure is pure coincidence.)  Could I have simply fried something on the LCD circuit, or maybe tripped it up with some bad data?  I am open to any clues on how to get text to display again.

(FWIW, the Serial Monitor seems to echo the correct ASCII data.)

Code: [Select]

// This example and the original now print nothing.
void setup()
{
Serial.begin(9600);
delay(50);

// Clear screen
Serial.print(0xFE, BYTE);
Serial.print(0x51, BYTE);
delay(50);

// Home cursor
Serial.print(0xFE, BYTE);
Serial.print(0x46, BYTE);
delay(50);

// Set contrast
  Serial.print(0xFE, BYTE);
  Serial.print(0x52, BYTE);   
  Serial.print(40);

// Display baud rate
  Serial.print(0xFE, BYTE);
  Serial.print(0x71, BYTE);
 
// My message
Serial.print("Hello! ");

}

void loop()
{

//  TO DO: update text
delay(500);

}



liudr

Need pictures and connection diagram.

Your description of the display connection is per the spec. Can you pop your arduino's atmega chip out and connect serial lcd data pin to arduino pin 0? Then you can open the serial dialog window and type in things to see if they appear on the lcd.

DaveInSanFran

Thanks, liudr.

I will attach an image of the original circuit and sketch that "broke" the LCD.

As you can see this is not rocket science.  I am using the factory ShiftBrite shield and cables.  There is a pot for dialing in simple choices.  The program has 4 levels of if/then/else to set colors and LCD strings based upon the dialed in setting.  (This is intentionally simple so that I can use it to teach middle school students.)

The shiftbrite code was taken directly from their website and works fine on its own.

Prior to building this circuit, I had the simple sketch above and only the 3 wires connected as described above.  After "breaking" the LCD, I went back to the simple configuration and it still doesn't work.

DaveInSanFran

Attachments:

Original circuit - Contains a Pot on analog 0, 2 ShiftBrite LEDs on OEM cables and shield, Jameco LCD on Digital 1, Gnd, and 5V

Arduino sketch - Running this with the above circuit "broke" the LCD.  (The last thing I saw was the unit powering up, cycling through many characters, and then going blank.  It has been blank ever since, regardless of how I connect it.

DaveInSanFran

Quote
Can you pop your arduino's atmega chip out and connect serial lcd data pin to arduino pin 0?


Really? Do you mean to connect the data pin and the atmega to the same socket? This make me particularly nervous.  Is the only advantage that I can type right into the Serial monitor? 

liudr


Quote
Can you pop your arduino's atmega chip out and connect serial lcd data pin to arduino pin 0?


Really? Do you mean to connect the data pin and the atmega to the same socket? This make me particularly nervous.  Is the only advantage that I can type right into the Serial monitor? 


Remove the 28-pin chip on arduino, connect your serial lcd on arduino 5V gnd and signal to arduino pin 0, this way you can control your lcd via the serial window.

DaveInSanFran

Quote
Remove the 28-pin chip on arduino, connect your serial lcd on arduino 5V gnd and signal to arduino pin 0, this way you can control your lcd via the serial window.


Done.  Again, the LCD unit lights up, but I see no characters.

The Duemilanove RX light blips a few times each time I send a string, but I see nothing on the LCD panel.

liudr

Is there a potentiometer on the serial lcd that you can adjust and have you tried all possible serial baud rates yet?

DaveInSanFran

No pot.  Contrast and brightness are controlled via ASCII codes (typically 3 bytes - prefix, code, value)

There is a self-test mode entered by jumpering two pairs of contacts on the back. (This requires steady hands with probes or a bit of soldering.) I tried a soldering a couple of test leads and tried to restart into self test mode.  I didn't see anything happen.

I've tried soft codes for Display OFF/ON, contrast, brightness, home cursor, clear screen - all with no visible improvement.

I have not tried different baud rates. I have been under the assumption that what worked yesterday (9600) was still valid.  However, now that you suggest it, an invalid baud rate could explain the lack of any visible progress.  Supposedly, jumpering into I2C or SPI modes and back should have returned the baud rate to the default 9600 for RS232.

Unfortunately, I'll miss a deadline on this one, but I'll be able to try again after Thursday.  I'll be separated from the hardware for a few days, but I'll follow the thread.  Meanwhile, I may order another display to tinker with separately.

Thanks for your suggestions so far.  I really appreciate your help.

Regards,
Dave

liudr

Could be a hardware failure or MCU onboard the serial display stuck on a strange state.

I have seem mostly sparkfun serial displays being mentioned on this forum.

Maybe get one of those. Or, maybe, get one phi-panel after you get back. The serial phi-panel has 20X4 display, 0-9 keys, directional keys, enter and esc, 4 LEDs, 4 general outputs, a buzzer that can plan any tone, everything controlled by Serial.print more or less ANSI sequences, and option to power itself with voltage regulator and ac adapter. Making a menu with this panel is a snap since you can just Serial.read() the user key presses and Serial.print standard ASCII with ANSI control sequence to control the display. There will be multi-tap inputs over the number pad but I'm still working on the code. I'll post some updates so just keep an eye for phi-panel ;)

Here is a sneak preview:


DaveInSanFran

Quote
Could be a hardware failure or MCU onboard the serial display stuck on a strange state.


That's my fear.  My arsenal of electronics supplies (and knowledge) is very small, thus the appeal of solderless breadboards, arduino, and simple TTL connections.  I was excited that it worked so easily at first, but now I'd kill for a second device to continue with.  (I live right near Jameco's main office, so I can grab new stuff at a moment's notice - but only M-F 9-5.)  This display wasn't cheap, but it was convenient.

Quote
The serial phi-panel has 20X4 display, 0-9 keys, directional keys, enter and esc, 4 LEDs, 4 general outputs, a buzzer that can plan any tone, everything controlled by Serial.print more or less ANSI sequences, and option to power itself with voltage regulator and ac adapter.


Sounds right up my alley!  I'll look it up! Thanks again and wish me luck.  Hopefully someone else has seen similar failures as mine and can offer additional tips.

wildbill

The datasheet says that you can change the baud rate and that this will be 'saved in system menu' and that it will revert to default if you select I2C or SPI modes using the jumpers. That kind of implies that a baud rate change will survive power cycling. Is it possible that you inadvertently changed the baud rate on the device?

DaveInSanFran

There is a good possibility of that if an incorrect escape code was sent.  However, I did try power cycling with the I2C jumper set and then again with it removed (as a feeble attempt to reset to defaults.)  Not super convenient as the board only has tiny solder points there and no physicial jumper block.  I'll step through some different baud rates and see if I can't stumble across one that responds.

(I don't believe I did anything to damage the board.  The last thing I saw was a series of characters scroll through the panel before it went blank.  I've been fighting with it ever since.)

Go Up