
Originally Posted by
droptail
Are PULSIN and COUNT the only options for reading a pulsing vehicle speed sensor input?
It seems to me COUNT could be a better choice since it has a built in smoothing function by counting a multitude of pulses over a given period, as in pulses per second.
My issue's are one of data smoothing from a noisy (motorcycle) environment.
I am using a 16F716 PIC.
Thanks
Hi James,
It strikes me as a little funny, that Dave linked you to my tach program where I took the easy road and used count. A better way might be to use a timer and count interrupts. It really depends on what you are counting, and what else you expect the PIC to do. If it is just a tach then count will likely do. If you need to use the data and do something else then timer interrupts will be more satisfactory.
Noisey motorcycle environment . . . Well let's see, basically unregulated alternator, EMI from the ignition system, lots of vibration, all this means is you will have to use all the "best practices" when you design and assemble your circuit, power regulator with filter caps and a choke, put it in a metal box and ground it to the battery {altoids tins see a lot of action as chassis boxes) a ferrite bead on any input pins are cheap suppression, snubber diodes on any outputs controlling inductors. Take sure to seal the box from moisture and oil, Some foam around the PC board is pretty good insurance against vibration, as are SMT components.
Last edited by Archangel; - 23rd June 2010 at 02:14.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks