Connect with us


Discussion in 'General Electronics Discussion' started by lapistola, Jan 1, 2012.

Scroll to continue with content
  1. lapistola


    Nov 22, 2011
    I have been reading the PICAXE manuals, there is 3 and im 1/2 way through number 2. However it more a ponder at the moment but I have a question.

    My need is to have a chip that opens a solenoid, but I also need it to have set times 1second, 2 seconds, 4seconds. Yes I could use a pot but I want it to be more user friendly. I thought of having a momentary button that cycles the 3 modes and displays and LED on the unit but it needs to remember the users chose if power is lost.

    So how do you get a var in the chip that don't get wiped once power is lost.

    I said its a ponder question now as after I thought abit more, using a simple DPDT switch will remove the need of LED indication or the need for a way to remember. How ever it maybe useful for me to know how on other projects?
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    Jan 21, 2010
    To store data that will last between power cycles, store it in the eeprom. The command you're looking for is "EEPROM". You could, for instance store 1, 2, or 4 in a location (if the value is other than 1, 2, or 4 you should set it to one of these).

    As you press a button, you cycle through the values.
  3. lapistola


    Nov 22, 2011
    Ahh I have read a little on EEPROM in the manual. Thank you!!
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day