can anyone pls give information about how to sense a power failure within nanoseconds so as to interrupt the microcontroller using the sensor and so that the microcontroller can activate a backup battery supply through the corresponding interrupt service routine so that the microcontroller makes itself work continuously even during an event of a power failure without getting reset.