A couple of potential problems you might want to look at:
potential for overflow here. While the calculation 'as a whole' might not overflow, intermediate variables may overflow, if RPM is above 2849.Code:freq = 23*RPM + RPM/3 'Calculation of frequency period = (62500/freq)*16 'Calculation of period
same thing with these lines. If period is over 65, the intermediate variables used in calculating the pauseus value may overflow.Code:pauseus (1000*period)/cnt 'Variable pause




Bookmarks