lcd problems


Closed Thread
Results 1 to 10 of 10

Thread: lcd problems

  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.

  8. #8
    Nitro's Avatar
    Nitro Guest


    Did you find this post helpful? Yes | No

    Cool thanks

    i'll see, thanks for the help.
    i thought this was supposed to be easier than assembler!?

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


    Did you find this post helpful? Yes | No

    Smile

    Hi Nitro,

    It is easy! What's the problem now. Bonxy gave you a link to his assembly language LCD setup and now he has shown you how it's done in PBP. Are you still having problems just getting a PIC to work? Have you tried just getting an LED to blink for starters to make sure your PIC is working correctly?

    Setting up a PIC is easy when you know how. I have been scanning the posts on this forum for over a year and have learned alot for the guru's like Melanie, Mister E, Dave Taylor, and Micro. (To any of the other gurus' on this forum, if I forgot to list your name I'm sorry) Searching the files on this group will give you a lot of code samples and how to resolve your issues.

    Have you built anything with a PIC before or are you just getting started? These things are almost "learn one youe learn them all" type devices however, each one may have a few quirks more than the previous one. Some are drop ins with more memory and features.

    I did a few small projects in the past with the Basic Stamp then moved on to a really large project with 42 PICS. I'm nowhere a pro at this but I have used assembler over 15 years ago and I found that using the PIC Basic and PIC Basic Pro to be alot easier.

    Were here to help you because as Red Green would say "were all in this together".

    BobK

  10. #10
    Nitro's Avatar
    Nitro Guest


    Did you find this post helpful? Yes | No

    Cool i've done it!

    it seems i had more pressing problems: i recently reformated my pc so i had to reconfigure my programmer for the pics to respond, and furthermore three of my lcd's horizontal picsal rows were blank, like a line through the word.
    on your othe rquestion, i have condtucted and programed my own robot with 500 assembler opcodes that can follow a black and white line and avoid things in one program with lcd support, thats why i thought picbasic should be simple.

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 : 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