If the intention is indeed to produce a human readable 'Rev Counter' then the approach can be quite simple. Set up a timer to produce an interrupt every 500 milliseconds (a watch crystal on TMR1 comes to mind) Feed the ignition pulses into a counter, starting the timer on any one of the two pulses. Service the interrupt by saving the count, resetting the counter and clearing the flags. Multiply the (binary) count by 60. Do the usual bin to BCD conversion and display. The maximum error will be just under 1/2 crank revolution over the sample period x 60, i.e. 30 rpm at 1/2 second display updating. Averaging two counts and updating at 1 second intervals halves the error, which is then of a magnitude not usually of practical significance. Updating faster is of little practical use, as the least significant digit will just develop an annoying flicker. But I see the intention is not to build a tachometer but an ECU The basic concept here is back to front because the ignition timing ( and injection) in an ECU are derived from the map parameters, the map parameters are not derived from the ignition. The parameters addressing the map are in turn derived primarily (and minimally) from a Crankshaft Position Sensor. which has a resolution (pulses per revolution) at least an order of magnitude greater that the two which are currently available. Practical systems invoke several other additional sensors to compute / look up ignition and injector actuation. On Thu, Nov 22, 2012 at 12:19 PM, Denny Esterline wro= te: > There's an old joke, might even be on someone's sig line, I don't recall: > I _have_ to learn from other peoples mistakes. I don't have time to make > them all myself. > > Laugh at that or not, I promise you that a couple days digesting some of > the available > information about similar projects will save you more than a couple days = in > development > of yours. > > A project like MegaSquirt has many thousands of man-hours of development = in > it already. > Gleaning just a few nuggets of the underlying "why" can be priceless. > > -Denny > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 Perry Curling-Hope Research and Development --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .