How much time takes basic HID report at 12Mhz clock?
Posted: Mon Aug 12, 2013 9:04 am
Hi, I'm wondering how much time takes sending single raport when USB interrupt is ready. I know that depends on HID report length - let's assume 8 bytes (HID joystick to create steering wheel). The CPU is amtega16, 12Mhz.
I mean only V-USB library part, not whole single main loop with button checking, ADC converting etc. - only library logic (USB communication).
The purpose of this question is to check, what "steps per second" of encoder/impulsator I can use without losing some impulses (for example - can I use optical sesnor from mouse-with-ball to make a PC steering wheel with hundreds of steps per second rotated, withour losing some impulses, because lossing impulses implies de-centering of steering wheel during gameing or bad precision/glitching).
For example I want to have resolution 360 steps per rotation, with assuming that fastest human steering wheel rotation speed will be 3 rotations/second, wich gives about 1000 steps per second, wich gives step time of 1ms. If sending
HID report will last longer than 1ms I will lose some step or steps or even worse, interpret rotation in wrong direction because of broken signals. It is possible to send report in less than 1ms? If no, I assume that I have build external optical sensor processor and just give output value to my atmega.
The last small thing is that 1 step = 4 states on 2-bit implusator, so in bad case I must check mouse sensor outputs no longer than 0.25 ms
I mean only V-USB library part, not whole single main loop with button checking, ADC converting etc. - only library logic (USB communication).
The purpose of this question is to check, what "steps per second" of encoder/impulsator I can use without losing some impulses (for example - can I use optical sesnor from mouse-with-ball to make a PC steering wheel with hundreds of steps per second rotated, withour losing some impulses, because lossing impulses implies de-centering of steering wheel during gameing or bad precision/glitching).
For example I want to have resolution 360 steps per rotation, with assuming that fastest human steering wheel rotation speed will be 3 rotations/second, wich gives about 1000 steps per second, wich gives step time of 1ms. If sending
HID report will last longer than 1ms I will lose some step or steps or even worse, interpret rotation in wrong direction because of broken signals. It is possible to send report in less than 1ms? If no, I assume that I have build external optical sensor processor and just give output value to my atmega.
The last small thing is that 1 step = 4 states on 2-bit implusator, so in bad case I must check mouse sensor outputs no longer than 0.25 ms