Microcontroller unused cells

Discussion in 'Programmer's Corner' started by Kardo22, Oct 10, 2014.

  1. Kardo22

    Thread Starter New Member

    Mar 12, 2014
    26
    0
    Hi
    It may be a dumb question but:
    When writing a hex file to EEPROM you can write unused cells as 00 or FF. What effect what I should choose?

    Thanks
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    You leave the cells in the erased state which is usually FF.
     
  3. adam555

    Active Member

    Aug 17, 2013
    858
    39
    I would say it has no effect; unless you read or re-direct the program counter to the unused cells.

    In any case; isn't the hex program file written in the FLASH memory, and the data in the EEPROM?
     
    Kardo22 likes this.
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,395
    1,607
    A single hex file can write to both program and data memory. I've define the data in the EEPROM inside the same dot C file as my project.
     
    Kardo22 likes this.
  5. Papabravo

    Expert

    Feb 24, 2006
    10,166
    1,797
    You can also leave them alone and do nothing with them. Who says you have to write anything to the unused cells?
     
    MrChips likes this.
  6. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    Agreed. Your linker/loader/programmer ought to leave unreferenced cells alone.
     
Loading...