Browsing on Ebay, I noticed something called a Points Position Indicator (PPI) which is used to record the position of a set of model railway points which are moved by a pair of opposing solenoids, operated by momentary switch action.
One operation sets the points, the other resets them. The problem for the operator is that it may not be clear which action was performed last.
What is needed is a S-R latch, but the latch must retain the status when the power has been switched off. This is ideal for a micro-controller, as it is common for them to have built in EEPROM memory, which can retain data when the power is switched off. The retention life is about 40 years, and the memory can be written to in excess of 1 million times, which is not an issue here.
The main components used in the PPI are MC1489 type input buffers (equivalent LM1489, DS1489, or SN751489). These are designed to buffer RS232 signals, and so are resistant to +30Vdc on the input lines and offer better static protection than connecting inputs directly to the micro-controller.
On the output side, ULN2803 transistor arrays provide open-collector outputs to drive indicator leds.
The choice of micro-controller is mainly based on having sufficient GPIO, and built in EEPROM. I found the 16F884 was lowest cost single chip solution, with 37 GPIO (it has a built in oscillator, so the oscillator pins can be reconfigured as GPIO). There are lower cost solutions using two 28-pin chips, one with EEPROM and one without, sharing the EEPROM as only 1 byte is required. Utilising external serial EEPROM is also a possibility (ie Atmel 24C01).
At present 650+ have been sold.