??? 11/16/06 22:32 Read: times |
#128134 - Use TL0 Responding to: ???'s previous message |
Why TH1? What's different from TH0?
And TH is overflowing more slowly which means distribution of the event will have more influence. How fast can you press the button repeatedly? And what is the distribution of the interval? 5 ++ 4 + + 3 + + 2 ++ ++ 1 ++ ++ 0 0123456789012345 Interval length 0123012301230123 Timer T | | | | | overflow intervals 0112234554322110 interval probability P(T=0): 0+2+5+2=9 P(T=1): 1+3+4+1=9 P(T=2): 1+4+3+1=9 P(T=3): 2+5+2+0=9 And Mehdi has a very good point to use the hardware to capture the event. It removes the odd/even problem (actually time of wait loop) too. |