Content originally posted in LPCWare by dennisdd on Tue Jul 02 02:34:53 MST 2013
I found the mistakes lies on my timerValue(U16). After I change it to U32 the value make sense.
<rising edge to another rising edge> Prescale set at 48000UL
2.08ms = 97,873 counts(average) 1ms = 47054.32 counts
10.2ms = 489,873 counts(average) 1ms = 48026.76 counts
12.2ms = 587,873 counts(average) 1ms = 48186.31 counts
14.24ms = 685,873 counts(average) 1ms = 48165.24 counts
16.30ms = 783,872 counts(average) 1ms = 48090.31 counts
18.40ms = 881,873 counts(average) 1ms = 47927.88 counts
I think if according the prescaler setup I suppose 1ms = 48000 counts? Is the value different due to the delay or something?
Is it safe for me to take 1ms = 48000? How should I go by this one?