Chris Interesting. I have a tacho application in mind, and was wondering about whether to time the interval between adjacent pulses, or to count a number of pulses over a fixed time. You've gone for the latter - are there pros and cons for the two options? Regards John Midgley >-----Original Message----- >From: Chris Eddy [SMTP:ceddy@NB.NET] >Sent: 01 June 2000 05:45 >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: Truck tachometer > >Jacky; > >For tachometer measurement, I suggest using the interrupt on port B0 feature. >The software can increment a count every time a pulse arrives, and at the >same >time timer 0 or timer 1 is running a crystal time. At some predetermined >time >increment, the counts and time are computed to arrive at RPM's. RPM's are >really RPS, so you divide counts by time period, scale it to arrive at the >correct units, and you have your RPM's. I would go one step further and fold >each new reading into a mild low pass filter so that you get a smooth result. > >Just a side note, if the alternator is belt driven, you may not get a precise >result. The belt might have 'slippage' under various RPM's and alternator >load. Picking up the ignition pulse is more exact. > >Chris Eddy > >Jacky Joulin wrote: > >> Hello , >> I need realize an application to read truck speed motor ( a tachometer ).