RE: CDI gr8flyer55
I'm not sure yet why it sometimes throws a spark a bit after you connect the power. It seems reasonable that since the hall input is normally high and the output is also normally high that either one could falsely trigger when powering up or powering down.
When powering down, the output pin from the processor is going to drop off before the capacitors discharge. I don't see any way to prevent this. It will happen no matter what the software does.
On power up I can add a delay before turning on interrupts. That should give the circuit time to stabilize. I'm not having much luck with checking the status in the interrupt. It seems like the interrupt gets triggered on the falling edge, but before the input actually goes to zero. That seems to be what the simulator thinks anyways.
In any case, this really isn't much of a problem. I'm not worried about it.
-Jake