Reading/writing arrays from eeprom to variables to lcdout


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2009
    Location
    Kalamazoo
    Posts
    42

    Default Reading/writing arrays from eeprom to variables to lcdout

    Hi fellas. another salvo of questions if i may;

    how do you write an array of 15 bytes onto eeprom memory? is there any other way other than the "for.....next" command?

    is it possible to read this same array, and load it onto an lcd with a "lcdout" statement?

    im trying to create an array of ascii characters that a user can change, to change the name of a menu item

    thanks for reading.
    NAG CON WIFE!
    WIFE VAR MOOD

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by DDDvvv View Post
    how do you write an array of 15 bytes onto eeprom memory? is there any other way other than the "for.....next" command?
    That depends if you need to change it during run time, or just set it at compile time.

    If you want to change it during the running of the program you need a for..next and use the WRITE command. To set it at compile time you can just use the DATA command:

    DATA @0,"s","t","r","i","n","g"," ","o","f"," ","a","s","c","i","i"

    Quote Originally Posted by DDDvvv View Post
    is it possible to read this same array, and load it onto an lcd with a "lcdout" statement?
    Yes, with another for..next:

    Code:
    for address=0 to 14
        READ address,asciichar
        LCDOUT asciichar
    next address
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  3. #3
    Join Date
    Dec 2009
    Location
    Kalamazoo
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    thanks for the reply. i need to write at program time and to change the name at runtime.
    Code:
    for address=0 to 14
        READ address,asciichar
        LCDOUT asciichar
    next address
    is the variable "asciichar" an array, or just a single byte?

    i was browsing around the forum and came across this line of code:
    Code:
    lcdout str variable\15
    is this possible? and what about arrayread and arraywrite?
    NAG CON WIFE!
    WIFE VAR MOOD

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


    Did you find this post helpful? Yes | No

    Default

    You may find these interesting
    http://www.picbasic.co.uk/forum/showthread.php?t=544
    http://www.picbasic.co.uk/forum/showthread.php?t=2444

    And LCDOUT uses the same syntax as SEROUT2, check it out in the manual.
    Dave
    Always wear safety glasses while programming.

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