multiplication with fractions | Cypress Semiconductor
multiplication with fractions
i am tring to measure pulse rate by gating the the input pulses for a fixed time (0.5 mS) by using a 16 bit gating timer(T1) and the incoming pulses are counted by a 16 bit counter(C1). I noticed an error in the pulse count. Eigther by reducing the gating time or multiplying the result with some fraction i may get the corrected resul like that i thought.
When i tried to multiply the counter's result with a fraction i couln't get the correct result. (i defined the counter's result as int variable). could you please suggest?