Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watcgl.UUCP Path: utzoo!watmath!watnot!watcgl!fdfishman From: fdfishman@watcgl.UUCP (Flynn D. Fishman) Newsgroups: net.micro.amiga Subject: Clarifications for the Ultra Fast Timer Message-ID: <724@watcgl.UUCP> Date: Mon, 26-May-86 21:11:55 EDT Article-I.D.: watcgl.724 Posted: Mon May 26 21:11:55 1986 Date-Received: Tue, 27-May-86 07:44:40 EDT Distribution: net Organization: U of Waterloo, Ontario Lines: 83 >I think we need a bit more information. I would like to pose the >following questions: Ok, Matt, and anyone else who wants to tackle this problem. here is some more information I hope it helps. >Idle question: What in the world do you need +/- 1 uS accuracy for? The 1 +/- uS accuraccy is what the boss ordered :-) I was hired by the lab here to work on a project with the psycology department. The prof. is doing an experiment on the analysis of what is seen by the brain (more or less). In his experiment he shows the subject a blob (what else) with a dot somewhere near it. The user (guinne pig) is then expected to press a button depending on the position of the dot (i.e. inside or outside of the blob). It is this period between when the blob is shown and the user press the button that I need accurately timed. >(1) Is this real-time, or can you do the timing operation and >process the results later (i.e. not immediately) If I know some unit of time that has occured between time A and the user pushing a joystick (actually mouse in port 2) I can calculate the real time later. >(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)? Unforunately we are relying on a human input so the time spand can be several seconds, I can not see the time being more than 20 seconds though, (unless the user is a real loser :-) >(3) Are you going to be timing continuously, or will there be times >during which you will not be timing. The timing will be in bursts. How long between the Blob is shown and the user presses a button, I will then draw the next blob (and perform other calculations) and then start the timer again. >...CAN be done in C, but will require disabling interrupts and >probably a busy wait of some sort... >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. I have some questions now: I am in the infansy of my C learning, could someone please explain to me about the busy wait. Does anybody know where the Amiga micro-second timer is? I have the manuals if someone wanted to just tell me the page (if it is present I will look some more) >The interrupt interfacing will have to be done in assembly. I was afraid someone would say that. I just (am still) learning C, I hope someone can come up with some ideas (in C preferably) I would also like to thank Matt and the others for the swift and good help I have been getting on the net. -- FDFISHMAN (Flynn D. Fishman) UUCP : ...!{decvax|ihnp4|clyde|allegra|utzoo}!watmath!watcgl!fdfishman ARPA : fdfishman%watcgl%waterloo.csnet@csnet-relay.arpa CSNET : fdfishman%watcgl@waterloo.csnet ****************************************************************************** .... You don't understand? Perhaps I am being to subtle. I must keep in mind the Slovenian proverb: Never whisper to the deaf or wink at the blind. Oh I forgot, you are human, and will consider that rude. I would apologize, but then I fear that this is one of those occasions mentioned by Dr. Johnson on which an apology is rudeness ...... -Racter ******************************************************************************