Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!PAVEPAWS.BERKELEY.EDU!dillon From: dillon@PAVEPAWS.BERKELEY.EDU (Matt Dillon) Newsgroups: net.micro.amiga Subject: Re: I need an UltraFast Clock Message-ID: <8605260640.AA13890@pavepaws> Date: Mon, 26-May-86 02:40:11 EDT Article-I.D.: pavepaws.8605260640.AA13890 Posted: Mon May 26 02:40:11 1986 Date-Received: Tue, 27-May-86 06:50:05 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: University of California at Berkeley Lines: 37 I think we need a bit more information. I would like to pose the following questions: (1) Is this real-time, or can you do the timing operation and process the results later (i.e. not immediately) (2) Are these long timing periods (you need +/-1 uS accuracy over several seconds)? or short (Your only clocking intervals of a couple of milliseconds)? (3) Are you going to be timing continuously, or will there be times during which you will not be timing. Idle question: What in the world do you need +/- 1 uS accuracy for? --------------------------------------------------------------------- In anycase, to get the resolution you need will CAN be done in C, but will require disabling interrupts and probably a busy wait of some sort (not necessarily over the entire timing period). To get such accuracy, you will have to go directly to the hardware (as you seemed to have tried already). I believe the Amiga has a micro-second timer, which is normally used by the timer device. You could confiscate that, I suppose (it may be a bit tricky), and handle it manually. * For short time intervals, you would have to use a busy wait. * For longer time intervals, you can make it interrupt driven, but cause the interrupts to go off a couple of milliseconds before the actual timeout, then busy wait the rest of the time. The interrupt interfacing will have to be done in assembly. -Matt