T.R | Title | User | Personal Name | Date | Lines |
---|
272.1 | Much better than a line clock | COOKIE::WECKER | Dave (Cum Grano Salis) Wecker | Tue Jan 27 1987 11:25 | 11 |
| re: .0
Actually there are several clocks. The simplest to use is the vertical
blanking clock (which is also the most accurate). Using it you are
guaranteed to be within +/- 16.67 milliseconds after a delay interval.
See chapter 6 "Timer.device" of the RKM for details of use.
regards,
dave
|
272.2 | | ECC::JAERVINEN | impersonal name | Wed Jan 28 1987 03:41 | 8 |
| Haven't got the RKM.. haven't even got an Amiga yet...
But surely there must be some clock(s) with better resolution?
I would like to be able to e.g. sample something (like one of the
signals on the second mouse port) at 1-5 kHz.. can this be done?
(without building just a wait loop like one would do on those
stupid single-tasking machines).
besides, the vertical timing would be 20 ms on a PAL Amiga..
|
272.3 | Timer to 1us? | WORDS2::BURTON | | Fri Jan 30 1987 13:03 | 22 |
|
Looking through the RKM... there is a field in the call
to the timers called tv_micro. This is the number of
microseconds that you want to wait. The RKM doesn't specify
any lower limit on this value, so one microsecond might
be possible. One potential problem is the multitasking.
RKM states :
"The Amiga timer device provides a general time-delay
capability. It can signal you when AT LEAST a certain
amount of time has passed. Because the Amiga is a
multitasking system, the timer device can't guarantee that
exactly the specified amount of time has elapsed."
It might be possible to change the priority of either the
calling task or the timer to obtain a more accurate delay.
I'm guessing on this, though.
Hope this helps.
Chris
|
272.4 | | ECC::JAERVINEN | impersonal name | Tue Feb 03 1987 11:17 | 12 |
| Thanks for the info.
Another question: Would it be possible to have a state change
of a mouse port lead to cause an interrupt, then read a timer
(that is running continuously)? What I really want to know is the
time between 0->1 and 1->0 transitions of a digital signal. It could
be done to sufficient accuracy by just sampling it, say, every
millisecond; however, doing it that way might have the problem
mentioned in .-1: If the delay is 'at least' 1000 useconds, I might
have a cumulative error in the timing causing the sampling frequency
to be something less than 1 kHz.
|