Re: I thought this would be simple (average time between 4 switch presses)
Hi Hank,
Late to the game (as usual) and probably haven't read thoroughly enough, but why should that stop me from commenting? 8^)
You said that the times will always be less than 1 second and that the timer can hold just a little more than half a second. Why not clear the overflow flag at the same time you clear the timer. Then when you read the timer also check the overflow flag. If it is set, add $FFFF to your value. The interrupt flags work whether they are used to trigger an actual interrupt or not.
Best Regards,
Paul
The way to avoid mistakes is to gain experience. The way to gain experience is to make mistakes.
Bookmarks