LCD Showes Some Wrong Letters


Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Feb 2008
    Posts
    8

    Default LCD Showes Some Wrong Letters

    hello,
    Never posted here before. But I do read a lot.
    Any way maybe this will help some one starting out with LCD's
    I use Pic Basic Pro Version 2.50a
    Micro Code Studio Version 3.0.0.5
    I have A Microchip PIC 12F628A
    and a Hantronix HDM20216L-1 20x2 LCD

    I started off with the "Hello World" LCD Toturial.
    plugged in a chip, set the right chip in PBP, programed it up, soldered a few test leads to my lcd. and this is what i got

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

    -------------------------------------------------------------------
    Screen 1: Hello

    Screen2: HelloWo ld

    (well this is wrong! Hello was suppose to disappear and last i checked "Wo ld" had an r in the middle)

    ok lets modify the code and try something new

    new code: -------------------------------------------------------------------

    Pause 1000 ' Wait for LCD to startup

    loop: Lcdout $fe, 1 ' Clear LCD screen
    lcdout $fe, $80
    pause 1000
    Lcdout "abcdefghijklmnopqrst" ' Display Hello
    lcdout $fe, $c0
    Lcdout "uvwxyz0123456789ABCD"
    pause 1000

    Lcdout $fe, 1 ' Clear LCD screen
    lcdout $fe, $80
    pause 1000
    Lcdout "EFGHIJKLMNOPQRSTUVWX" ' Display Hello
    lcdout $fe, $c0
    Lcdout "VZ~!@#$%^&*()_+-=,.?"
    pause 1000

    Goto loop ' Do it forever
    END

    -------------------------------------------------------------------
    Screen 1:
    abcdefghijklmno7qrst
    uvwxyz0123456789ABCD

    Screen 2:
    EFGHIJKLMNO QRSTUVWX
    YZ>!@#$%^&*()_2-= .?

    ok still not even close since when is "p" = "7" and "~" = a right arrow, "+" = "2", and a comma = nothing.

    new thought maybe i have a bad wire, maybe i have a non compatible LCD, maybe I'm a rock

    well the answer is number three, after reading lots and finding nothing, i found a post about an LCD with a gridded out screen. several posts in the thread someone suggested that he had spelled CMCON = 7 wrong
    then i thought i don't have a turn off analog statement in my code.
    guess what,
    that's it works like a champ

    my only question is what if i need a analog input? say i want a battery meter on my project.
    now what i have no analog ports, can anyone suggest something for me
    Last edited by sbobowski; - 7th September 2008 at 15:36. Reason: wrong PBP Version

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

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