augustinetez
Active Member
No switch involved, just a voltage divider off the unregulated rail to detect a power off condition - this is fed in to PORTB,7 pin set up for interrupt on falling edge trigger.Do you have a schematic you can post.....?
Did you debounce the switch for the save code ? or disable the interrupt after first edge detected ?
Also if you use a global variable in interrupt did you declare it as volatile ?
Regards, Dana.
Divider is 4k7 & 2k2 from power rail with the tap off to the PIC.
The power off condition is as in somebody shut it down, not a random power fail circumstance.