More Powerful LCD Commands


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    California
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    I know this an old post, but could you elaborate a little more on how one would store strings in an external EEPROM and retrieve them. I can see where this might come in handy when building menus. "HSEROUT" is a little hungry for code space. I did a search on the forum, but nothing jumped out.
    Thanks, David

    Quote Originally Posted by mister_e View Post
    Usually i use an external EEPROM to save the strings. As i use always the same routine to display strings, i format my strings to fit directly on the LCD, then, if i have to display results right, left or somewhere esle on the string i use specific structure to store LCD address in the EEPROM or in the program to point directly on the wanted LCD location.

    Using a HEX editor make things easy to figure out how your data will be display on your LCD.

    It's flexible even if it use a bit much EEPROM storage.

    OR, Using another EEPROM structure, you can specify the origine point, the string lenght and do what you need with.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by DavidK View Post
    I know this an old post, but could you elaborate a little more on how one would store strings in an external EEPROM and retrieve them. I can see where this might come in handy when building menus. "HSEROUT" is a little hungry for code space. I did a search on the forum, but nothing jumped out.
    Thanks, David
    Use a HEX editor, create your Menus (i used HEXWorkshop from bpsoft), then dump it in your EEPROM with a EEPROM programmer or else fancy method, like a custom PC application which will send the EEPROM dump to your PIC via Rs232 or USB.

    An then, depending your EEPROM you really just need I2CREAD/SHIFTIN then a LCDOUT.

    That's one method, you can also use the following method using the code space.
    http://www.pbpgroup.com/modules/wfse...p?articleid=10

    And there's a load of different version of it in this forum to.

    HTH
    Steve

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

  3. #3
    Join Date
    Jun 2006
    Location
    California
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    Steve
    Yes I use the embedded strings as part of my Logo Display. Works great BTW.

    I also tried the custom approach and built a HyperTerm interface to an 24LC128 EEPROM, but the problem is viewing all the lines at once or editing a single entry. I will look at your Hex Workshop.
    Thanks for the info
    David

    Quote Originally Posted by mister_e View Post
    Use a HEX editor, create your Menus (i used HEXWorkshop from bpsoft), then dump it in your EEPROM with a EEPROM programmer or else fancy method, like a custom PC application which will send the EEPROM dump to your PIC via Rs232 or USB.

    An then, depending your EEPROM you really just need I2CREAD/SHIFTIN then a LCDOUT.

    That's one method, you can also use the following method using the code space.
    http://www.pbpgroup.com/modules/wfse...p?articleid=10

    And there's a load of different version of it in this forum to.

    HTH

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

  5. #5
    Join Date
    Jun 2006
    Location
    California
    Posts
    33


    Did you find this post helpful? Yes | No

    Default

    Art
    Interesting!!

    I may need a little coaching. My goal is to print up a set of instructions, save them as a text file (formatted for screen width), convert to hex then burn to an EEPROM. Calls would be made to EEPROM strings by line number. Not sure this is all possible but nice idea. This could be used for either LCD, RS-232 or USB connections.
    David

    Quote Originally Posted by Art View Post
    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.

  6. #6
    Join Date
    Apr 2008
    Posts
    2


    Did you find this post helpful? Yes | No

    Thumbs up 16F84 serial slave code

    OK, two things, 16F84 is rapidly becoming part of history and there is a lot of stock around to use yet. I have a lot of various types of LCD's of the standard 44780 type and it would be great to dedicate several 84's to becoming an 8 bit LCD driver with serial in essentially making it a serial display. Sure, serial displays are common now, but they are still $30 or more and basic 44780 displays are available in surplus outlets for $1. I'd rather save a couple of bytes of mem by using the display in 8 bit mode.

    Second, is the LCDOUT modifiable so that a standardized PIC to LCD pin out can be used? There are about as many ways to wire an LCD as there pins. I like to use B0-B7 and A0-A2 for all 8 bit LCD configurations with 84, 627,628. And, what is the code standard for a serial in LCD module, it gets very confusing out there, everyone has an opinion.

    Move along, these aren't the droids we are looking for
    Last edited by alphahr; - 23rd April 2008 at 21:22. Reason: syntax error

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


    Did you find this post helpful? Yes | No

    Default

    Check the post 16 on this thread: http://www.picbasic.co.uk/forum/showthread.php?t=4972
    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. 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