'Non-gated Timer Routine suggestions ?'
|G'day Pic People,
I'm trying to think of a universal routine to measure a wide range of
shaft-rpm's using a non-gated method. The problem with the conventional gated
method is it requires a relatively high number of pulses per revolution for any
sort of reasonable accuracy at low-rpm's.
Applications I have in mind, are Car computers (Engine Tach, Driveshaft RPM
etc), Rotor Tach (for my Gyrocopter), and so on.. RPM's could vary from 1 to
10,000, with Pulses per rev from 1 to 100..
It would be much easier to measure the period between 1-per-rev pulses using the
timer, but I then run into the problem that this seems to require a reciprocal
math function to convert the decreasing period value into an increasing rpm
value to be displayed
I can use the 16 bit math routines from the Pic app notes, but I'm wondering if
anyone has any clever algo's on how to measure a pulse period for rpm, 1 pulse
per rev and convert it into rpm value without resorting to big and slow 16 bit
Also, as a curious side note.. I just completed my first Pic Parallel port based
programmer and had all sorts of trouble getting it going, until finally in
desperation, I swapped Parallel ports on my PC, and everything worked OK
I'm using the David Tait/Don McKenzie design programmer on LPT2 with the
WinPicProg software under windows 95. Getting program/verify failures all
over the place.. I had my printer on LPT1, which is the motherboard LPT port,
and the programmer on LPT2 which is a ISA card based on the standard 82C11
chip.. nothing fancy.. The programmer refused to work on LPT2, even with
addresses and all set correctly.. Using the diagnostics in WinPicProg (the
manual Vpp/Vdd/Clock/Data activtion buttons) all worked fine, but it wouldn't
Put the programmer on LPT1, and it instantly works fine. But LPT2 is definitely
working OK, as the printer is now quite happily working on that port..
Strange.. Any clues people ? I'd prefer to have the programmer on the
card-based port rather than the motherboard based port, as the programmer will
be linked to various prototype PCB's, and I'd rather accidentally fry a
replaceable $20 card Paralel port than a motherboard parallel port..
Brett Paulin : Trance DJ Spock, Electronic Engineer & Gyrocopter Pilot
For DAT trading, DJ Spock & Techno Magic - http://home.mira.net/~rando
THINK for yourself, QUESTION Authority - ICQ Id# 5879520
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- New search...