LCD Problems


Closed Thread
Results 1 to 7 of 7

Thread: LCD Problems

Hybrid View

  1. #1
    gtx15's Avatar
    gtx15 Guest

    Default LCD Problems

    Im having problems writing to line 2 of a 22X2 lcd. I want it to say.
    " hello " 1st line
    " world " 2nd line

    The 1st listing works ( by looping from 1st line)
    But why dosnt the 2nd listing work? I get my blinking curser where it should be. but only blank spaces on 2nd line!

    DEFINE OSC 32
    DEFINE LCD_DREG PORTE
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTH
    DEFINE LCD_RSBIT 1
    DEFINE LCD_EREG PORTH
    DEFINE LCD_RWREG PORTH
    DEFINE LCD_RWBIT 2
    DEFINE LCD_EBIT 0
    DEFINE LCD_BITS 8
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    LCDOUT $FE,$0F
    LCDOUT " hello "
    LCDOUT " WORLD" '
    HI: GOTO HI



    Listing 2;
    DEFINE OSC 32
    DEFINE LCD_DREG PORTE
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTH
    DEFINE LCD_RSBIT 1
    DEFINE LCD_EREG PORTH
    DEFINE LCD_RWREG PORTH
    DEFINE LCD_RWBIT 2
    DEFINE LCD_EBIT 0
    DEFINE LCD_BITS 8
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    LCDOUT $FE,$0F
    LCDOUT " hello "
    LCDOUT $FE,$C0, " WORLD" '
    HI: GOTO HI

    Any Help?

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Try this.
    From the manual:
    Code:
    LCDOUT $FE,1,“Hello” ‘ Clear display and show“Hello”
    LCDOUT $FE,$C0,“World” ‘ Jump to second lineand show “World”
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    I would also add in a $FE,$80 to make sure you are at the first position of the 1st line.

    i.e.

    LCDOUT $FE,1 'Clear the screen
    LCDOUT $FE,$80,"HELLO"
    LCDOUT $FE,$C0,"WORLD"

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Someone else needs a bigger monitor
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Someone else needs a bigger monitor
    I dont get it

  6. #6
    Join Date
    Dec 2005
    Location
    So Cal and loving it
    Posts
    40


    Did you find this post helpful? Yes | No

    Default

    Just think of your LCD as a battle ship game grid.
    You have to say where you want your 'character/s' to land.

    I always plan my LCD displays/Menus on a spread sheet that has the position address for each character.

    Not sure how to display pictures in a reply yet so I have attached a bmp to show what I mean.

    Just edit your code as already suggested and it should work....

    Paul
    Attached Images Attached Images  
    +-------------------------------------------------------------------+
    | PBP 2.47/2.50 | MCS+ 3.0.0.5 | U2 Prog | Vista x64 | NO SLEEP!!!!!!! |
    +-------------------------------------------------------------------+

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47 View Post
    I dont get it
    Error : The eyestrain is all mine, sorry.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

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