HIDKeys: Exact purpose of idleRate/idleCount
Posted: Fri Feb 27, 2009 12:09 am
Hi all,
I'm rather new to AVR-USB, I downloaded the HIDKeys demo one hour ago, adapted it to my little ATmega8 test setup and just added a loop that increments the "pressed" button every 45 timer overflows, so I should get A...B...C... and so on, spaced by about one second. This works, but I get each character 8 times in a row or so.
This has obviously something to do with the timer overflow loop also setting keyDidChange=1 (which I also used to indicate that a new letter shoule be sent)
But before I simply kick out this idleRate-stuff as other people seem to
do I'd like to know what it is exactly for.
When I'm done, it will be a small board with 24 ruggedized contact-closure inputs to trigger sound effects in a fair stall, I'll put it onto my web site along with some other ideas for which it could be used.
I'm rather new to AVR-USB, I downloaded the HIDKeys demo one hour ago, adapted it to my little ATmega8 test setup and just added a loop that increments the "pressed" button every 45 timer overflows, so I should get A...B...C... and so on, spaced by about one second. This works, but I get each character 8 times in a row or so.
This has obviously something to do with the timer overflow loop also setting keyDidChange=1 (which I also used to indicate that a new letter shoule be sent)
But before I simply kick out this idleRate-stuff as other people seem to
do I'd like to know what it is exactly for.
When I'm done, it will be a small board with 24 ruggedized contact-closure inputs to trigger sound effects in a fair stall, I'll put it onto my web site along with some other ideas for which it could be used.