max_imum2000
New Member
hello
in previous post i attached a simple circuit that i connected a slotted optical switch to a pic to count revloutions of a motor shaft.
i used RB0 external interrupt on a pic16f628A to count the rising edges of the incoming signal.
the signal coming out form the switch wasnt enought so i put a small 555 to act as a trigger and it worked and the pic started counting
now the problem
if i rotate the motor by hand the counting is correct
however when i increase the speed , it looses counts and increasing the speed more the more i lose counts
for 1 rev of motor the switch is triggerd 4 times.
i think it has something to do with the pulse width , the more it is narrow the more it losses counts. (thats my guess , although i can be wrong)
or maybe the ext interrupt frequancy cant exceed certain level ??
i will appricate any help
thanks
in previous post i attached a simple circuit that i connected a slotted optical switch to a pic to count revloutions of a motor shaft.
i used RB0 external interrupt on a pic16f628A to count the rising edges of the incoming signal.
the signal coming out form the switch wasnt enought so i put a small 555 to act as a trigger and it worked and the pic started counting
now the problem
if i rotate the motor by hand the counting is correct
however when i increase the speed , it looses counts and increasing the speed more the more i lose counts
for 1 rev of motor the switch is triggerd 4 times.
i think it has something to do with the pulse width , the more it is narrow the more it losses counts. (thats my guess , although i can be wrong)
or maybe the ext interrupt frequancy cant exceed certain level ??
i will appricate any help
thanks