> Well we just acquired a car and I am thinking of making the addition of > a tachometer with a PIC. The reason is that it is an 88 Olds Delta 88 and > those kinds of cars trigger the spark plugs more than just during the > compression cycle making standard digital tachs useless, plus it sounds like > an interesting project! Has anyone does this sort of thing? I was thinking > of using a freq to voltage converter but I'd rather do it all digitally. I > was thinking about measuring the time between pulses to determine RPM > (because counting the number of pulses per set amount of time would result > in WAY to slow display updates and lack of resolution at lower RPMs). Using a CCP module makes this easy. > 100us > resolution seems good enough for my uses. What does everyone think of that? If you use a CCP module to capture the pulses, you will get much better resolution than that. I would still low pass filter the final result (probably better to filter the engine speed than the period) a bit because there may be jitter in the firing system, or in the circuit to detect a pulse. > The only thing is I would have to use the inverse of this measurement, how > easy is this to do with a PIC? No big deal. It's just a divide. If you use 32 bit math, you can probably divide the period that would result from 1 RPM by the actual period, which would directly yield integer RPM. Again, I would keep 2 to 4 extra bits and do a little low pass filtering on the value, then just update the display with the official filtered RPM value every 250mS or so. > I was thinking of using a lookup table (with > maybe 256 entries and some linear interpolation) but I'd rather do it with > the math if possible. ANY comments and pointers would be greatly > appreciated. Take a look at the 16C923. It has a CCP module and can also drive a 4 digit LCD display directly. I've done that several times. You end up with a very low parts count system. The tricky part will be the pulse detection circuit. The spark pulse is not just a single clean pulse, and there are other noise spikes in the system. By the way, your message has your email address set as the REPLY address. This is rather annoying because you have to manually edit it to reply to the list (as I did). It is easy not to notice you did this, then people reply and their message doesn't show up on the list and they think the server is broken or whatever. Unfortunately James feels you should have the right to send a message publicly to the list but have replies default to private, so the list server won't fix this automatically. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads