On Thu, 19 Aug 1999, Dresner, Norman A. wrote:

> original program ran the PC's motherboard clock at 1280 Hz to get an

> 
> Obviously the normal Linux quantum of 100 Hz won't do.  A. Rubini's book on

If you use RT-linux you are not limited by this, rtl_sched.o module lets you
set any reasonable (lets say longer than 20 us) period. 

Just use rt_task_make_periodic(&mytask, my_control_loop(), 1000000/1280);
Remember - you should not exit from my_control_loop(), just call
rt_task_wait() when you are finished. All should be in a loop.

Text below applies to non RT Linux approach. Even if you use
sched_setscheduler(...) you may miss ticks at high system load. With RT Linux
this does not happen.
 >      1) is this the place to change the value?
Yes. But you would have to use 2360 - processes are rescheduled every 2
ticks.
>       2) does anything else have to be changed?
No.
>       3) what will go wrong if the clock frequency isn't a multiple of 100
> HZ?
Nothing. You have to recompile all the modules with that header.
I had problems with SB AWE driver - played MIDIs way too fast:-)

See crdst.c in http://crds.chemie.unibas.ch/PCI-MIO-E/pcontrol-0.4.0.tar.gz
for an example of RT-Linux approach, and pcontrol-0.3.3.tar.gz for user space
approach based on HZ variable. This is a low jitter (1us) pulse generator.

--
Tomek

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to