Shop OBEX P1 Docs P2 Docs Learn Events
My success in reading and writing to EEPROM — Parallax Forums

My success in reading and writing to EEPROM

PotatoPotato Posts: 18
edited 2010-02-25 00:58 in Propeller 1
First I would like to thank those who responded to my EEPROM questions. I have attached the results of my effort to write a byte to an EEPROM location. The idea is to come up with a way
to know what state A program was in if I lost power to the propeller. In My case my program has a NORMAL state of and an EMERGENCY state. When I go to emergency state I will write
to the EEPROM placing FF in my memory location. If while in the emergency state the propeller looses power, when power is restored I look at the EEPROM location to see if I was
in Emergency mode. If so I jump to the emergency subroutine.
The program which I am attaching was a test to see if I could do it. Well it works. So here it is. This has been a great education for me (a relative spin novice), and a LOT of fun.

P.S. I know I could have just written a Bit to the memory location, but what the heck, what is 8 bits between friends. smile.gif

Comments

  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-02-24 11:35
    Well done and thanks for sharing.
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-02-24 13:01
    And what happens if you can't complete writing to EEPROM because of a power failure in the middle or at the beginning of that?

    Will be additional fun to think about that. If you don't find a solution, ask again ;o)

    And ... yep ... thanks for sharing ... that's the spirit of this forum and I suppose most of the users like that !
  • Rob7Rob7 Posts: 275
    edited 2010-02-24 16:06
    Great project, Rick !
    Congrads on your success.
  • WBA ConsultingWBA Consulting Posts: 2,936
    edited 2010-02-25 00:58
    Nice! Now I see why I couldn't get the same thing to work when I was trying to finish my reverse Geocache project: I was making it way too difficult. After seeing your code, I wonder what i was thinking...... I'll be trying it out with my V2 reverse geocache.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    WBA-TH1M Sensirion SHT11 Module
    Special Olympics Polar Bear Plunge, Mar 20, 2010
Sign In or Register to comment.