Pool Teensy at 1kHz via USB

Status
Not open for further replies.

monkey

Member
Hi, there are some mice that can be pooled at 1000Hz. While I do not need such a mouse, I wonder if Teensy could be pooled at such a high frequency? It would make it great for certain real time applications.
 
The Teensy default in usb_desc.h already is an interval of 1ms.

Code:
  #define MOUSE_INTERFACE       1       // Mouse
  #define MOUSE_ENDPOINT        5
  #define MOUSE_SIZE            8
  #define MOUSE_INTERVAL        1

Of course it's up to the driver on your PC to actually configure the USB host side to actually implement this speed. From the device side, all Teensy (or any other device) can do is request the interval.

I recall seeing some info, many years ago, that Windows sometimes uses slower polling. Honestly, I've never really bothered to actually test this... but it would be fairly easy to do by just sending a lot of small movement changes and timing how long it takes.
 
Assuming the T_LC USB hardware support is similar on the M0+ chip - I'd expect it might work.

How would it be tested? Perhaps manually put the mouse on a screen point - Have the Teensy issue 100 (?) right moves and 100 (?) down moves and mark where it ends when using various decreasing delays between the move commands? See how fast the delay can be before moves are lost? Do it with buttonDown in paint and draw a line? Intermix the right and down? Will that trigger mouse acceleration?

Use delayMicroseconds() or elapsedMicroseconds() with waits 1500 down to 1000?
 
Status
Not open for further replies.
Back
Top