4X20 TRULY LCD PPB lines 3 & 4


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96

    Talking 4X20 TRULY LCD PPB lines 3 & 4

    Hey there PIC masters of the Universe,
    I have been programming in PicProBasic for a few years now and have never messed with LCD's in my projects until now. OK so dumb question...., but how do I write to lines 3 and 4 of my 4x20 display? I would also like to learn how to make use of my nifty graffic character positions. Any help would be very appreciated. My simple-sample code is below.

    INCLUDE "modedefs.bas"
    DEFINE OSC 12
    CMCON = 7
    TRISB=255
    switch1 VAR PORTB.1
    switch2 VAR PORTB.2

    Pause 1000
    loop:
    Pause 19



    LCDOut 254,1
    LCDOut "I TYSON BOY GENIOUS"
    LCDOut 254,257'........... 257 IS NOT A VALID CURSOR POSITION HERE
    LCDOut "BOW DOWN TO ME"
    Pause 11

    IF switch1 = 0 Then message1
    IF switch2 = 0 Then message2
    GoTo loop

    message1:
    LCDOut 254,1
    Pause 50
    LCDOut 254, 130
    LCDOut "HEY THERE USER!!!"
    Pause 1000

    GoTo loop

    message2:
    LCDOut 254,1
    Pause 50
    LCDOut "WHY DON'T YOU"
    LCDOut 254, 197
    LCDOut "TRY AGAIN?"
    Pause 1000

    GoTo loop

    End

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by earltyso View Post
    Hey there PIC masters of the Universe,
    I have been programming in PicProBasic for a few years now and have never messed with LCD's in my projects until now. OK so dumb question...., but how do I write to lines 3 and 4 of my 4x20 display? I would also like to learn how to make use of my nifty graffic character positions. Any help would be very appreciated. My simple-sample code is below.

    End
    Standard parallel input 4x20 LCD?
    See section 5.39 of the PBP manual, page 94.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I would also like to learn how to make use of my nifty graffic character positions.
    Custom Character Generator
    http://www.picbasic.co.uk/forum/showthread.php?t=2598
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Default

    Code:
    LCDOUT       . . .  254,128, "line 1"
       "    "           254,192, "line 2"
       "    "           254,148, "line 3"
       "    "           254,212, "line 4"
    See post 2
    Last edited by Archangel; - 7th January 2007 at 02:31. Reason: add comment

  5. #5
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Talking thanks for the help

    thanks for the code and generator, i am still working on the graphics. Does anyone know about additional manuals for PPB on LCD's?
    Padawan-78

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Nope, just this forum and experience..
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 05:07
  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. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

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