[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

272.0. "real time clock" by ECC::JAERVINEN (impersonal name) Mon Jan 26 1987 13:05

    re ??? (my previous note with many Amiga questions):
    
    One specific question wasn't answered: What kind of real time clock
    and timer functionality does the Amiga have? I would find it hard
    to believe it only uses a simple line clock.
    
    ???????????????????????????????????????????????????????????????
T.RTitleUserPersonal
Name
DateLines
272.1Much better than a line clockCOOKIE::WECKERDave (Cum Grano Salis) WeckerTue Jan 27 1987 14:2511
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.2ECC::JAERVINENimpersonal nameWed Jan 28 1987 06:418
    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.3Timer to 1us?WORDS2::BURTONFri Jan 30 1987 16:0322
    
         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.4ECC::JAERVINENimpersonal nameTue Feb 03 1987 14:1712
    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.