More Powerful LCD Commands


Results 1 to 32 of 32

Threaded View

  1. #9
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    A routine very similar to mister_e's could easily be used to centre text to the LCD screen.
    It's almost funny to see such a request of the language itself.

    For a 16 character display, count the length of the message to display, divide that by 2,
    and print the message that many spaces to the left of centre (or 8 minus that figure).

    If you want to print it all to the right, start from 16 (or length of the LCD screen) minus the length of the message.

    To use EEPROM, set a two byte qualifier recognised by your program, then you can count the bytes until
    you reach the next qualifier to gain the length of the message.
    You only need to use the LCDOUT command once in your whole program to send one single variable byte at a time.
    Same with serout, sound, etc. as they can be called from other routines. any more is overkill.

    PBP only includes these routines once in your program, no matter how many times you use them.
    There's no reason why the programmer should do any different.
    Last edited by Art; - 22nd April 2008 at 09:41.

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