Hello. Can anyone tell me if I am on the right track here. I saw a post from a few years back by Jeremy Harris. He talked about being able to detect the high side of a voltage regulator to see if the power has been switched off. The pin it is polling is c.2 on a 14M2. what I am trying to do is store in memory the WORD value of the position of a stepper motor before the power dies In the circuit. I have a diode on the 12V side of the regulator with a large Cap between it and the VREG, and another large Cap on the 5v side, so the on LED stays lit for a second or so. C.2 is connected on the power side of the diode with a voltage divider. Is this code correct, or have I not understood something? (wouldn't surprise me!)
Thanks for looking.
SYMBOL PULSECOUNT = W1 SETINT %00000000,%00000100 Interrupt: WRITE 255, WORD PULSECOUNT END