Fred wrote:You can use either 24 or 6 + the single pulse on the cam, I'd go 6 for lower interrupt load considering you'll not be dong ignition with it.
Ok, the 6x signal is what the MS is using as the TACH input currently and what the factory ECU uses as well for RPMs greater than 2500 RPM for the same reason and I'm good with that, just wanted to give you the whole picture of what the engine has available in the factory configuration.
Fred wrote:However, if the 7 tooth wheel is on the crank, how does it know which end of the cycle it's at? Or can it vary between one start to the next?
Ok, more in depth and clearly stated information is needed from me to you
The 7X crank (VR) sensor feeds an input into the DIS ignition module. The 7X signal consists of 6 equally spaced pulses every 60 crank degrees, with an extra sync pulse 10 degrees after cylinder #1/4 TDC. The DIS ignition module uses this sync pulse to determine crank position. On a GM factory DIS setup, the ECM never knows the actual crank position, and it doesn't need to in order to control the timing advance. The DIS module handles all of the cylinder firing order issues (much like Ford EDIS). We don't need to use the 7x signal since the DIS ignition module deals with the weird pattern automatically.
The DIS ignition module then sends a reference (TACH) signal (6x 0-5vdc square-wave) to the GM ECM. This reference signal consists of a square-wave pattern with 3 pulses per engine revolution (6 pulses per complete firing order cycle). The GM ECM uses this to determine engine speed, and as a timing reference to send the EST pulse back to the DIS module to control spark advance. The ECM advances or retards the EST pulse in relation to the reference pulses to change the spark advance.
The advance signal needs to be generated by the FreeEMS firmware from the reference (TACH) signal by modifying its duty cycle (pulse width). Larger duty cycles mean less advance, as the spark is delayed by a larger amount.
On the Sequential Fuel Injection (SFI) engines such as mine, GM added a 24X crank sensor (12 pulses per revolution/24 pulses per complete firing order cycle), and a 1X cam sensor. The 24x signal is 24 equally spaced pulses every 15 crank degrees. The GM ECM uses the 24X signal for high resolution fuel injection control at low rpm, and the 1X cam signal is used as a TDC reference pulse to determine crank position. To go with sequential injection in the future I think we would need to use the 24X signal as the primary trigger (for precision, but we can use the 6x, and the 1X signal as the secondary (home/cylinder#1 TDC) trigger.
But for now, I think we should stick with the 6x TACH signal plus the 1x Cam (cylinder#1 TDC) pulses for the input to the CPU for the FreeEMS firmware to process since this would involve less interrupt overhead.
Fred wrote:You keep talking about a PWM output to the DIS unit. Is it really PWM or is it a timed pulse of a certain width that the DIS interprets much like EDIS? If it's really PWM in that the timing of the edges doesn't matter, then we should shuffle your pins a bit again. If not, I think it's misleading to call it PWM. I mean, you could call a dwell PWM too, or injection duty PWM, but you don't, because the timing matters, not just the duty. If it needs to be timed the code will be simpler with the 6 tooth setup too.
That was entirely my fault

with terminology, it is really a timed pulse of a certain width just like EDIS uses... See the explanation above
Fred wrote:If you were doing ignition timing directly then you'd want to use the crank wheel(s) to gain better accuracy under dynamic conditions such as cranking and free revving.
Yeah, the factory only uses the 24x signal for cranking to about 2500 RPM, for everything else they use the 6x signal from the DIS ignition module.
Fred wrote:Did you draw that diagram or did it come from some good source or where? The alignment of the edges worries me a little (though not much). I'd be very interested in a LA trace from the output of the max attached to those inputs.
The Crank-Cam-DIS waveform graph is one I made in GiMP based on the original graph that I found in the "GM ASEP/BSEP ASE-8 Engine Performance Module 9 - Ignition Systems" manual (SWB_a8_m09_Final.pdf) from 2003. I added the 24x signal... The original graph is the one that was originally in my repository... The previous "Module 8 - Ignition Systems Triggering" (SWB_a8_m08_Final.pdf), also from 2003, contained similar information with more emphasis on the triggering mechanism. You should be able to download both of those PDFs by searching the Internet for them.
The alignment is not 100% accurate, I haven't scoped them while the engine is running, but I can later on in the week, at least I think I can with xoscope
Fred wrote:I need to add a special logger mode to the firmware for exactly this purpose too.
Cool, well not actually because it creates more work, but being able to log would be helpful.