Harmonica
Newbie level 3
I am using 8bit MCU.
Configuration:- Timer Capture to measure pulse width.
S/W Computation: - Using pulse width calculate Frequency using formula - (Clock frequency/pulse width) << 2
Problem:- The division instruction is taking 40usec which is too much overhead for the kind of application I am working on.
Probable Remedy:- I was thinking to work out any alternative where I should not use DIV instruction and yet should be able to compute the frequency.
Mandatory/What can't be changed:- MCU and timer capture is fixed. the clock source can be modified with prescalar.
Any help?
Configuration:- Timer Capture to measure pulse width.
S/W Computation: - Using pulse width calculate Frequency using formula - (Clock frequency/pulse width) << 2
Problem:- The division instruction is taking 40usec which is too much overhead for the kind of application I am working on.
Probable Remedy:- I was thinking to work out any alternative where I should not use DIV instruction and yet should be able to compute the frequency.
Mandatory/What can't be changed:- MCU and timer capture is fixed. the clock source can be modified with prescalar.
Any help?