My code is below for reference during this problem description. It has an alias called ext_pwr that is used to set PortC.3 high at the start of the Interrupt Service Routine (ISR) and is intended to stay high for the entire duration of the ISR, and then be set low when the ISR resumes the Main loop (ext_pwr = 0 is first statement in the Main Loop). The ext_pwr alias (PortC.3) is intended to be used to turn on or off a reed relay that is a control for external power delivery.
Must be something I don't understand about the Repeat..Until loop, because the ext_pwr pin is being set low during the loop when not intended. I don't understand why, since no changes are made to PortC.3 or any of the PortC pins during the Repeat...Until loop. Could any of the register settings being made at the start of the Repeat...Until loop cause the PortC.3 pin to go low? Appears to me that the ext_pwr pin should stay high for the entire loop and only go low when the ISR is over and returns to the Main loop, but it doesn't. Can anyone tell me why this is happening???
BTW, this code will run on a PICkit2 LPDB and the four LED's on the LPDB will light according to the PortC pin assignments in this code....purposely done so I can more easily trouble shoot the code before programming my custom board.