Writing & Reading 2 Bytes to/from Flash


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: Writing & Reading 2 Bytes to/from Flash

    Each PIC controller has different page size that you can WRITE to.

    For example if your chip has 64 words page, then you have to read all 64 words, change what you want, then write back the whole 64 words page.

    It is a bit clumsy but that is how it works. You cannot change only the words you really want. And if you write less tat the page size, then data will not be written!

    So, my suggestion is to make an array, get the page form Flash, make the changes, then store back to Flash the array.

    Ioannis

  2. #2
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: Writing & Reading 2 Bytes to/from Flash

    Or, if reading/writing to a whole page of flash program memory does not appeal to you.
    You can always switch to a PIC model that has internally EEPROM or add an external Serial EEPROM.

    Regards,
    TABSoft

  3. #3
    Join Date
    Jul 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: Writing & Reading 2 Bytes to/from Flash

    Ioannis,

    This is getting more complicated than I figured.
    Might you be available to implement this for a fee?
    I can send you money in advance via PayPal.

    Thanks,

    Jay Zebryk
    Zebryk Engineering
    Southbridge, Massachusetts

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Writing & Reading 2 Bytes to/from Flash

    I would also suggest adding an external I2C serial eeprom of small size and using it to store your data. Something as small as an 24LC01 1K device.
    Dave Purola,
    N8NTA
    EN82fn

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: Writing & Reading 2 Bytes to/from Flash

    Zebryk,

    1. how many times will your write new values to flash? Flash has less durabilit than EEPROM.

    2. how many words will you store to flash? Think ahead in the future.

    3. Are you sure that the address you have chosen will be free?

    Ioannis

    P.S. No fee necessary, we are here to help each other! Look at your P.M. also.

Similar Threads

  1. Reading, writing, erasing flash (16F88)
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 8th March 2010, 08:13
  2. writing 256 bytes to eeprom
    By astouffer in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 22nd December 2008, 14:44
  3. Writing & Reading to iButton EEPROM
    By crhomberg in forum Code Examples
    Replies: 2
    Last Post: - 6th October 2008, 19:40
  4. Help reading/writing DS1996
    By Peder in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th October 2007, 12:12
  5. Writing and reading to a 24LC1025
    By Angus Anderson in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 20th April 2007, 11:49

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts