I am counting the pulses picked up from a coil and monitoring on Br@y Terminal. When there is no pick up of pulses for a few seconds, the pulse quantity just zeroises. tacho_block just ensures there is only one addition when the pin on PortB0 goes High for a few milliseconds. tacho_pulse is declared as integer. tacho_pulse doesnt show up anywhere else except in RS-232 string.
if(((PINB)&(0x01))==1)
{
if(tacho_block ==0)
{
tacho_block = 1;
tacho_pulse++;
}
}
else
tacho_block = 0;
How and why does the tacho_pulse zeroise when there is no pulse pick up for few seconds? (when motor stopped) All other quantities remain unchanged .
Monitored Vcc on CRO, is steady, so chance of controller reseting