Periodic mode and oneshot mode
francescocarsana at ds4.it
Fri Jun 9 09:15:24 CEST 2006
I'm writing a real time module to generate a square wave on the parallel
port (See attached file).
If I use periodic mode, I can generate a wave , but the period must be a
multiple of 8254's programmed period.
I've decide to use oneshot mode, so I can change the period on the run
with a user space program.
If, for example, I decide to use a wave period of 10 or 20 microseconds,
I don't obtain the result, in terms of quality, that I've obtained with
periodic mode. Infact, in oneshot mode, the square wave is much more
unstable than in periodic mode.
If I use an higher period (100 microsecons), periodic mode and oneshot
mode produce the same result.
The questions are:
1) Have I made a mistake in the code?
2) Why in periodic mode I obtain a so bad result? Does it matter the
8254's reprogramming time?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3371 bytes
Desc: not available
Url : http://mail.rtai.org/pipermail/rtai/attachments/20060609/de0c753d/attachment.c
More information about the Rtai