Issues with Serial LCD

I have a 20x4 Serial LCD from sparkfun and I have some issues.

It was working fine but I left it plugged in to the serial when uploading some scripts and now it will receive data and display it fine but the command characters for clearing the display and positioning etc don't want to work. I have tried resetting it but i'm not sure if I did it right and it still won't work...

Can anyone help?

Mowcius

Wild guess: make sure you're using Serial.print(command_char, BYTE);

If that doesn't fix it, you need to define "don't work": are characters disappearing? Getting garbled? Are you seeing things you didn't think your code was printing?

Oops: I just noticed this:

I left it plugged in to the serial when uploading some scripts

I have a better (I think) guess: the binary data getting sent during the code uploads put the display in a strange state. Check to see whether there are settings that can get saved to an on-board EEPROM. If so, find out how to get them set back to their factory defaults.

Ran

Wild guess: make sure you're using Code:

Serial.print(command_char, BYTE);

Yes, I am using it like that...

The characters are appearing fine when I send characters but when I try to do

Serial.print(0xFE, BYTE); Serial.print(second bit of code, BYTE);

or

Serial.print(0x7C, BYTE); Serial.print(second bit of code, BYTE);

to change things on the display such as clear it, change character position etc then it tries to send the command character as a normal (strange) character to the display.

I have a better (I think) guess: the binary data getting sent during the code uploads put the display in a strange state. Check to see whether there are settings that can get saved to an on-board EEPROM. If so, find out how to get them set back to their factory defaults.

Ran

Yes, I think I have messed something up but I cannot find out how to sort it...

That's the whole point of the post! :D

Mowcius

Any luck with fixing your LCD, i made the same error, I left the serial LCD plugged in to the arduino while programming the arduino, and now it no longers works

That is one reason I always use the softwareSerial library to run my LCD. Don't have to worry about unplugging anything..... 8-)

Sounds like somehow you borked the firmware; have you contacted Sparkfun?

According to the datasheet for the controller:

http://ww1.microchip.com/downloads/en/DeviceDoc/41203E.pdf

(assuming it is the same 20x4 they have listed now, which uses that PIC), there are a couple of pins for ICSP programming, and Sparkfun does supply the source code (not sure if there is a hex file in the zip you can download) - you might be able to re-flash the firmware (perhaps even fix it if you can find where/how the problem occurred in the code for the PIC).

Probably not the answer you want, though - I would contact Sparkfun, ask them their advice, then find out how difficult re-flashing would be if you have to go that route...

Yeah this is an oldy post now. It has long been sorted. Sorted itself out actually, apart from the backlight but I have a new display and that one is in a project that does not require it now (better with it off to conserve battery).

Mowcius

I guess it was rather old, wasn't it? I gotta pay better attention... :-/

I left the serial LCD plugged in to the arduino while programming the arduino, and now it no longers works

You could try the 'reset to 9600' code. Look in the datasheet for more info.

Mowcius