On Wednesday 25 July 2001 22:39, Iwo Mergler wrote:
[...]
> > I want a rtlinux module to watch for the change of state of a digital
> > input and then flag the change of state to the linux process and also
> > communicate how much time has elapsed since the last change of state.
> > Elapsed times could be anywhere from 1500 msec to 6000 msec. I
> > figure using a FIFO to xmit a flag value (i.e. 0 or 1) and an elapsed
> > time value (like the nanosecond clock's change in count).
> >
> > Am I on the right track?
>
> If I understand you correctly, you want to monitor a external signal
> with nanosecond resolution within a RT module.
>
> If you want anything at all running in your system apart from your
> task, you can't do it in a loop. The solution would be to periodically
> schedule your task to sample the signal and detect a change. If say, 1
> ms resolution is enough for you, you can do it.
You can do better than 1 ms in user space with Linux/lowlatency. :-)
Depending on the CPU and hardware, you should be able to get down to the
order of 10-100 ?s with RTLinux. I'm not saying that it's not a waste of
good CPU cycles, though...
I'd recommend some simple hardware to take the timestamping job off the
CPU. A counter that latches the current value into a register (that the
CPU can access via a port or something) and then resets every time it's
input is triggered?
//David Olofson --- Programmer, Reologica Instruments AB
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> [EMAIL PROTECTED] -'
----- End of forwarded message from [EMAIL PROTECTED] -----
-- [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/