Yes, that's the concept. The ISR for the first injector would simply combine the current injector open and injector closed routines with a bit read and conditional statement that determines which routine to execute. I'm pretty sure it could look something like: IF (input bit) THEN (injector open routine) ELSE (injector close routine).
Of course this would be a pointless exercise that adds two chips unless the second interrupt is put to good use.
Since you are working on a general re-rendering of the concept you might try and add DPFI support. It would be a significant contribution and you would be a hero to a number of people with throttle body injection.
Adding support for a second injector would require a second set of injector calibration values and summing the output of both injectors for total fuel flow.
On another topic. If you want to really keep the inductive kick of the injector away from the MCU you can give the input side of the opto it's own ground wire back to near where you pick up the injector signal, presumably at the ECU.
Mike
|