Purpose of alien ignition logging: Being able to log the advance/dwell of a foreign ignition setup.

By feeding an external ignition signal into the secondary trigger, the time at which the ignition coil is fired, relative to the syncronization signal from the primary trigger, is measured. Combining this time with the knowledge of current rpm, the advance can be obtained. Measuring the dwell is just a simple measurement of pulse length.

An example (and better than here description!) of an ignition map reconstructed from a 20 minute datalog, can be seen on MembersPage/MichaelKristensen/MeasuringIgnitionAdvance

Important note

good news:

bad news:

  case 36: return getMCPdataHIGH(1); // MISC3 HIGH midopa
  case 37: return getMCPdataLOW(1);  // MISC3 LOW
  case 38: return getMCPdataHIGH(7); // MISC4 HIGH
  case 39: return getMCPdataLOW(7);  // MISC4 LOW

Or defining a new command, or some mde.. or mdd.. flags to signal the 'A' MegaTune command to issue alien data instead of something.

The alien ignition logging can also be used to evaluate if the coil, fired by GenBoard, is fired at the right time.

Testing on the table

Two simple hardware modifications are needed

The firmware then is configured to ignite the "coil" on only that I259 output, and at the same time measure (with hardware capture) when the "coil" was fired.

To test with a 60-2 trigger wheel, the following has to be configured


ign_tdcdelay=78 # decimal 120=60 degrees


h[2]=I259_4 (or whatever channel you like 0..7)

Finally start the stim, the command sequence is


and execute 'mxa' (see engine_t in global.h). Evaluation of mxa is simple: engine.d13 must not differ by more than 1, engine.t1 and engine.t2 should have almost the same value and engine.t1 > engine.t2. Finally verify that engine.alien_ignadv = engine.ignadv/2. Remember that the order of bytes in ex. a uint32_t is reversed: 2F 01 00 00 corresponds to the value 0x012F.