Store and retrieve strings to an ATmel SPI Serial EEprom


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2010
    Posts
    10

    Default Store and retrieve strings to an ATmel SPI Serial EEprom

    I have normally worked with other compilers but at work I have to use Picbasic Pro. Usually I use a Pascal language compiler. Anyways, I am finding it kind of difficult to do something simple like store strings in an external serial eeprom for call back later. I will have many strings of varing lengths possible over 100 of them. I am using a 16 meg atmel double buffered serial (SPI) eeprom. I can write data (decimal numbers) to the eeprom and read it back. But what to do about strings? I don't have too much experience with PBP yet but learning fast. I know I don't have the option of having a string variable . So, my guess is load each character into an array and send it out one at a time. Once the strings are loaded into the eeprom I can comment out or delete the code that put them there. The rest of the memory will be used for storing A/D data. I guess the big question is when I load the strings back into the PIC can I convert them to ascii again for output to an LCD.
    Anyone have any samples of how I can do something like this? I don't need someone to write all the code for me as I'm a big boy now. I just need to see a way to create an array of characters, do a shiftout of each character and then do a shiftin and reassemble the string for an LCDout. I've already tried to do this but just got some garbage on the LCD.
    For the Mel guys, Yes, a string var would be nice and some simple string handling functions like other compilers have ie.... mikroe.

    Bryan

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


    Did you find this post helpful? Yes | No

    Default

    Hi Bryan,

    Here's one possibility from awhile back.

    STRINGS - How to store and retrieve strings in Code Space
    http://www.pbpgroup.com/modules/wfse...p?articleid=10

    In the StringOut: routine, instead of sending to the USART (HSEROUT), send it to the EEPROM.
    Fortunately, you already have that part working.

    HTH,
    DT

  3. #3
    Join Date
    Jul 2010
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Hi Bryan,

    Here's one possibility from awhile back.

    STRINGS - How to store and retrieve strings in Code Space
    http://www.pbpgroup.com/modules/wfse...p?articleid=10

    In the StringOut: routine, instead of sending to the USART (HSEROUT), send it to the EEPROM.
    Fortunately, you already have that part working.

    HTH,
    OK, that seemed to do the trick. Still very strange way to do this. A string var would be nice to have. Almost seems like I'm using more program memory just to create the strings (labels in this case) and send them to the eeprom and read them back in, just to output them to an LCD. The idea I had was to off load about 100 or more strings to an EEprom so I don't keep them in code space and call the back up by EEprom addresses. Still I see no other way to do this. It works but looks very inefficent to me. Once I load the strings into the eeprom I can comment out the code that put them there and not write to those addresses later.
    Thanks for your help it is greatly appreciated.

    Bryan

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