Looking for confirmation of idea to store data in external eeprom


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2009
    Location
    Pittsburgh, PA
    Posts
    17

    Default Looking for confirmation of idea to store data in external eeprom

    I had been merrily using EEPROM statements until I hit the memory limit for the 16F877 chip I am working with and now need to switch to the external EEPROM.

    All those convenient EEPROM statements will now have to be replaced with a block of code to transfer the data to the external EEPROM chip.

    The data in question contains a menu structure I'll need for my project.

    I was hoping to copy the data in 128 byte chunks to take advantage of the paging of the EEPROM, but the max size of an array I can declare is 96 bytes.
    Do I just end up wasting the difference or can someone tell me how they usually transfer bigger blocks of data to the EEPROM? I have looked at many posts on the forum but must have missed something as I haven't noticed this particular issue being addressed.

    Thanks.

    PS I have seen the EE_Vars.pbp code which looked awesome but the post that came with it says it requires MPASM which I am not able to use for this project.
    Last edited by ukemigrant; - 21st June 2009 at 21:59. Reason: Adding extra info

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Last things first... there should be no reason why you couldn't use MPASM for any PIC... the only real salient difference is in your CONFIG defines.

    Have you looked at upgrading your project to the 18F4525 which has 1K of EEPROM... pin compatible and a quantum leap from the now obsolete 16F877. It's also got 4K of SRAM... and 48K of Program Codespace... so who needs EEPROM anyway?

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


    Did you find this post helpful? Yes | No

    Default

    With the 16F87x series PIC's, writing to Flash Memory (program space) is just as easy as writing to EEPROM. Only difference is the locations are 14-bits instead of 8.

    Then you have several K of space, depending on how big your program is.

    Look at the READCODE and WRITECODE statements.

    If it's actually a 16F877A it's more difficult, but still doable.
    <br>
    DT

  4. #4
    Join Date
    Apr 2009
    Location
    Pittsburgh, PA
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Thanks for your replies Mel, Darrel. It has been mostly your own posts that I have been poring over to find a solution to my problem. Updating the main chip may be a possibility or I may have to just learn my lesson and get that stuff for the next project. My friend and I have already bought all the pieces for the current project, including the EEPROM chips so I figure I'll try and use them.

    Mel I think I may have been confusing the MPLAB IDE with MPASM so maybe the eeprom vars file will work for me.

    It's a shame though that using the onchip eeprom has all those nice data and eeprom statements and using the external one means I have to write code like that listed here to populate arrays so that I can write data to the external eeprom a page at a time.

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


    Did you find this post helpful? Yes | No

    Default

    EE_Vars only works with internal EEPROM.
    So if you're already at the limit of the internal EEPROM, it's not going to help.

    If you write to the external EEPROM 1 byte at a time, you don't need to worry about "page write boundaries".
    <br>
    DT

  6. #6
    Join Date
    Apr 2009
    Location
    Pittsburgh, PA
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    EE_Vars only works with internal EEPROM.
    So if you're already at the limit of the internal EEPROM, it's not going to help.

    If you write to the external EEPROM 1 byte at a time, you don't need to worry about "page write boundaries".
    <br>
    Oh dear - must have missed that. Shame I was thinking how nice the code must have been to handle all the complicated I2C stuff .

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Replies: 1
    Last Post: - 28th January 2010, 22:15
  3. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

Members who have read this thread : 1

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