Erratic LCD behavior


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2006
    Posts
    89

    Default Erratic LCD behavior

    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.

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Hope you are not using any ports the LCD is using.

    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.
    Regards

    Sougata

  3. #3
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default Erratic LCD

    I am not using the same ports. How do I reset the PBP flag and what is it? Thanks

  4. #4
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default A few lines from the PBP manual

    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.
    Regards

    Sougata

  5. #5
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    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

  6. #6
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    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.

  7. #7
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default Board setup

    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.

  8. #8
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    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?

  9. #9
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default It works

    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.

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  2. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  3. LCD and PIC18F2685 - Weird LCD behavior
    By Castor in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 29th April 2008, 09:55
  4. Replies: 8
    Last Post: - 7th December 2006, 15:42
  5. erratic behavior when using MPASM vs. PM
    By cool_justin in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th June 2006, 01:08

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts