Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mimsy!aplcen!jhunix!ins_bjjb From: ins_bjjb@jhunix.UUCP (Jared J Brennan) Newsgroups: comp.sys.ibm.pc Subject: Re: millisecond timing Message-ID: <5068@jhunix.UUCP> Date: Tue, 21-Jul-87 19:33:21 EDT Article-I.D.: jhunix.5068 Posted: Tue Jul 21 19:33:21 1987 Date-Received: Fri, 24-Jul-87 00:44:12 EDT References: <1@epistemi.UUCP> <2169@bnrmtv.UUCP> Reply-To: ins_bjjb@jhunix.UUCP (Jared J Brennan) Organization: Johns Hopkins Univ. Computing Ctr. Lines: 49 Keywords: GGP Stanford Summary: . . . already done In article <2169@bnrmtv.UUCP> perkins@bnrmtv.UUCP (Henry Perkins) writes: >In article <1@epistemi.UUCP>, martin@epistemi.UUCP (Martin Shepherd) writes: >> I ask because I would like to be able to use a [PC Clone] >> for psychological experiments which involve presenting simple >> stimuli (single words, symbols, etc.) on the monitor and timing >> subjects' keypress responses to the nearest one or two milliseconds. >> I need to be able to "blank" and "unblank" >> the monitor screen so that the onset of a display is more or less >> instantaneous. > >Your accuracy can't be better than 1/30th second (color monitor) >or 1/25th second (monochrome monitor), because that's how long it >takes to refresh a screen image. You've got further problems with >standard monochrome monitors because they use slow-fade phosphors >-- it can take most of a second for an image to fade away. Color >monitors will let you change the image completely in the refresh >period, so they're much better suited to your application. > >You probably could re-program the timer chip to interrupt more >frequently than the standard 18.2 times per second if you wanted; >however, you'd have to replace the normal timer interrupt service >routine with one of your own creation -- you'd want less overhead, >and your system clock wouldn't keep time if the interrupt rate >were changed. Well, since I've been programming in the psychology department here at Hopkins doing just that, I thought perhaps I'd contribute a word or two. The software I'm using is a General Graphics Package published at Stanford. Since I don't have the thing right next to me, I can't give you the address, but I can tell you about the thing. Most of the package is for graphics, of course, but there are a few routines of note, particularly those which reset the timer chip to a frequency of your own choosing. These allow millisecond timing. As far as blanking the display goes, well, you'll just have to settle for rewriting the strings with blanks (works much better than cls'ing), whether by writing to the display memory or puts()'ing or whatever. -- Jared J. Brennan BITNET: INS_BJJB@JHUVMS, INS_BJJB@JHUNIX ARPA: ins_bjjb%jhunix@hopkins.ARPA UUCP: {allegra!hopkins, seismo!umcp-cs, ihnp4!whuxcc} !jhunix!ins_bjjb (If Email fails (as it no doubt will), send via USnail . . . Box 193 Gilman Hall Johns Hopkins Univ. Baltimore, MD 21218 )