Page 1 of 1

Grendel: Reduced polling rate of 3D Pro?

Posted: Sun Aug 07, 2011 6:23 am
by Wasp
Grendel,

Is there any way to deliberately reduce the rate at which the teensy updates so that even if a game should poll at say 250Hz the stick would only be updating at say 16Hz?

I'm trying to counter the affects of a games increased update rate which has completely screwed over the joystick users.

Re: Grendel: Reduced polling rate of 3D Pro?

Posted: Mon Aug 08, 2011 12:21 am
by Grendel
Yes and no. The time delay between joystick readings is measured by timer 0. It's an 8-bit timer and thus is limited to a maximum time of 16.3ms, or, a readout frequency of 61Hz. The line

#define READ_DEL MS2TM( 4.5, 1024 )

at the beginning of main.c defines this delay,

#define READ_DEL MS2TM( 16.3, 1024 )

would be setting it to 61Hz. To make it slower the code needs to modified to either use a 16bit timer or by adding a software divider (ie. read the stick after T0 expired 2 or 3 times.) The latter would be easier to do.