PULSIN running at 5mhz VS 50mhz
I am currently using PULSIN to read RPM's but I have changed the code that can be found on other threads for reading RPM's to output a byte variable instead of a word.· I have noticed the other RPM code is run at 50MHZ.· Would this affect my output since I only run the chip at 5MHZ?· Since I have 2 commands to read the high and low pulse times, I figure that the delay before the 2nd PULSIN is run may mess up some things.· The accuracy of my code is +/- 100 rpm according to the tach, but sometimes it will go haywire and the RPM output would be 10,000 or 0 even though I am at 2500 RPM.
Comments
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There is a fine line between arrogance and confidence. Make sure you don't cross it...
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Here is an example :
chance on overflow.
Try
See if your results are better now.
regards peter
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Paul
How far apart·are the SX and sensor?· Could you be picking up high-frequency noise on the input line from the sensor?· Try changing the routing of the wire, too close to the alternator/generator, spark plug wires, motors·or the distributor can induce lots of other frequencies, which may swamp the one you're trying to measure.
I hope this helped, or at least gives you food for thought.
[noparse][[/noparse]QUOTE]Check the carry bit (bit 0) in the STATUS register.
How would I check the bit?
IF tmpW1.0 = 1 THEN
'... do something?
ENDIF
or
IF C = 1 THEN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php