I may be trying to make a simple problem difficult.....
I have a data logger circuit designed to monitor 8 test signals. One of the signals it monitors is the "reset" signal, just after which the unit under test starts a reset process by killing the power supplying my data logger. I'm going to add a supercap to keep the Microcontroller, EEPROM and I2C port expander active long enough to write the status of the monitored lines to EEPROM when the "reset" occurred. After that point, the micro can enter a low power sleep state or even halt program execution until power is restored.
My concern is the unknown state of the supercap when the monitored system is restored to operation and power is restored to my circuit. If the supercap is flat, my PIC18F will get a fresh start and program execution will resume. No problem. If the supercap isn't flat by the time the system is restarted, my PIC won't be reset and it will be stuck in a sleep state.
My first thought is a voltage supervisor chip powered from Vcc, not the supercap. But I don't want this chip is assert a reset as the voltage drops when cut. This is when my PIC needs to record the reset/power fail event.
One solution would be a one-shot triggered when Vcc comes up which would assert a reset to get my PIC going. A 555 circuit could do this. Any other simple approaches come to mind?
As I was typing this, another idea came to mind – a watchdog timer chip powered from Vcc. If my PIC is stuck in never never land, when the watchdog isn't acknowledged, it would assert a reset and get things going.
Any other ideas or specific parts recommendations? Small (but not too tiny) is good, as my board is getting crowded.
Oh, by the way....the PIC is signaled that power has failed by a DS3231 RTC – its /RESET output connected to one of the PICs port pins.
I have a data logger circuit designed to monitor 8 test signals. One of the signals it monitors is the "reset" signal, just after which the unit under test starts a reset process by killing the power supplying my data logger. I'm going to add a supercap to keep the Microcontroller, EEPROM and I2C port expander active long enough to write the status of the monitored lines to EEPROM when the "reset" occurred. After that point, the micro can enter a low power sleep state or even halt program execution until power is restored.
My concern is the unknown state of the supercap when the monitored system is restored to operation and power is restored to my circuit. If the supercap is flat, my PIC18F will get a fresh start and program execution will resume. No problem. If the supercap isn't flat by the time the system is restarted, my PIC won't be reset and it will be stuck in a sleep state.
My first thought is a voltage supervisor chip powered from Vcc, not the supercap. But I don't want this chip is assert a reset as the voltage drops when cut. This is when my PIC needs to record the reset/power fail event.
One solution would be a one-shot triggered when Vcc comes up which would assert a reset to get my PIC going. A 555 circuit could do this. Any other simple approaches come to mind?
As I was typing this, another idea came to mind – a watchdog timer chip powered from Vcc. If my PIC is stuck in never never land, when the watchdog isn't acknowledged, it would assert a reset and get things going.
Any other ideas or specific parts recommendations? Small (but not too tiny) is good, as my board is getting crowded.
Oh, by the way....the PIC is signaled that power has failed by a DS3231 RTC – its /RESET output connected to one of the PICs port pins.