Sorting blocks of data in EEPROM


Results 1 to 10 of 10

Threaded View

  1. #4
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Are you trying to store macros that are triggered by unit addresses? You can take one of two approaches. The first stores an index table at the beginning of EEPROM with pointers to macros and a length byte. The macros are stored after the index table. The second merely stores them individually, which means you have duplicate entries for the unit addresses. It depends on how much EEPROM you have and on the complexity of the macros. The first makes more efficient use of the EEPROM while the latter is easier to implement but wastes some space as records must all be the same size.

    I used the former method to store X-10 macros but am using the latter with a device that will translate between several different protocols. In each case I have an external EEPROM rather than just the internal EEPROM of the PIC so efficient use of the available space is not a major factor.

    The latter allows for multiple events with the same trigger but with differing ON/OFF times depending on the day of the week. (I use one byte for the 7 days plus a bit left over.)
    Last edited by dhouston; - 6th November 2006 at 18:05.

Similar Threads

  1. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46
  2. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  3. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  4. Internal EEPROM Read/write Addressing Errors with 18F PIC's
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 18
    Last Post: - 12th July 2005, 19:42
  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 : 0

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