I thought this would be simple (average time between 4 switch presses)


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default 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.

  2. #2
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: I thought this would be simple (average time between 4 switch presses)

    Hi Paul,

    Stonking late entry - many thanks!!

    Hank.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts