Menu

Erase EEPROM function

Requests
Sebastien
2013-09-13
2013-10-02
  • Sebastien

    Sebastien - 2013-09-13

    Hi Edorul,

    Do you think it could be possible to add a function "Erase EEPROM" ?
    My hex file does not contain any "initial" eeprom data but in some case it's interresting to be able to erase EEPROM. ICD is able to preserve or erase eeprom, Tiny AVR/PIC Bootloader+ must do it ! :-)
    I'm kidding but it could be a usefull function (at least for me).

    Thanks !

    Sébastien.

     
  • edorul

    edorul - 2013-09-16

    Hello Sebastien,

    It's a very good idea! I'll implement it.

    Best regards,
    Edorul

     
  • Dan

    Dan - 2013-09-17

    Dear Edorul.

    I would like to thank to the new version.(V0.8.1)
    Was cheers for good work.

    I get the PIC18F25J11.

    I will report the test results in a few days.

    Thank you again.

    Best regards,
    Dan

     
  • edorul

    edorul - 2013-09-18

    OK :-)
    Thanks to you, Dan!!!

     
  • Sebastien

    Sebastien - 2013-09-19

    Hi Edorul,

    First, I would like to thank you for new version.
    Unfortunately, the ERASE EEPROM function seems to break the code...
    Indeed, once my PIC is updated, I am not able to reprogram anymore.

    To help you find out the issue, I attach the 2 hex files (one with erase and the other not).

    regards,

    Sébastien.

     
  • edorul

    edorul - 2013-09-26

    Hello Sebastien,

    Sorry for this late answer.
    I've took a look at your ".hex" files and I wonder if the bootloader firmware you use is compatible with "EEPROM write". Can you give me its ".asm" file?

    Best regards,
    Edorul

     
  • Sebastien

    Sebastien - 2013-09-27

    Hello Edorul,

    You will find attached the asm file.
    It's, in fact, the bootloader for 16F877 included in your archive modified to manage an RS485 controller and 57600 bauds.
    Note that I modified the piccodes.ini accordingly (bigger bootloader):
    $31, B, 16F 876/877/876A/877A, $4000, $100, 264, default,

    Thanks for your help.

    Regards,
    Sébastien.

     
  • edorul

    edorul - 2013-09-28

    Hello Sebastien,

    I'll try some tests with a PIC16F877 in the next few days.
    If you find the solution before me, don't forget to tell it to me ;-)

    When not using "erase EEPROM", are the EEPROM data correctly written? Without breaking your code?

    Best regards,
    Edorul

     
  • Sebastien

    Sebastien - 2013-09-30

    Hello Edorul,

    My hex file does not contain any default EEPROM data (defaut values are written by the program at startup if necessary). So, tiny software does not write anything in EEPROM.
    BUT, I can tell you that EEPROM data are well maintained in EEPROM between 2 RS programming without "erase EEPROM".
    Feel free to ask if you need my help to do some tests.

    Regards,
    Sebastien.

     
  • edorul

    edorul - 2013-10-01

    Hello Sebastien,

    Try this new version of TinyBootloader+. I hope it will fix your problem.

    Best regards,
    Edorul

    PS: when erasing EEPROM, it could remain a byte in the PIC's memory, I think it's a bug in the PIC16F873-874-876-877 firmware :-(

     
  • Sebastien

    Sebastien - 2013-10-02

    Hello Edorul,

    Congratulation, the function works now !
    I tested it with and without erasing. The effect of the function is OK and the program is not broken anymore.

    I will make more test on a larger code and check the exact content of the flash memory (to be sure that everything is fine) but it seems ok now.

    I'll keep you inform if I find something.
    Thanks you !

    Regards,
    Sébastien.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.