Thursday 29 October 2015

memory - Storing an LED's previous state even when power is removed


Storing an LED's previous state even if power is removed


I want to build a simple circuit that consists of 2 push buttons and an LED. I want the LED to turn on when one pushbutton is pressed and off when the other is pressed. I am pretty sure this can be done with a flip-flop. But this is not the only part. I also want the circuit to keep its previous state even if power is removed. So if the LED is on, and power is removed, I want it to be on when the power is added. Same with if the LED is off and the power is removed I want it to stay off when power is added. I think that NAND gates or something are used to store flash data, but I am not sure. I want this circuit to be only consisting of transistors and other common parts like capacitors resistors diodes crystals inductors ect... I don't want to use any uncommon integrated circuits (I only have 555 timers and some dual flip flops and some buffers and a few other really odd ic's.



This may be impossible (especially with only transistors) but any information is helpful  and I'm only 14 so I'm still a beginner in this stuff.


Edit: I want to figure out a semiconductor way to do this. I know I don't have the parts but what would I need?



Answer



A bi-stable switch as Dave Tweed mentioned will certainly work. Another way is to use a tiny microcontroller that has EEPPROM built in. There are some PIC 12 available with EEPROM. The micro reads the two switches, drives the LED, and stores the last state in EEPROM, which it then recovers on powerup.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...