Small success in getting main portion of the code working. About 25% there for a programmable ignitor for the stock TCCS. The biggest hurtle is coming up with a coil ON signal. Nothing out of the stock tccs can be used for this so it has to be calculated based on the previous ignition event.
The previous IGT period is measured via a timer, call this timeOld. Desired dwell is subtracted from timeOld which = the time to wait to turn ON the next coil. SO the coil turn ON signal is now controllable! Lots of testing to do through out the 'rpm' band but with this under control it should be possible!
Also have a few ideas on how to convert to a true sequential setup but not sure there is a benefit to that at this point.
View attachment NewFile1.bmp
Yellow is simulated IGT signal from TCCS/ECU, ignore exceptionally long duty cycle!
Blue is coil output signal or DWELL/coil charge time
This is with 2ms of dwell programmed at a simulated idle rpm.
View attachment NewFile2.bmp
Yellow = Interrupt triggering showing timing between coil start charge and then ignition event
Blue = simulated IGT signal from TCCS/ECU
interrupts triggered based on previous IGT signal (simulated) period. First one turns the coil on, second turns coil/ fires ignition
4ms dwell programmed
View attachment NewFile3.bmp
Yellow= Interrupt triggering showing timing between coil start charge and then ignition event
Blue= simulated IGT signal from TCCS/ECU
Interrupts with 2ms dwell.