EEPROM and Strings


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2005
    Posts
    44

    Default EEPROM and Strings

    Hi all

    Im just after a few opinions, im working on a small project that will send SMS via a GSM modem

    I would like to store destination 4 phone numbers on the pic EEPROM and would like some advise on the best way to do this.
    The phone numbers will be variable length, upto 15 digits long, first character of the phone number is always a '+'


    Im using 16F883, pbp 2.60.
    Phone number is input using Hserin, then need saving to EEPROM

    how would some of you suggest i read/write the numbers to and from the EEPROM - the variable number length has me a little stuck...
    Last edited by jamie_s; - 28th November 2012 at 09:02.

  2. #2
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: EEPROM and Strings

    Always store 15 digit...

  3. #3
    Join Date
    Aug 2005
    Posts
    44


    Did you find this post helpful? Yes | No

    Default Re: EEPROM and Strings

    well im currently reading them into a byte array and storing each digit as a byte, so i can pad the blank digits with spaces (FF).
    just need to figure out how to strip the FF's from the digits when i read them back out of the eeprom...

  4. #4
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: EEPROM and Strings

    Just fill array with 0's before HSERIN. And use STR to send them. STR will send each byte from array, until byte isn't 0. 0 marks end of string.

Similar Threads

  1. Store and retrieve strings to an ATmel SPI Serial EEprom
    By BryanSw in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th August 2010, 02:17
  2. Strings......and how to join them
    By gringobomba14 in forum General
    Replies: 17
    Last Post: - 22nd July 2008, 14:15
  3. Code Problem - Strings/ LCD/ internal EEPROM
    By jorge in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 4th February 2008, 20:24
  4. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  5. I2CWRITE writing Strings to EEPROM
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 27th March 2005, 19:45

Members who have read this thread : 2

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