PDA

View Full Version : Erratic LCD behavior



Travin77
- 1st April 2006, 03:45
I was wondering if anyone has had an LCD that during the program blacks the screen out at the end of the program and then starts displaying the data at the begining of the program. It does this continuoulsy throughout the program. I am using a 4x20. One thing, my code crosses the 800h boundary. Could this be causing it? Thanks. This is the best forum on the net.

sougata
- 1st April 2006, 06:27
Hi,

This is very unlikely. If by mistake you are using the same ports in your prog that the LCD uses it can happen. Trying reseting the PBP Flag.

Travin77
- 1st April 2006, 07:57
I am not using the same ports. How do I reset the PBP flag and what is it? Thanks

sougata
- 1st April 2006, 10:05
A program should wait for at least half a second before sending the first
command to an LCD. It can take quite a while for an LCD to start up.
The LCD is initialized the first time any character or command is sent to
it using LCDOUT. If it is powered down and then powered back up for
some reason during operation, an internal flag can be reset to tell the
program to reinitialize it the next time it uses LCDOUT:
FLAGS = 0


Hope this helps.

paul borgmeier
- 1st April 2006, 12:59
Travin77,

It sounds like your PIC could be resetting due to fluctuations in your power supply.
Can you describe your power supply setup?
Does your LCD have a backlight?
What PIC are you using?
What else is the PIC driving?
If you do not have them, you can try adding decoupling and bypass capacitors close to your Vdd and Vss pins on the PIC. See my comments on this thread for reference

http://www.picbasic.co.uk/forum/showthread.php?t=3567

Good Luck,

Paul Borgmeier
Salt Lake City, Utah
USA

DynamoBen
- 1st April 2006, 19:06
I agree with Paul sounds power related. I've had this problem in the past and a cap between Vdd and Vss corrected the issue.

Travin77
- 1st April 2006, 19:09
I am using a radio shack 4.5v 1600ma power supply. The pic is a 16F876a. I am not using the backlight on the lcd, but it does have one. My pic is reading two serial sensors, a rtc, a 18s20 ow temp sensor, 3 leds, a radon sensor (serial). It performs xout commands based on the parameters of all of this. It works fine until it gets to the xout command. Thats when the LCD starts going black, and then the program goes back to start and starts over. The pic is pretty heavily loaded and every pin is used. The code also crosses the 800h boundary but it still works. I am using PBP and the pic is running at 20 mhz. Thanks for the help. I am going to try the capacitor idea. Thanks again.

DynamoBen
- 1st April 2006, 19:13
Sounds like a short on DQ between either Vdd or Vss. The other possibility is a damaged one-wire device. If you remove the one-wire devices do you still have a problem?

Travin77
- 1st April 2006, 19:48
The caps between vss vdd worked like a champ! I guess the xout was pulling too much juice and the regulator couldn't keep up. Thanks a lot.