lcd problems


Closed Thread
Results 1 to 10 of 10

Thread: lcd problems

Hybrid View

  1. #1
    Nitro's Avatar
    Nitro Guest

    Unhappy lcd problems

    i am not new to pics, but very new to picbasic, and i can only get a few tyings to work.
    right now i'm interested in controlling a 2*20 line lcd, i have writen numerous programs for lcd's in assembler, but couldn't get even a blip though pbp demo

    i'm sure you must get annoid of nubies trying to leech knowledge, but this is trhe only sensible place i found to learn pb.

    i tryed thius code on the 877 to no success.
    please help me!
    Pause 500 ' Wait for LCD to startup

    loop:
    Lcdout $fe, 1 ' Clear LCD screen
    Lcdout "Hello" ' Display Hello
    Pause 500 ' Wait .5 second

    Lcdout $fe, 1 ' Clear LCD screen
    Lcdout "World"
    Pause 500 ' Wait .5 second

    Goto loop ' Do it forever
    Last edited by Nitro; - 1st November 2005 at 22:02.

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Nitro,

    So where's the beginning part of the code that sets up the 16F877 with the LCD defines? How can we help you without all of the information?

    BobK

  3. #3
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Default lcd problem

    Hi Nitro

    BobK suggests what i was going to say that the defines are missing.
    You have to define the port and pins you want to use for your lcd.
    Once you sort that out try this little file i made it might help you.

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

    --------
    Brian
    Reading the datasheet & understanding it are two different things.

  4. #4
    Nitro's Avatar
    Nitro Guest


    Did you find this post helpful? Yes | No

    Cool

    thanx for the reply, but as far as understand there are preset pin configurastions on portA and one on portB as shown in the manual

    ...it seems there is something wrong with my pic, i'll try another on one of my other lcd's. i'll see if the problem persists.

    ... tried it. now it does is devour pics faster. i didnt even get anything done before the pic blew out! maby the voltage on my breadboard not 5v? thanx though.
    Last edited by Nitro; - 2nd November 2005 at 11:01.

  5. #5
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi Nitro,

    Yes that is true, PBP assumes that the LCD is connected to PortA.0 to PortA.3 for the 4 bit data lines and RS to PortA.4 and enable to PortB.3. I have found throughout life not to assume anything! Put it in writing, as the lawyers say. Did you also disable the analog features? Do you have a pull up resistor on PortA.4?

    It sounds from your last post that you have a more important problem. Hope the above helps when you have the other problems under control.

    BobK

  6. #6
    Nitro's Avatar
    Nitro Guest


    Did you find this post helpful? Yes | No

    Talking ok

    thanks for all the help, i should be able to get it going.

  7. #7
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Default lcd problem

    Hi Nitro

    This is the lcd defines i always use, just alter it to what your configuration is.

    DEFINE LCD_DREG PORTD
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTE
    DEFINE LCD_RSBIT 0
    DEFINE LCD_EREG PORTE
    DEFINE LCD_EBIT 1

    DEFINE OSC 4

    ------------------
    Brian
    Reading the datasheet & understanding it are two different things.

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. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

Members who have read this thread : 0

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