Timer expiration less than 1msec?

Hello,

I want to know if it is possible to create a timer that will send a pulse to my process faster than 1kHz.

Essentially, I want to sample my parallel port at a higher rate, and I am using a timer’s pulse to start a thread which checks (every 1msec now, but I would like to get higher rates). Is this possible?

thanks!
Matt.

Yes, by changing the tick size. This can be done through the function ClockPeriod(). Note that increasing the tick size implies increasing the number of interrupts per seconds thus it add overhead. You must be carefull how fast setup. For example 10us will leave very little CPU for other stuff then the timer interrupt.

Depending on how your parallel port is setup and the type of signal you are using, it might be possible to generate an interrupt when a signal change occurs. That means you basicaly don’t have to poll the parallel port.