[A83] Re: Checking how long a key is pressed


[Prev][Next][Index][Thread]

[A83] Re: Checking how long a key is pressed




> I imagine that your problem is that the counter is way 
too small.  Unless
> you have substantial delays between increments, the 
counter will reach the
> max value very quickly.  There is no way you could press 
the key for such a
> short period of time.

However, a 32 bit counter is likely to be enough.
If you were to count clocks with it, you could
count for about 11 minutes without overflowing,
and a loop is normally significantly longer than
a single clock signal...

Don't underestimate those 6 Mhz's. :)

PG






References: