Hello,
I'm Hobbyst and new to Arduino and C programming, but i have some experiences with cars and his EFI/ECU/etc systems. if your car uses a distributor only to distribute the spark at each cylinder and an ECU takes the timing of the coil charge for each cylinder/spark event, i think is possible what you want to do, but for a precise system, do you need a cam sensor because, your system don't know what cylinder is firing without this sensor! please note, the coil on plug systems works only if do you have cam sensor (and of course, crank sensor) installe in a ECU with COP capabilities. Now, i think the idea is to check a cam sensor (better if in synch with a crank sensor), in this way, we know the right sequence of cylinder, then, we measure the dwell (duration of the GND signal the ECU sends to the coil to charge it at each spark event) and make the adequate calcs to do the same at the right moment. Assume to have a system capable of sync with the cam sensor, and when this signal is HIGH the engine is at TDC with the cylinder # 1, now, we have measured the DWELL of our OEM ECU and this time is 3ms, now we can fire the coil #1 (cyl .#1) pulling the negative coil lead to GND for this DWELL time of 3 ms, but, we need to correct the retard of this first spark because, if we measure a DWELL od 3ms, and thake 0,5ms to calculate and fire the 3ms, the cylinder will receive the spark with a retard of 6,5ms ! Now we need to measure this OEM DWELL time, and save in a variable, like Actual_DWELL, at the end of the loop, we need to copy this variable in another one, --> Last_DWELL = Actual_DWELL; and for the functioning of the spark to generate, use the "Last_DWELL" or a better one (too difficult to explain better for me, sorry).
managing the interrupts is trivial, and require to know how to make it, but is the best way to do this job.
best regards,
Antonio
(sorry for my english ;))