Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Microcomputers in psychological experimentation, headturn: a case study Pidcock, Brian 1993

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-ubc_1993_fall_pidcock_brian.pdf [ 7.54MB ]
Metadata
JSON: 831-1.0051436.json
JSON-LD: 831-1.0051436-ld.json
RDF/XML (Pretty): 831-1.0051436-rdf.xml
RDF/JSON: 831-1.0051436-rdf.json
Turtle: 831-1.0051436-turtle.txt
N-Triples: 831-1.0051436-rdf-ntriples.txt
Original Record: 831-1.0051436-source.json
Full Text
831-1.0051436-fulltext.txt
Citation
831-1.0051436.ris

Full Text

MICROCOMPUTERS IN PSYCHOLOGICAL EXPERIMENTATION,HEADTURN: A CASE STUDYbyBrian PidcockB.A.Sc., The University of British Columbia, 1971B.Sc., The University of British Columbia, 1980A THESIS SUBMITTED IN PARTIAL FULFILLMENT OFTHE REQUIREMENTS FOR THE DEGREE OFMASTER OF SCIENCEinTHE FACULTY OF GRADUATE STUDIES(Department of Computer Science)We accept this thesis as conformingto the required standardTHE UNIVERSITY OF BRITISH COLUMBIASeptember 1993© Brian Pidcock, 1993In presenting this thesis in partial fulfilment of the requirements for an advanceddegree at the University of British Columbia, I agree that the Library shall make itfreely available for reference and study. I further agree that permission for extensivecopying of this thesis for scholarly purposes may be granted by the head of mydepartment or by his or her representatives. It is understood that copying orpublication of this thesis for financial gain shall not be allowed without my writtenpermission.(SignatureDepartment of c c„,,fkl i-e ,,- 5 e ,„ c The University of British ColumbiaVancouver, CanadaDate  0 coo her /0, / 9 9 DE-6 (2/88)Ab s tractMass market microcomputers are often used in conducting psychology experiments.Despite steadily falling prices and widespread use of these microcomputers in many areas,there are significant obstacles to their universal use in psychological experimentation. Thespecialized needs of experimentation are often poorly served by mass market systems, yetthe small size of the psychology market precludes the development of low cost, specializedhardware and software.The "Headturn" technique, an experimental protocol for studying sound andspeech recognition in infants, was taken as an example of an experimental procedure thathas evolved as the computer tools have evolved. This evolution is traced and the currentstate of the "Headturn" technique is documented and analyzed. The next step in theevolution of the "Headturn" technique has been designed and implemented to takeadvantage of current mass market components, capitalizing on the lessons learned usingearlier versions of the system.Timing is one example where the needs of the experimenter are not readily met bymass market components. Different options for improved timing in the "Headturn"procedure were explored and implemented. Timing limits relative to experimental needsare discussed.iiTable of ContentsABSTRACT^ iiTABLE OF CONTENTS^ iiiLIST OF TABLES viLIST OF FIGURES^ viiACKNOWLEDGEMENTS viii1. INTRODUCTION^ 12. EXPERIMENTAL TECHNIQUES AND THE USE OF COMPUTERS^ 32.1 A Taxonomy of Psychology^ 52.2 Measurements in Psychological Experimentation^ 52.3 The Limits to Computer Use 72.4 A Literature Sample^ 82.4.1^Acoustics 92.4.2^Types of Computers^ 102.4.3^Computers for Administration^ 122.4.4^Computers for Timing 132.4.5^Computer Screen Use^ 132.4.6^Computer Sound 142.5 Obstacles and Potential Solutions 143. HISTORY AND CURRENT HEADTURN PRACTICE^ 183.1 Suzuki and Ogiba^ 203.2 Moore I^ 203.3 Wilson 213.4 Moore II 223.5 Eilers^ 223.6 Kuhl 25iii4.3.7^Werker^TIMING ISSUES IN COMPUTERIZED EXPERIMENTATION^27314.1 Overview of the PC Architecture^ 334.2 Timing Precision^ 354.3 Calibration 404.4 Timing Output Delays 414.6 Timing Input Delays^ 434.6.1^The Keyboard 454.6.2^The Mouse 464.6.3^Other Serial Devices^ 474.6.4^The Parallel Port 484.6.5^Special Purpose I/O Boards 484.6.6^The Game Port and Joystick^ 494.7 Timing Coordination^ 555. ANALYSIS OF CURRENT HEADTURN PACKAGE^ 575.1 The User Interface 585.2 Functional Flexibility^ 585.3 The Engineering Model 605.4 File Formats^ 605.5 The Development Process^ 615.6 The Button Box 625.6.1^The Original Design 625.6.2^The Improved Button Box^ 645.6.3^The Experimental Button Box 695.7 Processor Speed^ 735.8 Contention in the Data Translation Board^ 735.9 Conclusions 746. DESIGN OF THE NEW SOFTWARE PACKAGE^ 756.1 The User Interface^ 766.2 The Configuration Program^ 786.2.1^Edit Configuration File 78iv6.2.2 Edit General Parameters^ 796.2.3^Edit Session^ 806.2.4^Edit Stage 806.2.5^Edit Schedule 826.2.6^Edit Protocol^ 826.2.7 Edit Token 846.2.8^Edit Reinforcers 856.3^Designing an Experiment Session^ 856.4 Running an Experiment Session 866.5^Timing^ 886.6^Token Processing^ 916.7^The Implementation 93BIBLIOGRAPHY^ 94APPENDIX A. HEADTURN SPECIFICATION.^ 98APPENDIX B. HEADTURN DIAGRAMS 115APPENDIX C. SUPPLEMENTARY INSTALLATION INSTRUCTIONS.^ 127APPENDIX D. SWITCH TEST RESULTS.^ 138APPENDIX E. ASSEMBLER CODE USED IN TIMING.^ 152APPENDIX F. SCREEN DIAGRAMS FOR SYSTEM IMPLEMENTATION.^159APPENDIX G. EXPERIMENTATION LITERATURE SAMPLE^ 171vList of Tables2.1 Summary of Papers Sampled^ 94.1 System Timer Calibration 404.2 Real Time Clock Calibration 415.1 8250 Modem Status Register Bit Values^ 635.2 8250 Modem Control Register Bit Values 635.3 Voltages Measured Using Improved Button Box^ 685.4 Voltages Measured Using Experimental Button Box 72viList of Figures2.1 Taxonomy of Field of Psychology^ 43.1 Headturn Implementation 233.2 Visual Reinforcement System Flow Chart^ 243.3 UBC Headturn Implementation^ 284.1 Diagram of Joystick^ 504.2 Diagram of GamePad 515.1 Improved Button Box Circuit^ 675.2 Experimental Button Box Circuit 71viiAcknowledgementsDr. Kellogg S. Booth (Department of Computer Science) and Dr. Janet F. Werker(Department of Psychology) were co-supervisors of the research reported in this thesis. Dr.Mark R. Greenstreet (Department of Computer Science) served as a faculty reader for thethesis and Mr. Gary MacIsaac was the student reader. Ms. Elicia Wolowidnyk provided ahelpful introduction to the Infant Research Laboratory in the Department of Psychology atthe University of British Columbia. Mr. Brian Moorhead gave valuable advice andassistance concerning a number of hardware issues discussed in the thesis. Dr. Donald G.Jamieson of the Department of Communicative Disorders at the University of WesternOntario, Advanced Gravis Computer Technology Ltd. (Burnaby, British Columbia) andMs. Sai Choo loaned equipment that was instrumental in the research. Financial supportfor the thesis research was provided by Ms. Sai Choo and for the Infant ResearchLaboratory and the Imager Computer Graphics Laboratory by the Natural Sciences andEngineering Research Council of Canada.viiiChapter 1IntroductionExperimentation in the field of psychology is based on an understanding of thecurrent theoretical body of knowledge, good experimental design appropriate to the areaunder exploration and various supporting tools to conduct the experiment. Some of thecomputer tools used in psychological experimentation are also used in other fields. Manyare extensively used only within the field of psychology. The general purpose computer isan example of a widely used tool. Special packages of experimental tools, which usuallyinclude both hardware and software, are examples of specific tools particular to a narrowarea of research. This thesis examines such a package of hardware and software that hasbeen developed to provide support for experiments and studies employing the Headturnprocedure.The Headturn procedure was developed to study sound discrimination in infants.Because infants do not understand speech, an indirect method of measurement is required.Previous research had shown that infants would turn their heads in the direction of variousstimuli under certain specific conditions. The Headturn procedure was designed to makethis phenomenon as controllable and repeatable as possible. A hardware and software11. Introduction^ 2system that controls the experimental Headturn procedure has been in use for severalyears. During this time, significant shortcomings in both the hardware and the softwarehave become apparent. These are due both to failure of the product to meet the originalneeds of the users and to advances in the field of infant speech research, which have led toadditional needs not foreseen in the initial system. These shortcomings were significantenough to justify an assessment of the situation and a reimplementation of the software.As general background, Chapter 2 briefly surveys the use of computers within thefield of psychological experimentation. Chapter 3 then describes the evolution of theHeadturn procedure from its inception to the current state of the art. Computer control ofexperiments allows both the precise timing of the initiation of stimuli and the preciserecording of response times; Chapter 4 examines timing issues that are critical to manyexperimental techniques in psychology, including the Headturn procedure. Chapter 5analyzes the existing Headturn software and discusses shortcomings that were identified.Chapter 6 discusses the design and implementation of a new Headturn system, with thefocus on generalizing the software, utilizing reliable hardware components, improving theuser interface and extending previous capabilities to meet specific user requests.Chapter 2Experimental Techniques and the Use ofComputersThe Concise Oxford Dictionary defines psychology as the "Science of nature,functions & phenomena, of human soul or mind." By this definition, psychologicalexperimentation is any experimentation to discover the nature, functions and phenomenaof the mind. Because of the great complexity of human behavior, it is only possible to studya small part of it at a time. Because of practical, ethical and legal considerations andbecause of the limited amount known about the human mind, measurements of the nature,functions and phenomena are generally done indirectly. The ease with which studies canbe conducted depends significantly on the use of techniques that make these indirectmeasurements easy. Such techniques are often specific to each area of study withinpsychology because of the intricacy of the relationship between what is being investigatedand what is being measured as an indirect indication of the phenomenon underinvestigation.3Perception LanguageAction CognitionSocialBehaviorIndividualDifferencesIntelligence:Its NatureandMeasurementPsychopathology^Psychopathology:TreatmentBiologicalBasis ofBehaviorLearning I:Classical andInstrumentalConditioningLearning 11:BehaviorTheoryReconsideredBiologicalBasis ofSocialBehaviorPersonalityDevelopment I:SigmundFreudPersonalityDevelopment II:ModernConceptionsInterpretingthe SocialSituationMotivationFigure 2.1: Taxonomy of Field of Psychology2. Experimental Techniques and the Use of Computers^ 52.1 A Taxonomy of PsychologyThere are many ways to describe psychology, perhaps as many ways as there arepsychologists. The taxonomy of the field shown in Figure 2.1 is derived from Gleitman'sgeneral text on psychology [Gleit81]. He divides psychology into four major areas each ofwhich he divides into four or five sub-areas. The two major areas on the left side of thediagram, action and cognition, are currently more amenable to computerizedexperimentation than the two areas on the right, social behavior and individual differences.This is largely because current computer practices tend to be focused on measuringquantities over relatively short time frames using individual subjects. Most of the sub-areasin the action and cognition areas lend themselves to this type of experimentation. With theevolution of truly portable computer hardware, the evolution of better networking systemsand the passage of time, there will likely be more use of computers in the study of both thesocial behavior and individual differences areas.2.2 Measurements in Psychological ExperimentationThe most commonly measured quantities in psychology are the time and the contentof subject responses. Time can be measured directly as a reaction or response time.Duration of stimulus display, inter-stimulus intervals or allowable user response times canbe quite varied in duration. Actual subject responses are most commonly motor or verbalresponses. These are indirect measures of the more fundamental responses that are beingstudied. The most common motor response is a button or key press. Another commonresponse technique is the measurement of physical changes in the subjects during theexperiment. Scalp potentials, pupil size, eye and head movements can all be measured. In2 Experimental Techniques and the Use of Computers^ 6some animal studies, the brain itself can be analyzed during an experiment, althoughethical considerations and cost preclude this as a common procedure. With humans,modern technology such as PET or MRI now make it possible to do some direct brainmeasurement with a minimum of invasiveness. The cost of this technology currentlyrestricts this type of research to laboratories with a high level of funding.Computers are well suited to performing the timing functions employed in typicalpsychology experiments. They can keep an accurate record of subjects' responses such asbutton presses or key strokes for an indefinite period if the presses or key strokes arecaptured by the computer. Equipped with an analog to digital converter, computers canalso record physical quantities measured during an experiment. Where computers fallshort is in measuring responses that are difficult to quantify. Complex subject responsesinvolving things like speech or body movement are not easily handled by computers exceptin rather stylized ways. This problem is not unique to computers or psychology. Researchin any area that deals with phenomena that are difficult to quantify causes problems in thecomparison and reproduction of results. In psychology, areas of research that aredependent on human judgement in their measurements are poor candidates forcomputerization. At the other end of the spectrum, areas of research that are dependenton non-computer instrumentation are ideal candidates for computerization. In the former,a hybrid approach can be used in which a human makes the qualitative judgements and acomputer records them and makes quantitative measurements.2. Experimental Techniques and the Use of Computers^ 72.3 The Limits to Computer UseThere are limits to the use of computers in psychological experimentation. The firstlimit, discussed above, applies to experiments that are dependent on human judgement.Computer use in this type of experiment is generally restricted to administration.Experiments that involve quantitative measurement are much more amenable tocomputerization.The second limit is software. Given the specialized nature of research, mass marketsoftware generally is not available. Many researchers have neither the funding nor the willto get involved in major software development projects. The end result is that computersare not used in all of the experiments where they could be used.The third limit is the perceptual problem. In most cases, a computer presentsinformation as two dimensional digitized images displayed by using a video board or asdigitized sounds played by using an audio board. An image on a screen is not exactly thesame as an image on a slide or as the real object. Reading text from a screen is not exactlythe same as reading text from a sheet of paper. Digitized speech is not the same as speechthat is directly spoken. As a result, there is no guarantee that a subject's perception of acomputer generated event will be identical to the perception of a real event in the modalitybeing studied. This limit is not unique to computers. For example, in the study of responseto traumatic events, a subject's response to viewing a picture of an event is very likely todiffer from a subject's response to viewing an actual event.2. Experimental Techniques and the Use of Computers^ 8The fourth limit is physical. Experiments performed in the field or on subjects thatare in motion may require a combination of power and portability that either isn't availableor isn't affordable.The fifth limit is the computer skills of the available personnel. This limit iscompounded by the lack of good software. Again the result is that many experiments thatcould feasibly be computerized are not. As computers become a more regular part of life,this limitation should recede.2.4 A Literature SampleIn order to gain more insight into the use of computers in psychology experiments, asample of the literature was initially reviewed. Fifty papers, describing a variety ofpsychological experiments, were examined and the important procedural features of eachexperiment and the computer support that each experiment employed were tabulated. Thepapers were selected to represent the mainstream of the psychology literature, although noclaim is made that the review is complete or definitive.Papers were selected from the following journals: Journal of ExperimentalPsychology: General; Journal of Experimental Psychology: Learning Memory and Cognition;Journal of Experimental Psychology: Human Perception and Performance; and Journal of theAcoustical Society of America. Table 2.1 gives a summary of the papers surveyed and thecomputer support each used. Some experiments used more than one type of computerwhich is why the total for a column will not necessarily be equal to the sum of the numbersin the column. The tabulated results of the survey are displayed in Appendix G.2. Experimental Techniques and the Use of Computers^ 9Table 2.1: Summary of Papers SampledJournal JEP:GEN JEP:LIVIC JEP:HPP JASA JASA JASAVol-# 120-all 17-4 17-3 91-1 91-2 91-5PC 5 1 4 2 1 1Apple 1 2Commodore 64 2 2Workstation 1Digital Equipment 1 1 1 1Terak 1Amiga 1 1None 5 5 1 1Unknown 4 2 1 2 2 5Total 17 11 8 5 3 6The Journal of Experimental Psychology was assumed to represent the mainstream inpsychology. It is one of the most desirable journals in which to publish. Three of the fourjournals that make up the Journal of Experimental Psychology were surveyed. The Journal ofthe Acoustical Society of America was assumed to represent the mainstream in the study ofhearing and audiology. In preparation for the current research, a considerable number ofpapers were studied from the Behavior Research Methods, Instruments, & ComputersJournal, but these were not included in the review because the emphasis in that journal ison the computer techniques themselves rather than on psychological research.2.4.1 AcousticsThe first observation that emerges from the survey is that the acoustic area ofpsychology, psychoacoustics, stands apart from the rest of psychology. This is notsurprising. In acoustics, the experimenter is dealing with time varying air pressures whichcan be measured and analyzed. As a result, experiments in acoustics are very likely to usecomputers and other electronic equipment. This situation carries over into2. Experimental Techniques and the Use of Computers^ 10psychoacoustics. Only one of the fourteen experiments surveyed from the Journal of theAcoustical Society of America did not use a computer. These were experiments inpsychoacoustics. Ten of the thirty-six experiments surveyed from the Journal ofExperimental Psychology used no computer.2.4.2 Types of ComputersThe second observation is about the type of computer being used in psychologicalexperimentation. The IBM compatible personal computer (PC) was used in fourteen ofthe thirty-nine experiments that reported using a computer. It is likely, however, that themajority of the sixteen experiments that used a computer of unknown type, in fact, used aPC. This is probably a case where the obvious is not documented. Psychoacoustics appearsalso to be dominated by PCs. Nine of the fourteen psychoacoustic experiments surveyedused a computer but did not report the type. Commodore 64s and DEC minicomputerswere each used in four experiments, Apple in three and Amiga in two. Only oneexperiment reported the use of a workstation computer. The low hardware prices and thehigh availability of personnel with PC experience are likely the two major reasons for thedominance of PCs. Minicomputers tend to be used for historical reasons. The use of theApple, Commodore 64 and Amiga computers is probably the result of history, loyalty andperhaps some superior capability in a specialized area. There are several reasons for a lackof experiments using workstations.1. Most of the experiments don't require the additional capabilities that aworkstation provides.2. Workstations are generally more expensive than microcomputers.2. Experimental Techniques and the Use of Computers^ 113. The workstation environment requires a significantly higher level ofcomputer expertise to master.4. Personnel with workstation experience are harder to find than personnel withPC or Apple experience.There are areas, such as the study of human computer interfaces, where the superiorcapabilities of a workstation are desirable but many areas of psychology do not need thislevel of support.The use of PCs in psychological experimentation is not without problems. Theproblems stem from the fact that the uses that psychologists have for PCs are outside of thePC mainstream. One common problem is the need for millisecond timing in both displaysand input. Normally, the PC timer interrupt occurs once every 55 milliseconds which iswell below the precision required for many experiments. Various different schemes havebeen implemented to address this situation. The more important of these schemes aredescribed in Chapter 4.As mentioned earlier, software is a major problem. There is, however, no evidencethat the software situation is improved by using any other type of computer. Schneiderdiscusses this issue at length [Schnd911. On the positive side of the ledger for the PCs, theopen architecture and the simple operating system make it possible for a skilledprogrammer to produce the millisecond timing needed for input and display. The openarchitecture has also encouraged the development of a large number of third partyexpansion boards for the PC bus. Some of these boards are useful to the psychologist. AsPC hardware becomes cheaper and more powerful, it could become more useful to2. Experimental Techniques and the Use of Computers^ 12psychologists. The evolution of multimedia significantly enhances the range of stimuli thatcan be presented. Unfortunately, the new operating systems like Windows and OS/2 donot directly address the most common problems psychologists currently have with PCs. Ifanything, they make matters worse. For example, programming under Windows or OS/2to get millisecond timing control is significantly more difficult than it is under DOS. Directscreen control is also more difficult under Windows or OS/2 than it is under DOS.2.43 Computers for AdministrationThe third observation concerns the widespread use of computers for administration.Twenty-five of the thirty-six regular psychology experiments used a computer for at leastone of ordering of the presentation, recording of results or analysis of results. In thepsychoacoustic area, it was only five of fourteen, but it may be that these functions aretaken for granted in psychoacoustics and weren't reported. The papers in the Journal of theAcoustical Society of America were not as rigorous as the ones in the Journal ofExperimental Psychology in documenting the equipment set up and experimentalprocedures. Another administrative task that wasn't reported in any of the papers surveyedwas the automatic recording of the configuration and results for future reference. Theconfiguration includes all of the hardware and software components as well as the settingsfor the hardware and the parameters for the software. Properly organized, a computer canproduce and maintain much of this record more reliably and more accurately than amanual system, at least for those components of the experiment under computer control.2. Experimental Techniques and the Use of Computers^ 132.4.4 Computers for TimingThe fourth observation is the importance of timing. This can be seen from the factthat fourteen of the experiments measured reaction or response time. In addition to theneed for millisecond accuracy, these experiments require a reliable method for measuringthe delay between the subject response and associated reading of the main PC clock. Thealternative would be to use a clock in the peripheral response device. This would simplifythe measurement of the time of the user response but could require synchronization of oneor more peripheral clocks with the main PC clock.2.4.5 Computer Screen UseThe fifth observation is that in the use of the screen, the majority of the experimentsdid not go beyond text, simple line drawings or dot patterns. Most experiments that involvea timed response to the display of a visual stimulus are amenable to computerization. ACRT display is not exactly the same as a paper drawing, a projected slide, a photograph orthe real thing, but in many cases it's close enough. The 16 msec delay in filling a screenand the sequential display of the stimulus has not prevented extensive use of CRT screensfor tachistoscopic applications. There were two experiments that did simple animation.None of the experiments seemed to be pushing the limits of the available video systems.Given the sophistication of some of the work with screen systems that has been reported inthe computer science literature [Ather85] [Beat91], there is the possibility for majoradvances in screen handling within the psychology mainstream.2. Experimental Techniques and the Use of Computers^ 142.4.6 Computer SoundThe sixth observation concerns the use of sound. With one exception, none of theexperiments outside the psychoacoustic area used anything other than beeps. In thepsychoacoustic area, the experiments used speech, analog signals, digitized signals that hadbeen stored, and noise masking.Virtually all experiments that involve a timed response to an audible stimulus areamenable to computerization. The ease with which digitized stimuli can be manipulatedhas freed the experimenter from the need for laboriously constructing tapes and highlycomplex electromechanical control systems. Digitized sound is used in experiments. Butnone of the experiments in the psychoacoustic area used stored synthetic sound whichwould seem to suggest that it is not yet in common use. Synthetic stimuli have theadvantage that they are composed of known components and can be recreated exactly. Thedisadvantage of synthetic stimuli is that they are not identical to natural stimuli. Thedifference may be significant in the studies being done. Synthesis of sound on the fly forexperimental purposes did not seem to be in evidence at all.2.5 Obstacles and Potential SolutionsAs the power of readily available computers and software tools grows, it likely willbe possible to study a larger part of the human mind at one time. In the extreme, subjectscould be immersed in an artificial reality in which a vast array of responses is recorded.These responses would be correlated and analyzed by the computer to give greater insightto the experimenter. But this is still in the future.2. Experimental Techniques and the Use of Computers^ 15Within the current limits of computerization, there are several obstacles that aresearcher encounters when attempting to use computers as tools in experimentation. Thefirst obstacle is cost. Despite steadily declining prices, hardware and software still costmoney. A potentially greater barrier is the cost of the expertise needed to keep thecomputer system functioning correctly. Retaining a knowledgeable person committed overa period of time often requires significant funding. The second obstacle is software. Wewill focus on this.Because the psychology market is small, there is little incentive to developcommercial software which could be installed and used by non-technical personnel.Because researchers are researchers and not software developers, it is generally difficult todevelop good software locally. The high cost of software development is also a strongdeterrent to local development. Poorly developed software may contain bugs that caninvalidate months or years of research. As described in Edgell [Edge89], a researcher hasfour choices for software.1. Assembler programming2. High level language programming3. Programming in an experiment control language4. Using a configurable experiment control systemThe assembler option is the only one that provides all of the flexibility and controlthat a researcher is likely to need. There are two reasons for this. The first is that directcontrol of specialized hardware may only be possible using assembler. The second is thatcontrol of program execution time is much better using assembler. Unfortunately most2. Experimental Techniques and the Use of Computers^ 16professional programmers are not fully fluent in assembler. Development using assembleris slow and as a result very expensive. Assembler programs are prone to bugs especially ifthey must be modified after the original development. A mix of assembler and high levellanguage will usually do the job but the programming task is still beyond the capabilities ofmost non-programmers, development is still expensive and program bugs are still a seriousproblem.Experiment control languages tailored to the syntax and semantics of experimentcontrol would seem to be a good solution. Unfortunately, the market isn't large enough tosupport the independent development of really good experiment control languages.Configurable experiment control systems are generally specific to a particular area ofresearch. They also tend to lack flexibility. Despite these limitations, the MEL system isinstalled at over 1000 sites [Schnd88]. The CSRE experiment control system is also widelyused [Jam92]. Edgell's solution is a library of subroutines callable from a high levellanguage. This is probably feasible if there exists a large enough community in a particularresearch area to develop and support these subroutines and if the community issophisticated enough to make use of the subroutines. Despite the problems with software,the current situation is an improvement over the situation that existed in the past whenspecialized pieces of hardware had to be connected in a unique manner for eachexperiment. Yaphe, Raftery and Jamieson describe a system for solving that type ofproblem [Yaphe89]. Now the problem is largely one of configuring just the software.The overall situation can be summarized as one in which the absence of specificcomputer solutions to support specific experimental technique has been a major restriction2. Experimental Techniques and the Use of Computers^ 17on the use of computers in experimental psychology. The next chapter traces thedevelopment of the Headturn procedure, which is one of these specialized techniques.Chapter 3History and Current Headturn PracticeThe study of cognitive development in early childhood is an important field ofpsychology. The study of the development of speech recognition ability is one importantpart of this field. It is best explored by studying infants directly. In the conventional modelof psychological experimentation, subjects are instructed as to the expected responses.Their responses, which provide the experimental data, are normally some sort of verbal ormotor response. However, infants are not able to understand instructions, they are notable to verbalize and they have limited motor development. As a result, the conventionalmodel often cannot be applied to experimental research with infants. Other techniquesneed to be developed for measuring an infant's response to stimuli. An example of this isthe Headturn technique which has been developed because infants cannot press buttons orspeak in response to stimuli the way that older children and adults can.Most infants are capable of turning their heads by the end of their fifth month andwill do so spontaneously under a number of circumstances. To use the head turn as aresearch technique, the infant must be conditioned to turn its head under one set of183. History and Current Headturn Practice^ 19conditions and remain stationary under another. In this way, the infant's ability todifferentiate between the conditions can be studied.In speech research Headturn is used to test an infant's ability to differentiatebetween various speech sounds. The infant is conditioned to look straight ahead when onesound is presented and to turn its head when the sound is changed. To enhance theconditioning process, the infant receives reinforcement for turning at the correct time. Thisreinforcement is in the form of a visual display that the infant finds interesting. Thereinforcement is required in order to obtain the infant's cooperation in the experiment.Without reinforcement, the infant's responses are likely to be quite variable. Theconditioning can be done using two sounds with a very definite difference. The infant cansubsequently be tested on its ability to discriminate between sounds which differ in moresubtle ways. An important part of the Headturn procedure is the separation of thestimulus, which is audible sounds, from the reinforcement, which is visual. Previoustechniques, such as High Amplitude Sucking, use the stimulus itself as reinforcement. Theinfant is presented with an audible stimulus and the infant's sucking rate is measured.When the audible stimulus is changed, a significant change in sucking rate is taken asevidence that the infant can discriminate between the two stimuli. There is nothing otherthan the change in sound to reinforce the increase in sucking rate.The idea of reinforcing an infant's head-turning response to sound and other stimulihas its roots in early studies conducted in the 1930's in which experimenters played a formof "peek-a-boo" to attract the infant's gaze [Dix47]. The major milestones in thedevelopment of the current Headturn procedure are summarized in the next sections.Werker's Ph.D. thesis has a more complete history of Headturn research [Werk82].3. History and Current Headturn Practice^ 203.1 Suzuki and OgibaAs reported by Moore [Moore75], the idea that a visual stimulus can reinforceresponse to an audible stimulus was developed by Suzuki and Ogiba and first reported in1961. Children were conditioned to turn toward a sound source to see an illuminated doll.This technique was called conditioned orientation reflex audiometry. Suzuki and Ogiba didnot report the use of a control group in their study, so the reinforcement effect of the visualstimulus was not measured.3.2 Moore IIn a 1974 study, Moore examined the reinforcement effects of different visualstimuli in auditory localization for forty-eight infants between the ages of twelve andeighteen months [Moore75]. Auditory localization means finding the direction from whicha sound originates. When an infant turned its head to face in the direction of a soundsource in Moore's experiment, it could be considered to have localized the sound source.The infant was seated on its mother's lap. An assistant sat in front of the infant to focus theinfant's attention straight ahead. The experimenter played the stimuli from an audiometerin the control room. A loud speaker, which produced the stimuli, was located five feetfrom the infant and at a 45 ° angle to straight ahead. A turn toward the loud speaker by theinfant was counted as a head turn. Both experimenter and assistant had to be in agreementbefore a head turn was counted as a localization response. In addition to the intervals witha stimulus, there were intervals with no stimulus. Head turns were recorded during theseintervals to measure the infant's tendency to turn toward the loud speaker in the absence ofany stimulus.3. History and Current Headturn Practice^ 21The infants were divided into four groups. The first group received noreinforcement. The second group received social reinforcement in the form of smiles, patson the back and encouraging words. The third group received simple visual reinforcementin the form of a flashing red light. The fourth group received complex visual reinforcementin the form of an animated toy animal that moved in place. In all but the first group,reinforcement was given after an appropriate localization response. For the third andfourth groups, the visual reinforcers were activated by the experimenter in the controlroom. The results of the study suggested that the complex visual stimulus resulted in morelocalization responses than no reinforcement, social reinforcement or simple visualreinforcement.Moore's 1974 study was the first published account of the use of the Headturnprocedure. It confirmed and quantified the key element of the procedure, which is that avisual stimulus can reinforce an infant's response to an audible stimulus. The procedurehas been refined a certain amount over the years and the equipment has becomeprogressively more automated, but a similar spatial arrangement of the personnel andequipment is still in use today. The stimuli in Moore's study were played by theexperimenter using an Allison audiometer in the control room according to a presetschedule. There is no description of the procedure for activating the reinforcers or tallyingthe votes in the reports on the study; it was likely done manually.3.3 WilsonIn his study reported in 1976, Wilson tested ninety infants between the ages of fiveand eighteen months for auditory thresholds using animated toys as visual reinforcers3. History and Current Headtum Practice^ 22[Wils76]. An auditory threshold is a measure of the minimum sound that can be heard at agiven frequency. Only sixty percent of the five month old infants were able to complete thestudy while all but one of the six month old infants were able to complete, suggesting thatfive months is about the minimum age for participants in Headturn studies. This studyextended the Headturn procedure in two respects. Younger infants were tested andauditory thresholds were measured rather than localization responses.3.4 Moore IIMoore's 1976 study extended the 1974 study by testing sixty infants between the agesof four and eleven months [Moore77]. The effect of complex visual reinforcement on theauditory localization response was studied. This study established that five months is theminimum age at which the visual reinforcement is effective in reinforcing an auditorylocalization response. The set up of the study was essentially the same as Moore's 1974study, however, the description of the 1976 study is more extensive [Moore75]; it describesan intercom for communication between the experimenter and assistant and a manualtimer used to measure the interval during which a head turn could be counted [Moore77].The reinforcers were activated manually by the experimenter in the control room and voteswere recorded and tallied manually.3.5 EilersIn 1976, Eilers studied seventeen infants [Eiler77]. Nine of them were six monthsold and the other eight were twelve months old. They were tested for their ability todistinguish between speech sounds. The set up of the experiment, which is similar to the3. History and Current Headturn Practice^ 23E, — ExperimenterE 2 — AssistantP — ParentI — InfantR — Visual ReinforcerS — Loud SpeakerW — One Way Glass WindowFigure 3.1 Headturn Implementation (Eilers)3. History and Current Headturn Practice^ 24Timer 1 defines signal—change interval, Timer 2 initiates and controlsduration of visual reinforcerFigure 3.2: Visual ReinforcementSystem FLow Chart (Eilers)one described in Moore's studies, is shown in Figure 3.1. In Moore's studies, the assistantsat directly in front of the infant. In Eilers' study, the assistant sat 45 ° to the infant's right.Taped stimuli were played through the audiometer by the experimenter in the controlroom. The reinforcers were controlled by the system shown in Figure 3.2.In Eilers' procedure, both the experimenter and the assistant had to vote for a headturn before the reinforcers would be activated. The first timer controls the length of timeduring which a response may be reinforced. The second timer controls the duration of thereinforcement. The methods for starting the first timer and recording the votes are notdescribed so it is assumed that these were done manually. This was the first study to usethe Headturn procedure for speech discrimination.3. History and Current Headturn Practice^ 253.6 KuhlKuhl's 1978 study used synthetic stimuli that were actually stored digitally beforebeing transferred to a two channel analog tape recorder [Kuh179]. A more sophisticatedspecial purpose logic device was used to assist in the control of the experiment. The stimuliwere still played from analog tape, but the logic device controlled all other aspects of theexperiment. The logic box was an important enough advance in experiment control to bedescribed in detail. It was a collection of six subsystems: the stimulus control system, thetiming control system, the reinforcer control system, the display system, the recordingsystem and the communication system.The stimulus control system had two input channels. There was one set of stimulion each channel. One output channel was connected to an amplifier. A probabilitygenerator chose input channel one or two with a probability of 0.5, deciding which of thetwo input channels was to be played on the output channel when the start button waspressed to initiate a trial. Between trials the stimulus from the channel that had beendesignated as the background channel was played. If the stimulus from the backgroundchannel was chosen for a trial, it was a control trial. If the other channel was chosen, it wasan experimental or "change" trial. A manual override allowed the experimenter tochoose the input channel manually. There was a volume control for the output channel.The timing control system had a timer that controlled the duration of a trial and atimer that controlled the duration of reinforcement. There was a start button to initiate atrial. There was also an abort button whose purpose wasn't documented.3. History and Current Headturn Practice^ 26The reinforcer control system automatically activated the reinforcer whenever bothvote buttons were pressed during a change trial. There was also a button to activate thereinforcer manually and a switch to select the left, the right or both reinforcers.The display system contained five LEDs which indicated the following conditionswhen they were lit.1. The trial was a change trial.2. The experimenter had voted.3. The assistant had voted.4. The reinforcer had been activated.5.^The trial was correct. A correct trial is one in which a head turn happens ifand only if the stimulus changes.There were also two digital displays. One of them displayed the trial number andthe other displayed the latency time between the onset of the audio in a trial and either theend of the trial or the press of the second vote button. An analog decibel meter could beswitched to display the volume of either input channel or the output channel.The recording system had a vote button for the experimenter and a remote votebutton for the assistant. The vote button was pressed to indicate a head turn by the infant.The status of the five LEDs and the value of the two digital displays were printed afterevery trial. There was also a reset button to return the system to the background channeland reset the trial number, the latency timer and the state of the LEDs3. History and Current Headturn Practice^ 27The communication system had a vibrating pin in the assistant's vote button. Thepin was activated during a trial to inform the assistant that a trial was under way. Therewas a "volume" control for this pin. A cassette tape player was used to supply music tothe headphones that were worn by the mother and by the assistant to reduce the possibilitythat one of them might inadvertently influence the infant. The communication system alsoincluded a microphone to allow the experimenter to speak to the assistant. There was abutton which interrupted the music going to the assistant's headphones and connected themicrophone. There was also a volume control for the speech going to the assistant.The logic box represented a significant step forward in implementing the Headturntechnique. It removed an area of potential bias by automatically selecting the type of trialthat would be done. It also measured the latency time and recorded the results for eachtrial. It activated the reinforcers automatically for a predetermined length of time. Themajor drawback to the logic box is the expense and time involved in designing, building,maintaining and modifying such a specialized piece of hardware.3.7 WerkerWerker reported two studies, one in 1981 and one in 1983, that used animplementation of the Kuhl logic box [Werk81] [Werk83]. Both of these studies usedstimuli on tape. The stimuli were chosen manually by the experimenter using a randomnumber table and the results were recorded automatically using a multi-channel pen-basedevent recorder. A later study, reported in 1988, played the stimuli from tape but used anApple II+ computer in place of the logic box [Werk88]. The experimenter controlled thecomputer with a two-pedal foot press device. One pedal initiated a trial. The computer3. History and Current Headturn Practice^ 28E — ExperimenterA — AssistantP — ParentI — InfantR — Visual ReinforcerS — Loud SpeakerC — IBM Compatible ComputerW — One Way Glass WindowFigure 3.3 UBC Headturn Implementation3. History and Current Headturn Practice^ 29chose the type of trial and would switch tracks on the tape when a change trial wasrequired. The other pedal recorded a head turn. The computer recorded the results. Thereplacement of the special purpose logic box with a general purpose computer was asignificant step forward because specialized software is easier to design, implement andmaintain than specialized hardware. A study reported in 1991 used stimuli that had beendigitized [Werk91]. The use of digitized stimuli allows a great deal more flexibility instimulus presentation and saves considerable time in stimulus preparation. A Compaq 286running the Headturn software was used to control the experiments.The current practice of the Headturn technique used at UBC has the infant seatedin an acoustic enclosure on its mother's knee. To the left of the infant is a loud speaker,which produces the stimuli, and an enclosure containing four mechanical toys. The toys arenormally hidden by a sheet of dark Plexiglass, which covers the front of the enclosure. Anassistant sits directly in front of the infant and provides encouragement and feedback to theinfant. Both the assistant and the mother wear headphones which play music so that theycannot hear the stimuli. The experimenter stands outside the acoustic enclosure, viewingthe experiment through a one way window and controlling the experiment using theHeadturn software. The experimenter controls the Headturn software using acustom-built, special purpose button box which is connected to the serial port of amicrocomputer. The set up for a Headturn experiment is shown in Figure 3.3.This physical arrangement is desired so that the infant turns its head to the left for acorrect response in a change trial. This is an important detail because even at birth infantsare able to turn to the right more easily than to the left. Adopting this physicalarrangement reduces the chances of a false alarm response.3. History and Current Headturn Practice^ 30The Headturn software, under the control of the experimenter, is responsible forplaying the background and target stimuli. It is also responsible for activating the toys atthe appropriate time. When a toy is activated, a light is switched on in the enclosure sothat the toy is visible and electric power is supplied to the toy so that it moves and makessome noise. The trial-by-trial results are recorded by the Headturn software and a separatemodule is used to tabulate and print the results. There is an intercom system that allowsthe experimenter and assistant to communicate. The intercom is switched off during thetesting stages of an experiment. In this implementation of Headturn, the assistant in thebooth doesn't vote. In the past, the agreement rates between the votes of the experimenterand the assistant have been very high so it was not considered necessary to require theassistant to vote.During the training stages of the experiment session, all of the trials are changetrials. The reinforcers are activated unconditionally. During the conditioning stage, thereare both change and control trials. The reinforcers are activated only after a head turnduring a change trial. A more complete technical description of the Headturn computersystem in use at UBC is presented in Appendix A and state diagrams are in Appendix B.Chapter 4Timing Issues in ComputerizedExperimentationThe majority of psychology experiments consist of a series of timed events. Themaximum precision required is in the 1 msec range. In using computers to controlpsychology experiments the I/O delays are often important. There is a delay between theinitiation of an output command by the CPU and the production of the output by theoutput device. There is also a delay between the activation of an input device by a subjectand the receipt of the input by the CPU. The larger the number of I/O devices used in anexperiment, the more complex the I/O delay situation becomes. The software used inexperiments must be capable of real-time measurement. In psychology, the real-timerestrictions are most often set by human limitations. These limitations are generally linkedto the speed with which the human nervous system can process information and to thespeed with which the neuromuscular system can move parts of the body. Some typicaltimes for these operations are summarized here.1.^Reflex time: 20-30 msec. A reflex occurs when a muscle flexes in response toan extension of the muscle. The involuntary extension of the knee joint that314. Timing Issues in Computerized Experimentation^ 32occurs when the leg is tapped just below the kneecap is the best knownexample of a reflex.2. "Quick loop" time. 60-90 msec. A quick loop is a correction to aperturbation or a rapid adjustment in the grip and load forces in the hand.3. "Fast correction" time: 100-120 msec. A fast correction is a correction to avisual perturbation or rapid response in the arm trajectory for an ongoingmovement.4. Reaction Time: 120 msec to several seconds. Reaction time is the elapsedtime between the presentation of a stimulus and the initiation of a response.If a button is to be pressed when a certain stimulus appears on the screen,the reaction time is the elapsed time between the appearance of the stimulusand the start of movement of the finger.5. Movement times: 100 msec to several seconds. The movement time is theelapsed time from the initiation to the completion of the response. If abutton is to be pressed, the movement time is the elapsed time from theinitial movement of the finger until the completion of the button press.This chapter discusses a number of timing issues that occur in computer support forexperiments such as that used for the Headturn procedure. The discussion focuses on theIBM PC compatible platform (the one used for Headturn), but most of the issues remainthe same in other hardware and software environments.4. Timing Issues in Computerized Experimentation^ 334.1 Overview of the PC ArchitectureTo understand the timing capabilities of IBM PC compatible computers, it isnecessary to understand a little about the machine architecture. IBM PC compatibles arethe most common general purpose computers in the world. They are based on the Intelseries of microprocessors. The original IBM PC used an 8088 processor. Subsequentmachines have used the 80286, 80386, 80486 and Pentium processors. Each succeedingprocessor has featured:1. Higher clock speeds than the predecessor.2. Many instructions that execute in fewer clock cycles than they did on thepredecessor.3. A moderate increase in the size of the instruction set.4. More sophisticated support for such things as virtual memory and virtualmachine emulation.5.^Upward compatibility with the predecessor.The last point is particularly significant. A program written using the earliestinstruction set, the 8088, will still execute on the latest processor, the Pentium.The device level interface on the PC is provided by the Basic Input Output System,commonly known as the BIOS. The BIOS insulates the system and application softwarefrom the hardware by providing primitive I/O services. Because the BIOS interface to thesystem and application software that interfaces to it has remained stable throughout majorchanges in the hardware, a high degree of compatibility has been maintained. The BIOSreserves the area in the PC main memory from 0400H to 04ffH as a data area. The BIOS4. Timing Issues in Computerized Experimentation^ 34is normally resident on Read Only Memory (ROM) chips which are part of the PChardware. The original IBM PC BIOS was produced and copyrighted by IBM. Since thattime, the production of BIOSs has come to be dominated by a small number of companieswho are not dependent on any particular manufacturer of PCs. This situation has been amajor factor in the high degree of compatibility in the PC world.The Intel processors used in PC compatibles support vectored interrupts. Theinterrupt vectors are stored in the PC memory in the range from OH to 03ffH. Eachinterrupt vector is four bytes long. The first two bytes of the vector are an offset address.The second two bytes are a segment address. When an interrupt is invoked by hardware orby an INT instruction, the machine state is saved and program execution jumps to theaddress specified by the segment:offset combination specified in the interrupt vectorcorresponding to the interrupt number that was invoked. After the interrupt has beenserviced by executing the interrupt service routine pointed to by the interrupt vector, anIRET instruction is used to restore the machine state and return execution to the pre-interrupt address. Interrupts are commonly referred to by their ordinal position in theinterrupt vector table. For example, int 09H, the keyboard interrupt, is the tenth interruptin the vector table. Int OOH, the divide by zero interrupt, is the first one.Int 08H is the timer interrupt. All PCs contain an Intel 8253 or compatible timerchip which interrupts the CPU at periodic intervals. The interrupt service routine for int08H updates the time of day clock and executes an int lcH. Normally, int icH consists onlyof an IRET instruction, but the interrupt is provided to allow application software toperform functions at intervals specified by the timer interrupt.4. Timing Issues in Computerized Experimentation^ 35Display systems on the PC can be divided into monochrome and colour. Virtuallyall monochrome video systems support the Hercules specification. There is one 80 X 25character mode and one 720 X 348 pixel graphic mode supported. A Hercules compatiblecard contains 64 kilobytes of memory. Most colour video systems support the VideoGraphics Array (VGA) specification. VGA cards support a wide variety of video modes.The 80 X 25 character text mode and the sixteen colour 640 X 480 pixel graphics mode arethe ones most commonly used. A VGA card normally contains between 256 kilobytes and1 megabyte of memory. Higher resolution graphic modes are available on most VGAcards but software drivers for these modes are often unavailable or difficult to configure.This situation is due largely to the size of the market and the lack of standardization in thehigher resolution video modes. Operating environments like OS/2 and Windows thatinsulate the application from the video hardware are improving this situation.4.2 Timing PrecisionWhen the limits of human performance are being investigated, as in psychologyexperiments, mass market tools often do not have the necessary timing precision. Normallythe timer interrupt on a PC happens 18.2 times per second. The 16-bit counter on the Intel8253 timer chip is set to 0, it counts down to 0, giving a period of 65536 counts, theninterrupts the CPU. The cycle is repeated as long as the PC is running. The number ofinterrupts since midnight is stored in the BIOS data area. The clock speed of the timerchip is normally 1.1931817 megahertz, resulting in a precision of only 55 msec (the intervalbetween successive blocks of 65536 counts). This is not enough for many experiments. ThePC time of day clock is based on this same 55 msec interval. Unfortunately, external clocks4. Timing Issues in Computerized Experimentation^ 36are not able to easily interrupt the PC CPU [Buhr87]. Segalowitz talks about a hardwareclock on an add-in board that will provide millisecond timing [Sega187].The Intel 8253/8254 timer chip can be programmed to provide higher precision.The problem is that this reprogramming requires significant understanding of the low levelworkings of the PC. The method described by Graves and Bradley changes channel zero ofthe Intel 8253 timer chip into mode two [Grav87]. In mode two, the residual count in thetimer chip can be read. The total number of timer counts since midnight is calculated byreading the total number of timer interrupts since midnight from the BIOS data area thenadding the number of counts that have occurred since the last interrupt. The number ofcounts since the last interrupt is calculated by reading the residual count from the timerchip then subtracting it from the initial value, which is normally 65536. The number ofcounts is converted to milliseconds by multiplying by the number of milliseconds per count.Graves reported one problem with this method [Grav88]. The conversion of thethree integer values into one value representing the current time required about 10 msec ifa numeric coprocessor is not available. Graves describes a method for using long integersand integer rather than real arithmetic to do the conversion [Grav88]. The conversion timecan be reduced to about 2 msec in this way. There is a further problem with this methodwhich is reported by Beringer, Graves and Bovens [Ber92a] [Grav91] [Bovn90]. Theproblem is that the timer chip may finish the count and start again while interrupts aredisabled. The interrupt count read from the BIOS data area will be in error by one whichmeans a timing error of 55 msec. The solution proposed in all three papers is to check tosee if the timer count is in the upper part of the range. If so, the BIOS data area is checked4. Timing Issues in Computerized Experimentation^ 37again after interrupts have been enabled then disabled again. If the interrupt count hasbeen incremented, the higher value is used.Crosbie also puts the timer chip into mode two in order to read the count betweentimer interrupts [Cros89]. Rather than reading the timer interrupt count from the BIOSdata area, Crosbie modifies the 1cH (timer tick) interrupt handler to keep a count of thetimer interrupts during the timing interval. This scheme has the same problem thatGraves' does in that a timer interrupt may be delayed while interrupts are disabled and theprogram is reading the timer count from the timer chip [Grav87]. As a result, the timerinterrupt count could be one short.Emerson describes a slightly different approach to measuring the time betweentimer interrupts [Emer88b]. His scheme leaves the timer chip in mode three. In modethree the timer counts down from 65536 by twos. This is done twice per interrupt. A timerstatus bit available on the 8254 timer chip indicates whether or not the timer is in the firstor second countdown. The residual count is converted to an elapsed count, divided by two,then adjusted by a full half count if the status bit indicates that the second countdown wasunderway when the timer chip was read. This method does not work on machines with the8253 timer chip, which includes the original PC and the XT. AT class and later machinesused the 8254 or compatible chip, which does have the status bit.Buhrer, Sparrer and Weitkunat describe a different method for getting millisecondtiming on the PC [Buhr87]. The counter on the timer chip is set to 1193. This results in atimer interrupt every .9998 msec. The interrupt service routine for the timer interrupt ismodified to count the timer interrupts. Elapsed time from initialization can be found by4. Timing Issues in Computerized Experimentation^ 38checking a variable. The major problem with this system is that a timer interrupt must beserviced every millisecond. This could impact on the performance of the PC. This schemealso will invalidate the normal PC time of day clock. Dlhopolsky keeps track of the elapsedtime during the period when the timer interrupt frequency is altered, then restores thecorrect time of day when his timing routines are finished [Dlhop88]. Creeger uses the samefundamental method but modifies the timer interrupt service routine so that the systemtime of day handling is not disturbed [Creeg90]. Emerson uses a scheme where the CPU isinterrupted by a serial port at intervals that can be set by the user [Emer88a]. BothEmerson and Creeger have the same CPU overhead problem but don't disrupt the normalPC time keeping. With faster systems, handling a timer interrupt every millisecond is lessof a problem than it was with the original PC.Dorfman outlines a third method that does not require a timer chip [Dorf87]. Hecalls it a software clock. The idea is that time intervals can be measured by executing aknown sequence of instructions. He also documents the use of the WAIT subroutine onthe Apple II. The problem with this method is that the processor cannot be performinganother task while the clock is running. Another problem is that the time taken to executea known sequence of instructions will change if either the clock speed or the instruction setof the CPU changes. This is an old idea that has never worked very well.All of these schemes depend on a well behaved environment. Normally, under DOSthe timer interrupt has the highest priority. Therefore, the timer interrupt timing will notbe affected by keyboard, disk, serial port, parallel port, network card or other peripheralinterrupt activity. The serial port interrupt usually comes after the timer, keyboard and twoother interrupts, one of which is often used for a network card. It is important that the4. Timing Issues in Computerized Experimentation^ 39programming of the timer chip itself not be corrupted. Because DOS is a single taskoperating system which generally doesn't alter the programming of the timer chip, this isnot usually a problem. There are, however, Terminate and Stay Resident programs thataffect the timer. Use of one of these TSRs in conjunction with one of the timing schemeswould likely lead to incorrect times. All of the schemes that involve the 8253/8254 orcompatible timer chip won't work if an incompatible timer chip is used. Compatibility ofthis type tends to be less of an issue with the passage of time because the PC industrydemands a very high degree of hardware interface standardization.Most of the papers in Behavior Research Methods, Instruments, & Computers thatrelate to PC timing precision are specific to one particular language environment. Each ofthe papers on timing from Behavior Research Methods, Instruments, & Computers that wasstudied used one of Basic, C or Pascal as the main programming environment. From atechnical standpoint, assembler is probably best for applications requiring millisecondtiming. This is because assembler can be written to run more quickly than code created bycompilers or interpreters. The programmer is also in a better position to control the timingof an assembler program because the actual machine cycles can be counted. (This is moredifficult if there is a cache.) Unfortunately assembler is not an appropriate developmenttool for most psychology labs. Where assembler is used it is usually linked to one of theother programming environments. Graves and Bradley, as well as Buhrer, Sparrer andWeitkunat, use assembler linked to Basic [Grav87] [Buhr87]. More commonly, a high levellanguage is used for all of the programming. Emerson uses Turbo C [Emer88b]. Granaasprovides a version of Emerson's program converted to Microsoft C [Gran89]. Crosbie aswell as Bovens and Brysbaert use Turbo Pascal [Cros89] [Bovn90]. Dlhopolsky uses C[Dlhop88]. Creeger, Miller and Parades are exceptions to the rule that only a single4. Timing Issues in Computerized Experimentation^ 40language is supported. Their timing routines are written in assembler but they provideinterfaces to C, Fortran, Basic and Pascal [Creeg90].4.3 CalibrationThe overall accuracy of the timer chip is dependent on the accuracy of the oscillatoror crystal that is providing the clock frequency. Five PC compatible machines were testedover an interval of between twelve and fourteen hours to see how accurately they measuredtime. The results are summarized in Table 4.1. Timing was done using a Seiko quartzwristwatch that had an accuracy within one second per week. The time indicated in the Setcolumn of Table 4.1 is the time when each machine was set. The time in the Check columnis the time that was shown by the machine when it was checked at the end of the test. Thedatum time was the time shown on the wrist watch at the end of the test. The Elapsedcolumn is the total duration of the test. The Err column is the error which is the differencebetween the duration measured by the machine and the duration measured by the wristwatch. The Relative column is the relative error (the Err column divided by the Elapsedcolumn) In the first test, the machines were left powered up. This procedure measuresthe accuracy of the system timer chip. The five machines were set on the evening of May 1,1993 and checked on the afternoon of May 2, 1993.Table 4.1 System Timer CalibrationMachine Set Check Datum Elapsed Err RelativeIBM-XT 22:14:30 12:24:44 12:24:45 14:10:14 1 .0000196PCD-286 22:18:50 12:28:47 12:28:15 14:09:57 32 .0006275BIOS-286 22:21:18 12:30:10 12:30:20 14:08:52 10 .0003534386-33 22:15:50 12:25:34 12:25:35 14:09:44 1 .0000196486-33 22:18:50 12:25:52 12:26:45 14:07:02 53 .00104294. Timing Issues in Computerized Experimentation^ 41In the second test, the machines were left powered down. This procedure measures theaccuracy of the real time battery powered clock. All the machines were set on the eveningof May 2, 1993 and checked on the morning of May 3, 1993. The IBM-XT used an EverexEV-170 Magic I/O Input/Output Adapter which incorporates a real time clock. The othermachines used the industry standard real time clock which is based on the MotorolaMC146818A.Table 4.2 Real Time Clock CalibrationMachine Set Check Datum Elapsed Err RelativeIBM-XT 22:13:30 10:46:45 10:46:45 12:33:15 0 .0000000PCD-286 22:07:10 10:44:39 10:44:45 12:37:29 6 .0001320BIOS-286 22:09:30 10:42:51 10:43:00 12:33:21 9 .0001991386-33 22:12:00 10:45:52 10:46:00 12:33:52 8 .0001769486-33 22:11:30 10:42:26 10:41:30 12:30:56 56 .0012429The magnitude of the relative errors found in the testing shows that the normaltiming apparatus on the PC is accurate enough for most experiments which use timingintervals of short duration.4.4 Timing Output DelaysWhen presenting a stimulus to a subject, there will be a delay between the decisionto present the stimulus and the actual occurrence of the stimulus. For visual stimuli, thefirst limiting factor is the scan rate of the monitor. The most common scan rate is 60 hz.This means that a stimulus must appear for at least 16.7 msec. It also means that there willbe a delay in the display of the stimulus. For stimuli that occupy a small part of the screen,the delay will be randomly distributed between 0 and 16.7 msec. For a stimulus occupyinga major part of the screen, the stimulus will appear over a period of time. The first part of4. Timing Issues in Computerized Experimentation^ 42the stimulus would appear at some point on the screen. This would be followed by thegradual appearance of the part of the stimulus below the initial part on the screen. Thepart of the stimulus above the initial point would appear last. This entire process wouldtake 16.7 msec. As described by Dlhopolsky, the transfer of the stimulus to video memorycan usually be done during the vertical retrace [Dlhop89]. For a small stimulus, the time atwhich it appears on the screen can be established quite precisely using the vertical retracebit and the known scan frequency. For a large stimulus, it will at least appear continuouslyfrom the top down using this method.As long as the stimulus is text based or is reasonably simple, there is no problem inmoving it to the video memory during the vertical retrace, which takes approximately 1msec. The data bus between the host and the graphics adapter is eight bits wide. EachMOVSB instruction on a 386-33 moves 1 byte and takes 210 nanoseconds. Approximately4750 bytes can be moved during the vertical retrace. An alternative that is reported bySegalowitz is to use the memory on the display adapter [Sega187]. Many adapters can storemore than one screen of data. These screens are called display pages. The active displaypage, the one that will be displayed, is chosen using a BIOS call. A Hercules card supportsonly one page in text mode but supports two in graphics mode. A VGA adapter cansupport eight pages in text mode. In the sixteen colour 640 X 350 mode, the VGA adaptersupports two display pages. The sixteen colour 640 X 480 mode supports only one displaypage [Ferr88]. A sixteen colour 640 X 480 image requires 153,600 bytes of memory andwill require about 32 msec to transfer from host to video memory. This cannot be doneduring the vertical retrace. In fact, it cannot even be done during a single screen refreshcycle.4. Timing Issues in Computerized Experimentation^ 43In manipulating a graphic image on the screen it may not be necessary to modifyevery pixel each time the image is changed. If a small enough subset of pixels is beingchanged each time, it is possible that the changes can be made during the vertical retrace.Another possibility is the use of a colour lookup table. Under suitable conditions, all of thecolours on the screen can be changed during the vertical retrace by modifying the values inthe table [Shoup79].With audible stimuli, the timing is not as critical. Digital to Analog (D/A) boardsare capable of supporting sampling frequencies high enough for the human ear. 10,000samples per second is commonly used although some applications require higher samplingrates. The timing problem comes down to synchronizing the start of the timer to the startof the audio. This can easily be done if assembly language is being used. With a higherlevel language, access to special hardware features is usually through function calls andthese may involve extra overhead that makes it more difficult to guarantee that timingconstraints are satisfied. In particular, with assembly language it is possible to issue theI/O instructions very close together if this helps to synchronize, whereas library routinesmay make it hard to determine the relative times that the I/O instructions are actuallyexecuted. Many D/A boards allow the audio to be initiated by an external clock or anexternal trigger.4.6 Timing Input DelaysOnce a subject has sensed a stimulus, some sort of response is generally required.From the time that the subject senses the stimulus until the CPU records the response,there will be a series of delays.4. Timing Issues in Computerized Experimentation^ 44According to Posner, a[t]he delay between the occurrence of a stimulus event andthe initiation of a response to it is called the reaction time." [Posn67]. As reported byKlemmer in Posner's book, the simple reaction time for humans varies between 150 and250 msec depending on the degree of temporal uncertainty in the timing of the stimulus[Posn67]. In the extreme case, where the period between the warning signal and thestimulus was both very long and highly variable, the reaction times were in the 700 to 800msec range. Other studies reported by Posner show variations in reaction time due to theamount of information that the subject must process [Posn67]. The reaction times werealways between 150 and 800 msec.In the Headturn situation, reaction times are likely to be near the upper limitbecause the experimenter has no warning, the timing of the infant head turns isunpredictable and the infant response is often ambiguous. To this must be added thereaction and movement time of the infant. As a result, reaction time information gatheredduring Headturn testing of infants is not very precise.Once an appropriate response has been selected, there is a delay while the subjectexecutes the response. This is called the movement time. Work done by Fitts and Petersonas reported by Posner showed that movement time for simple movements depends on theindex of difficulty, which is a function of both the amplitude and precision required in themovement [Posn67]. Movement times vary from 100 to 700 msec. The movement requiredby the experimenter operating the Headturn system is very small and requires almost noprecision. As a result, movement time for the experiments would likely be near the bottomof the range in Headturn. The timing requirements in Headturn are primarily related tothe presentation of stimuli (sound tokens) and the automatic activation of the reinforcers.4. Timing Issues in Computerized Experimentation^ 45Response times for the infant are recorded to facilitate the culling of trials that are suspectbecause of unusually long response times.Once the input device has been activated by the subject, there will be a delay beforethe CPU in the PC is aware of the input. The timer cannot be read until the CPU has beenalerted. Most input devices interrupt the CPU. The interrupt handler for the particularinput device can be programmed to record the time when this happens. If an input devicedoes not generate an interrupt, it must be polled at periodic intervals. This can be done bymodifying the interrupt handler for the timer interrupt to check the state of the particularinput device. When a state change is detected, the time is recorded. The precision of thetiming can be controlled by varying the frequency of the timer interrupts and thus the rateat which polling takes place.4.6.1 The KeyboardThe keyboard is the most common input device. It has the advantage of nearuniversal availability and a high degree of familiarity for both lab personnel andexperiment subjects. The major disadvantage of the keyboard is the significant delaybetween a key press and the corresponding CPU interrupt. The size and weight of thekeyboard are also a disadvantage in some situations and the keyboard is not suitable as agraphics pointing device. The key press delay starts with the key switch scan. PCkeyboards contain a microprocessor, generally from the Intel 8048 family. The processorscans the key switches. When a key is pressed, the processor sends the appropriate scancode, called the make code, to the PC. When a key is released, a scan code, called thebreak code (equal to 080H plus the make code), is sent to the PC.4. Timing Issues in Computerized Experimentation^ 46The scanning time will depend on the processor clock speed and the number ofinstructions that must be executed for each iteration of the scan. Processing time isrequired to check the interface with the PC and to send the scan code. The interface withthe PC is a serial interface using TTL signals. According to Shearer, it takes 1 msec totransmit each byte [Shear88]. As shown in Appendix E, the BIOS code will take betweenten and fifty microseconds to process the key stroke and store the code in the buffer.Graves reported an average delay for an IBM PC keyboard of 18.4 msec with a standarddeviation of 4.3 msec [Grav87]. A third party keyboard showed an average delay of 36.7msec with a standard deviation of 2.9 msec. Segalowitz reported a systematic delay of 10msec and a variable delay which varies between 0 and 15 msec [Sega190]. KeytronicsCorporation, a major producer of PC compatible keyboards, verbally claimed a delay ofbetween 1 and 5 msec.4.6.2 The MouseThe mouse is the second most common input device. The majority of mice areattached to a serial port. The major delay in registering serial mouse button presses is thelength of time necessary to transfer the information over the serial link. The MouseSystems mouse sends five bytes of information [Sega190]. The Microsoft mouse sends threebytes of information [Ber92b]. At a transfer rate of 1200 baud, the delay for the MouseSystems mouse would be 41.7 msec assuming one start, one stop, one parity and seven databits. For the Microsoft mouse, the delay would be 25.0 msec. If the transfer rate isincreased to 9600 baud the delay times will be reduced to 5.2 and 3.1 msec respectively.The mouse delays do not have the variability that the keyboard delays do. Beringerreported the range of the delays to be 1 msec or less [Ber92b].4. Timing Issues in Computerized Experimentation^ 47With a bus mouse, the limiting factor in the delays is the interrupt rate. A busmouse connects to its own special card, which fits into the PC expansion bus. The rate atwhich the card interrupts the CPU is variable. If a key press is of shorter duration than theinter-interrupt time, it may not be registered at all. For key presses longer than the inter-interrupt time, the range of delays before registration will be randomly distributed between0 and the inter-interrupt time [Ber92b]. The default interrupt rate is 30 hz. This results ina mean delay of 16.5 msec. Crosbie recommends setting the interrupt rate to 200 hz whichresults in a mean delay of 2.5 msec [Cros90]. The resulting overhead to process theadditional interrupts will have a negative effect on the CPU's processing capability. This isless of a problem with faster CPUs.In addition to registering button presses, a mouse detects movement. Thismovement information is transmitted to the PC where it can be used to control a visualcursor. The detection of movement and the transmission of the movement information bythe mouse affects the delay times in the detection of the mouse button presses. Delays willbe longer and more variable. If a mouse is to be used strictly to transmit button presses, itmust be modified so that no movement information is detected or transmitted. This can bedone by removing the mouse ball or fixing the mouse so that it cannot be moved.4.6.3 Other Serial DevicesOther input devices can be connected to the PC serial port. The button box that isused with the current Headturn system is an example. A change in signal level of one ofthe modem status lines can be detected by the serial port hardware and an interruptrequest generated within microseconds. The major problem is that a special purpose4. Timing Issues in Computerized Experimentation^ 48hardware device, like the button box used in Headturn, is required for connection to theserial port. Special purpose hardware is expensive and very often not too reliable.4.6.4 The Parallel PortThe PC parallel port can also be used for input. Creeger describes such a scheme[Creeg90]. It involves the four control lines in the parallel interface that are controlled bythe PC. They are one (Strobe), fourteen (Auto Line Feed), sixteen (Initialize Printer) andseventeen (Select Input). Switches are wired to allow each of these pins to be shorted toground. The status of these pins can be polled by checking the control port at the I/Oaddress corresponding to the parallel port. The polling rate can be adjusted to allowacceptable input detection delays. Creeger published a circuit diagram that includeddebouncing. He reported a constant delay of 7 msec in recording switch presses [Creeg90].Debouncing helps to ensure that one switch press will not be detected as multiple switchpresses. Dalrymple-Alford describes a similar scheme [Dalry92]. He doesn't includeswitch debouncing in his circuit but demonstrates how more than four switches can be usedwith a single parallel port. This is done by connecting some of the switches to more thanone of the pins. Using the parallel port in this way results in the same problems as theconnection of special input devices to the serial port does. Special purpose hardware isgenerally more expensive, less reliable and less available than mass market hardware.4.6.5 Special Purpose I/O BoardsInput can also be done using special purpose boards that install in the PC expansionbus. For example, the Data Translation 2801A board allows the attachment of an external4. Timing Issues in Computerized Experimentation^ 49clock or an external trigger which can time events very precisely. The digital I/O feature ofthis board can also be used in a manner similar to the parallel port. A bit in the digital I/Ospace of the board can be set. A switch is connected to the corresponding physical I/Oline. When the switch is open the bit will remain high. When the switch is closed, the linewill be grounded and the bit will be pulled low. The status of each bit in the digital I/Ospace can be polled so that the state of the corresponding switch can be determined. TheDT2801A has sixteen digital I/O lines which would make this a reasonable solution if largenumbers of inputs were required. The problem of constructing a custom-built, specialpurpose switch box remains, however.4.6.6 The Game Port and JoystickA third mass market input device is the joystick, which is normally attached to agame port. Joysticks are most commonly used as input devices for video games. As aresult they are designed to support an asynchronous real time interface. Both Graves andSegalowitz reported input timing delays, for the joystick, on the order of 1 msec [Grav87][Sega190]. Segalowitz reported that a second response could be detected within 2 msec ofthe first [Sega190]. Joysticks are probably not more widely used in experimental psychologybecause they tend to be associated with video games. The programming interface to thegame port is not widely known among programmers and some PCs do not include a gameport. However, the low pfice, ergonomic design and excellent timing characteristics of thejoystick/game port combination rate serious consideration in new systems for conductingexperiments. A joystick has most of the advantages of a custom-built button box but ajoystick is mass produced and more reliable. This makes it easier for others to duplicate anexperimental set up and confirm results.4. Timing Issues in Computerized Experimentation^ 50Trigger SwitchSwitches on Top of JoystickSwitches on Joystick PadTrigger SwitchSwitches on Top of JoystickSwitches on Joystick PadFigure 4.1: Diagram of Joystick4. Timing Issues in Computerized Experimentation^ 51Figure 4.2: Diagram of GamePadBecause the joystick/game port combination looked so promising and because theredidn't seem to be too much in the literature about this interface, some testing was done. AGravis PC Joystick and a Gravis PC GamePad were obtained. Both were tested.The joystick incorporated a total of five push button switches. The switches were ofthree types. There were two switches of the first type on the top of the stick itself. Therewas one switch of the second type on the side of the stick, positioned like a trigger. Therewere two switches of the third type on the pad which was attached to the stick.The GamePad had four switches all of the same type. These switches differed fromany on the Gravis PC Joystick. There was also provision for a small joystick on theGamePad, but this was not installed.Two machines were used to do the tests, an 80286 12 Mhz machine and an 80486 33Mhz machine. The game port data normally occupies I/O address 0201H on a PCmachine. Bits four to seven of the I/O port are toggled by the switches on the joystick.4. Timing Issues in Computerized Experimentation^ 52The trigger switch on the joystick toggles the same bit as the first switch on the top of thejoystick. When a switch is open (unpressed), its bit is set. When a switch is pressed, its bitis cleared. The game port does not generate an interrupt so an application must poll inorder to read the port status. Each of the switches was tested on each of the two machines.The testing was done using the fragment of 8086 assembler code that is included inAppendix E. The main part of the loop, which is executed continuously until a change inthe button state is detected, takes 36 clocks on the 286 and 41 clocks on the 486. Theextended part of the loop, which is executed once when a state change is detected, takes 44clocks for a button down on the 286 and 38 clocks on a 486; it takes 42 clocks for a buttonup on the 286 and 35 clocks on the 486. At 12 Mhz, the main part of the loop will take 3.00//sec on the 286 while the 486, executing at 33 Mhz, will take 1.24 Asec; the extended partof the loop for a button down will take 3.67 g sec on the 286 and 1.15 Asec on the 486; theextended part of the loop for a button up will take 3.50 Asec on the 286 and 1.06 Asec onthe 486.The goal of the testing was to discover how quickly state changes in the buttonscould be initiated and detected. Two parameters were considered important. One was theminimum length of time necessary to record an actual button press. The second was themaximum length of time necessary for the transition between steady states. The testprocedure for each switch on each machine was as follows. First, ten "rapid fire" presseswere done. The button was pressed ten times in as short a time interval as possible.Second, ten "quick presses" were done. The button was pressed and released as quicklyas possible during each press; between presses, time was allowed for the switch to settle.4. Timing Issues in Computerized Experimentation^ 53Third, ten "slow presses" were done. Time was allowed in both the up and the down statefor the switch to settle.The results of the testing are recorded in Appendix D. The first observation is thatevery button press was detected. The manual count of the button presses shows the samenumber as the records made by the software. The second observation is that the differencein timing granularity on the two different machines resulted in minimal differences in theresults. The only area where there was an obvious difference was in the number of cyclesrecorded. The number of cycles is a measure of either bouncing or arcing in the switches.The difference is most apparent in the results for the switches on the joystick pad. Themean number of cycles measured using the 80286-12 was fourteen while the mean numberof cycles measured using the 80486-33 was twenty-one. It's likely that this difference is dueto the higher clock speed of the 80486-33. The switch press profiles displayed in AppendixD were plotted from the means measured using the 80486-33 and represent typical switchpress profiles for the different types of switches.When measuring the minimum time intervals in which a button press could occur,the means were mostly in the 55 to 65 msec range. Minimums ranged from 14 msec for thejoystick switches to 70 msec for the trigger switch on the joystick. In selecting a value to useas the interval between polls of the game port, half the value of the smallest minimumseemed to be a good starting point. This would result in an interrupt every 7 msec tominimize the chance that a button press would be missed.It is possible that the these times were a reflection of the motor performance of theperson pressing the switches rather than the ultimate performance capabilities of the4. Timing Issues in Computerized Experimentation^ 54switches themselves. To eliminate the variability of the human motor performance intesting the switches, a variable speed drill driving a cam could be used to press the switches.In many cases during transition times, the game port recorded two state changes within 6Asec. This is as fast as possible given the CPU clock speeds. This suggests that the gameport is very sensitive to the switch state. Changes in the state of the switch will be reflectedin the state of the game port within microseconds. This confirms previous claims that thegame port could respond in less than a millisecond. The major timing limitation on thegame port would appear to be the physical switch itself.A transition was measured as the time between two steady states. A steady statewas defined as a period of at least 10 msec in which no state changes were recorded. Atransition could be from an up to a down state or from a down to an up state. Themaximum time necessary to make a transition from one state to the other varied from 6.90cosec for the trigger switch on the joystick to 0.19 msec for the switches on the top of thejoystick. The trigger switch and the switches on the joystick pad were obviously inferiorperformers compared to the switches on top of the joystick or on the GamePad. Themaximum state transition time for the trigger switch was between 6 and 7 msec. For theswitches on the joystick pad, it was between 1 and 2 msec. The corresponding figures forthe switches on top of the joystick and on the GamePad were 0.19 and 0.31 msecrespectively. As a result, the trigger switch and the switches on the joystick pad wereeliminated from further consideration. For the switches on the GamePad, the standarddeviation in the state change time was 0.027 msec. Adding two standard deviations to themaximum and doubling yields 0.73 msec. For the switches on the top of the joystick, thestandard deviation in the state change time was 0.017 msec. Adding two standarddeviations to the maximum and doubling yields 0.45 msec. If the timer interrupts happen4. Timing Issues in Computerized Experimentation^ 55at 1 msec intervals, both of these types of switches could be used with little chance that onebutton press would be detected as two.A third limitation on the frequency of the timer interrupts is the precision requiredby the experiment. Based on the times given at the start of this chapter, interrupts every 1msec would give sufficient precision. Interrupts at 7 msec seconds would not be frequentenough for the more demanding measurements.To see if it was feasible to have a timer interrupt every 1 to 7 msec, an investigationwas done of the time necessary to service a timer interrupt on various machines. Thefragment of assembler code shown in Appendix E represents what would typically beexecuted by the timer interrupt when there was no change since the previous timerinterrupt. This will be the situation for the vast majority of timer interrupts. It is clearfrom the results presented in Appendix E that timer interrupts every 1 msec are feasible onall but the 8088 processor machines.4.7 Timing CoordinationThe preceding discussion has investigated the timing of a relatively simple model ofexperimentation. One subject responds to one stimulus using one input device. Cheaper,more sophisticated hardware and software as well as advances in the field of psychology aregoing to make more complex experiments possible. Timing coordination is likely tobecome a more critical issue. For example, with both visible and audible output, outputsynchronization is important. On the input side, more than one input could be collectedfrom a single subject or inputs from multiple subjects could be collected. A single subject4. Timing Issues in Computerized Experimentation^ 56could be making voluntary responses while one or more channels of physiological data arecollected. If a single central clock is used to time all of the inputs and outputs, then thedelays along each chain between the central CPU and each I/O device must be assessedand if possible controlled. If the timing is done at the point of I/O then there is theproblem of synchronizing multiple clocks. The synchronization of multiple independentclocks is still a significant research issue. It may well be that timing problems in experimentsystems are going to become more rather than less critical with advances in personalcomputing and psychology.Chapter 5Analysis of Current Headturn PackageThe Headturn package was written by Mr. Kurt Goldhardt of Nirvonics Inc. undercontract. The project was commissioned by Dr. Janet Werker of UBC and Dr AnneFernald of Stanford University. The first version was installed in the summer of 1987.There are currently installations of this Headturn software at UBC, Stanford, McGill andKiel University in Germany. The software is used primarily to study language capabilitiesin infants. Werker and Fernald put together a specification for the system which Goldhardtused for the implementation. The model that was used to engineer the Headturn softwarewas one in which the user specified the functionality that was required and the developercreated a program that met this specification. There was minimal feedback from the usersduring the development of the package. Since the initial release there have been three orfour upgrades. The last one was not installed due to operational difficulties.Unfortunately, communication between the developer and the users has diminishedto the point that they are no longer in contact. The end result has been a package thatmeets the users' fundamental requirements fairly well but which is sometimes difficult touse and sometimes has limited flexibility. The package does provide useable results. It575. Analysis of Current Headturn Package^ 58supports a large number of experimental parameters which does result in some flexibility.There are, however, serious shortcomings in the package in part because of the narrowfocus of the engineering model that was used.5.1 The User InterfaceThe first of these deficiencies is in the user interface. The system is very difficult toinstall. Even though it is a package intended for personal computers, it has a very strongUNIX orientation. Most personal computer experts know little about the UNIX systemand lack the mind set that facilitates working under UNIX. Although Headturn includesan automatic installation procedure, an understanding of the software is required to do asuccessful installation. This is because the system is installed as a series of semi-independent modules. The installation procedure requires the user to answer a number ofquestions. The answers to some of the questions are dependent on the answers that weregiven when other modules were installed. A terminal configuration is also required. Thisis an alien concept in the personal computer world. Headturn is also difficult to operate.The experimenter is required to use a text editor to edit two different text files. Onecontains the list of names of the files that contain the digitized sounds, which are calledtokens. The other contains the parameters needed to operate the Headturn system. Thereis minimal feedback to the experimenter while the system is running.5.2 Functional FlexibilityThe second serious deficiency in the system is flexibility. As a result of accumulateduser experience and advances in the field, the users now have a list of operations that they5. Analysis of Current Headturn Package^ 59would like to perform, but which aren't possible with the current Headturn software.These include the following.1. More flexibility in conditioning and training. The training and conditioningstages are the ones that teach the infant to turn its head when it detects achange in the stimulus. Currently each of the training and conditioningstages allows only one particular type of trial and allows only one backgroundand one target token. More flexibility would allow more training and/orconditioning stages and allow the use of more than one background or targetstimulus in these stages.2. An option to do automatic retraining after some number of consecutivemisses. Currently, the experimenter must initiate each retraining trialmanually. Retraining generally involves using background and target stimuliwith a large difference between them. The purpose of a retraining trial is tore-emphasize, to the infant, the connection between the sound difference andthe visual reinforcement.3. Correction of a problem in counting misses. The current program countsfalse alarms wrongly as misses and displays a message after three consecutivemisses. A false alarm happens when the infant turns its head during acontrol trial, which is a trial with no change in stimulus. A miss happenswhen the infant fails to turn its head during a change trial, which is a trialwith a change in stimulus.4. An option to perform an experiment session according to a preset scheduleof specified stages and stimuli.5. Analysis of Current Headturn Package^ 60This list seems minor from a programming point of view, but is very important tothe users.53 The Engineering ModelAn engineering model for the development that involved user testing of the packagebefore it was completed and user feedback to the developer during the developmentprocess likely would have resulted in a better package because of better communicationbetween the developer and the users. The specification provided by the users wasessentially a functional specification. A user review of the developer's design for thepackage before implementation might have headed off some of the current problems.User testing of the partially completed package at specified milestones during theimplementation almost certainly would have uncovered many of the current problems at apoint where they could have been fixed more easily.5.4 File FormatsAnother area where Headturn seriously lacks flexibility is in the digitized sound filesthat it accepts as input. Only one file format is supported. This format appears to beunique to Headturn. Files in this format must be produced using the digitizing toolssupplied with Headturn. No conversion program is provided to allow the use of any of themore common sound file formats with Headturn or to allow the use of the Headturn fileswith any other hearing research tools. The format of the files required by Headturn is notwell documented. It has been possible to put together a conversion program that allowsfiles in another format to be converted to the Headturn format, but this was tedious.5. Analysis of Current Headturn Package^ 61Awareness by the users of the importance of standards and insistence on a well known fileformat could have avoided this particular problem. Formats usually differ only in theirheaders (the information that precedes the digital samples) and in a few parameters suchas sampling rate and the number of bits per sample.5.5 The Development ProcessThere are several reasons why the package was developed in the way that it was. Itis very difficult for most people to specify in advance exactly what they want in a softwarepackage. But from the point of view of the developer, it is much easier to write the systemto meet a specification and to not worry about changes along the way. Unfortunately, thecost of any change tends to be higher if the change is done later in the process. In a projectof this type, which was financed by only two users, the developer cannot afford to spend agreat deal of time engineering the user interface. The developer was known to haveworked extensively in UNIX before, so apparently the easiest thing to do was to put asimple UNIX-style interface on the Headturn package. Without user exposure to pre-release versions of the package and without feedback to the developer, the users wereunaware of what they were getting by way of an interface and the developer was probablyunaware that this particular interface was not very suitable.There are also shortcomings in the Headturn package that are apparently due topoor hardware engineering.5. Analysis of Current Headturn Package^ 625.6 The Button BoxThe button box control system is not reliable. The system was examined in detailand an attempt was made to modify the button box system to produce an acceptable levelof reliability.5.6.1 The Original DesignIt is important to understand the reasons for using this particular interface ratherthan the mouse or the keyboard, which are the two most popular devices for PC input.Both the mouse and the keyboard exhibit significant delays between the time that thebutton or key is pressed and the recognition of the press by the CPU. These delays arediscussed in Chapter 4. Direct access to the serial port hardware provided a way ofcircumventing these delays. As described in the MS-DOS Encyclopedia, the INS8250UART chip that provides the serial port interface on the PC has an 8-bit modem statusregister [Dunc88]. The upper 4 bits indicate the voltage levels of the associated RS232Clines. The lower 4 bits indicate whether the voltage levels have changed since the registerwas last read.5. Analysis of Current Headturn Package^ 63Table 5.18250 Modem Status Register Bit ValuesBit Binary Meaning76543210lxxxxxxxxlxxxxxxxxlxxxxxxxxlxxxxxxxxlxxxxxxxxlxxxxxxxxlxxxxxxxxlData Carrier Detect (DCD) levelRing Indicator (RI) levelData Set Ready (DSR) levelClear To Send (CTS) levelDCD changeRI changeDSR changeCTS changeThe RS232C interface standard specifies that when a voltage of between -3 and -15volts exists on a line, a logic 1 will be detected and when a voltage of between +3 and +15volts exists on a line, a logic 0 will be detected. The RS232C interface standard alsospecifies that to assert a logic 1 a voltage of between -5 and -15 volts is needed and toassert a logic 0 a voltage of between +5 and + 15 is needed. The 2 volt difference betweenthe send and receive values is a noise margin to allow for signal degradation over themaximum distance which is 50 feet. The response time of the 8250 chip is much less than 1msec.The 8250 chip also provides a modem control register.Table 5.28250 Modem Control Register Bit ValuesBit Binary Meaning43210xxxlxxxxxxxxlxxxxxxxxlxxxxxxxxlxxxxxxxxlTurns on UART self-test configurationControls INS8250 interrupt signalsResets Hayes 1200b internal modemSets RTS outputSets DTR output5. Analysis of Current Headturn Package^ 64It is possible to construct an interface that controls a program by changing the statusof the four modem status lines. Emerson outlines a serial port interface which does exactlythis [Emer88a]. Emerson's interface also does millisecond timing. Emerson chose to usebattery power to supply the voltages for the modem status lines. With Headturn, thevoltage for the modem status lines was to be provided by the two modem control lines(RTS and DTR). The RTS line was also going to be used by Headturn to power the readylight, which indicated a certain Headturn program state.Unfortunately, the button box as originally specified was not functional. Theschematic for this circuit is included in Appendix A as part of the system specificationsupplied by the developer. The obvious problem is that the RTS line cannot be used toprovide the positive voltage for the three modem status lines and also be toggled to turnthe ready light on and off. The 10K resistors are a further problem. They are not thecorrect size to get the appropriate voltages on the modem status lines. These problemswere discovered by the users when the system was first installed.5.6.2 The Improved Button BoxAn improved button box design was done by Brian Moorhead, an electronicstechnician in the Department of Psychology at UBC, when Headturn was first installed. Aschematic diagram of his improved button box circuit is shown in Figure 5.1. The problemof using the RTS line for two purposes was avoided by connecting the three modem statuslines to the signal ground. This new configuration still has a potential problem. TheRS232C interface defines voltages between -3 and +3 to represent an undefined state,which may result when a line is grounded. Another potential problem with this button box5. Analysis of Current Headtum Package^ 65is caused by the connection of the RTS line to the DTR line through the ready light. Whenthe ready light is on, the voltage on the DTR line is raised far enough to put it into theundefined range. This can be seen in the voltage readings that were done when the readylight was on while testing this button box, as explained later in this section. It might havebeen better to connect the ready light between the RTS line and the signal ground. It isworth noting, however, that this button box has worked pretty well most of the time.A test button box was constructed using the original drawing. As predicted, thatcircuit was unworkable so the test button box was reconstructed using the improved design.The button box has three buttons, named "Begin", "Vote" and "Abort". There is alsoan LED which is called "Ready". It is likely that the Headturn software monitors thestate of the three button switches by monitoring the modem status register bit values forthe Data Carrier Detect, Data Set Ready and Clear to Send lines. Without the sourcecode, it is difficult to be certain. During the operation of the button box, the DataTerminal Ready (DTR) is kept high (logic 1). When a switch is closed, the associatedmodem status line is connected directly to the signal ground. This would appear to beproducing a logic 0 voltage on the line. The corresponding modem status register level bitwould then be cleared. When a switch is opened, the connection to the Data TerminalReady line will lower the voltage level on the associated modem control line to a logic 1state. The corresponding modem status register level bit would be set. Whether theHeadturn software reads only the level bits for the DCD, DSR and CTS lines or whetherthe software also monitors the change bits for these three lines is not clear. To illuminatethe ready LED, the Request to Send line is set to logic 0.5. Analysis of Current Headturn Package^ 66A button box, built to the improved design, was tested using the button box testprogram that is supplied with Headturn. Very often, the test program indicated that one ofthe switches was being opened and closed very rapidly when it was not. The problem wasmore severe on the Compaq machine in the Infant Research Laboratory than it was on anyof the four test machines It was hoped that perhaps a change of serial ports wouldalleviate the problems that were being encountered in the lab. To this end, the box wastested with the four test machines to see if any correlations could be found between buttonbox performance and the serial port voltages. The voltages were measured across thebutton switches when they were pressed (open). Table 5.3 summarizes the voltages thatwere measured. Where continuous state changes were noted, they continued throughoutthe time the switch was pressed. This seems to suggest that the state changes were notcaused by either switch bounce or switch arcing. The following was observed.1. PC Designs 286The Abort button registered multiple state changes when pressed. The rateof multiple state changes was faster when the ready light was off. The Beginand Vote buttons worked correctly.2. Generic 486 CloneThe Abort button occasionally registered multiple state changes whenpressed. The Begin and Vote buttons worked correctly.3.^BIOS 286The Vote button indicated continuous state changes as long as the ready lightwas off. When the ready light was on, the Vote button behaved correctly.The Begin and Abort buttons worked correctly.5. Analysis of Current Headturn Package^ 67The numbers in parentheses are the DB9 pin numbers.The colours are the wire colours for a standard telephone jack box.Figure 5.1: Improved Button Box CircuitBeginVoteAbort-.230-.227-.231-4.08-4.12- 4.11Ready Light Off Ready Light OnButtonBeginVoteAbort- 0.446- 0.447- 0.538- 4.75- 4.79- 5.46Ready Light Off Ready Light OnButtonBeginVoteAbort- 1.02- 1.03- 1.02-5.04-5.09-5.08Ready Light Off Ready Light OnButtonBeginVoteAbort- 0.036- 0.038- 0.034- 3.78- 3.80- 3.81Ready Light Off Ready Light OnButtonBeginVoteAbort-0.730- 0.720- 0.744- 3.68- 3.59-3.36PC Designs 286 - VoltagesGeneric 486 - VoltagesBIOS 286 - VoltagesIBM XT - VoltagesCompaq 286 - VoltagesReady Light Off Ready Light OnButton5. Analysis of Current Headturn Package^ 68Table 5.3 Voltages Measured Using Improved Button Box5. Analysis of Current Headtum Package^ 694. IBM XTThe Vote button indicated some multiple state changes when the programwas started. The Begin and Abort buttons worked correctly.5. Compaq 286 in Infant Research Laboratory at UBCThere have been ongoing problems with the production button box in use inthe lab. Contact cleaner spray is used extensively to facilitate the operation.The test button box appeared to produce identical results to the productionmodel.It is apparent from this investigation that the button box scheme currently in use forcontrolling the PC is very unreliable. The problems do not seem to stem from weaknessesin any particular button box or serial port. The experience of the lab personnel seems toindicate that there is a correlation between the condition of the button switches and theirperformance If the switches are in new condition, the Headturn software can be usedwithout problem. As the switches deteriorate, problems mount. A further problem withthe button box is the fact that it has to be custom built for this program This adds to theexpense of getting a Headturn installation up and running and is a significant issue forusers.5.6.3 The Experimental Button BoxAn experimental version of the button box was constructed using the design shownin Figure 5.2. The purpose of this experiment was to see if a reliable system could beconstructed if the "Ready" light was not required. The button box test program includedwith Headturn was used to do the testing. The RTS line was kept in a logic 0 state and the5. Analysis of Current Headturn Package^ 70DTR line was kept in a logic 1 state throughout. All voltages were measured relative tosignal ground. Table 5.4 summarizes the voltages that were measured. The following wasobserved.1. PC Designs 286The Begin button registered multiple state changes when the switch was closed.The rapid state changes stopped when the switch was opened or if the voltmeterwas attached to the DSR line. The Abort and Vote buttons worked correctly.2. Generic 486 CloneAll three buttons worked correctly.3. BIOS 286Both the Begin and Vote buttons indicated continuous state changes under allcircumstances. The Abort button worked correctly.4. IBM XTAll three buttons worked correctly.All of the voltages recorded in this experiment fell within the range specified for theRS232C interface. Unfortunately, the button box did not perform correctly with two of theserial ports. The voltages were measured with a voltmeter so perhaps some of thecomputers were not sensing the RS232C signals correctly due to noisy voltage references ortiming problems. When the reliability problems of the button box interface are added tothe trouble and expense of constructing special purpose hardware, it is difficult to justifythe use of this particular interface in a new system.5. Analysis of Current Headturn Package^ 71The numbers in parentheses are the DB9 pin numbers.The colours are the wire colours for a standard telephone jack box.Figure 5.2: Experimental Button Box Circuit5. Analysis of Current Headturn Package^ 72Table 5.4 Voltages Measured Using Experimental Button BoxPC Designs 286 - VoltagesButton Switch Closed Switch OpenBegin(DSR)Vote(DCD)Abort(CTS)-5.98-6.04-5.936.076.126.04Line One Closed Switches OpenDTRRTS-6.076.60-11.429.67Generic 486 - VoltagesButton Switch Closed Switch OpenBegin(DSR)Vote(DCD)Abort(CTS)-6.42-6.82-6.755.915.945.91Line One Closed Switches OpenDTRRTS-6.707.10-11.289.48BIOS 286 - VoltagesButton Switch Closed Switch OpenBegin(DSR)Vote(DCD)Abort(CTS)-8.33-8.35-8.355.655.695.69Line One Closed Switches OpenDTRRTS-8.356.58-11.359.35Table 5.4 is continued on the next page.5. Analysis of Current Headturn Package^ 73Table 5.4 Voltages Measured Using Experimental Button Box (continued)IBM XT - VoltagesButton Switch Closed Switch OpenBegin(DSR)Vote(DCD)Abort(CTS)-5.07-5.05-5.106.036.006.05Line One Closed Switches OpenDTRRTS-5.117.10-11.499.725.7 Processor SpeedThe Headturn software seems sensitive to processor speed. On an Intel 286-12processor, an unwanted trial generally occurs at the start of each stage. This does nothappen on an Intel 486-33 processor. However, on the Intel 486-33 processor, the programsometimes goes into an infinite loop playing one of the stimuli over and over again at highspeed. This problem was never noticed on the slower processors. These problems couldpossibly be due to a lack of personal computer development experience on the part of thedeveloper and the specific difficulties of writing time critical programs for the MSDOSoperating system.5.8 Contention in the Data Translation BoardBecause the Data Translation board has only one processor, the board can executeonly one command at a time. While a digital sound file token is being converted to ananalog signal, the board cannot execute another command. The current Headturn package5. Analysis of Current Headturn Package^ 74controls the reinforcers using the digital I/O feature of the Data Translation board. As aresult, the reinforcers cannot be turned on or off while a stimulus is being presented. Forshort tokens, this probably does not make a big difference, but it is wrong and should befixed. A better way to control the reinforcers would be to use a parallel port. The parallelport interface specifies eight lines of TTL signal levels. Reinforcer control requires onlyfour lines of TTL signal levels.5.9 ConclusionsThis Chapter highlights the difficulties for the user in trying to specify exactly what isrequired without seeing any feedback from the developer while the system is beingdeveloped. Providing more flexibility would have resulted in a more useful system.Because the users do not have the source code to the system and because they areno longer in contact with the developer, most of the problems with the system are not easilyaddressed. A set of supplementary installation instructions was prepared to assist users ininstalling the existing system. These supplementary instructions are contained in AppendixC. They are intended to guide the user through the regular instructions. For theremainder of the problems, the only solution appeared to be a rewrite of the software.After consultation with the users, we decided to re-engineer and rewrite the package. Thenew package was to be developed with feedback from the users based on pre-releaseversions of the package. It was to be engineered specifically for the personal computerenvironment. There was to be sufficient flexibility to meet the users' current needs andperhaps some of their future needs.Chapter 6Design of the New Software PackageIn designing a new software package to implement the Headturn procedure, theexisting package was used as the starting point. This was done for two reasons. Theexisting package has produced useable results and it is familiar to the personnel in the lab.Some degree of compatibility was thus desirable. The new package was intended togeneralize the implementation of the Headturn technique. This was done by making allstages and trial protocols both equal and general. An experiment session consists of anarbitrary collection of stages. Stages are configured with arbitrarily chosen trial protocols.Trial protocols are configured with arbitrarily chosen sound files (commonly called tokens).The initial defaults are configured to allow the new package to resemble the old one. Inthis way, the transition between the two packages is facilitated.The list of user requests that was presented in Chapter 5 was also addressed in thenew package. The generalizing of the program provides the flexibility in conditioning andtraining that was requested. An option has been added to the generalized notion of a stageto allow automatic retraining after a specified number of misses. A scheduling option has756. Design of the New Software Package^ 76also been added to allow the sequence of change and control trials in a stage to be chosenaccording to a preset schedule.Some thought was given to using a general experiment control system to implementHeadturn. The Canadian Speech Research Environment (CSRE) experiment controlsystem was evaluated. Unfortunately it did not provide a simple way of controlling thereinforcers. The CSRE system also could not be easily programmed to play sound filescontinuously.6.1 The User InterfaceIn planning a new user interface, the primary principle was that it must be possiblefor a computer literate research assistant to install and operate the program after no morethan one day of training. Installation consists of the creation of an appropriate directory onthe hard disk and of the copying of the files from the floppy disk to that directory. Areasonably chosen set of initial defaults allows the program to run usefully "right out ofthe box". The choice of sound files and the program parameters is done using aconfiguration program within the Headturn environment.Generally, the screen interface for the package is text based and keyboard driven.Enough information is presented on the screen to allow a user to deal with most situationswithout reference to any written documentation. The screens for the package are shown inAppendix F.6. Design of the New Software Package^ 77For experimenter control of the program, the Gravis four button PC GamePad waschosen. The GamePad was selected for several reasons.1. It provides four identical switches with characteristics suitable for theHeadturn technique.2. It is small and easily held in one hand or two hands.3. It is available in retail outlets for less than $100.4. It is constructed well enough to be used in the video game market andwarranted against defects.5. The serial/parallel communications adapter in a PC often incorporates agame port.6. Game ports can be used to measure timing intervals with one millisecondprecision.The buttons are named similarly to those on the earlier button box, with one newbutton introduced. The red button is [Begin]. The blue button is [Vote]. The green buttonis [Abort]. The yellow button is the new [Pause] button that has been added. The [Abort]button can be used as a shift key in combination with either [Begin] or [Vote]. A [Begin]press shifted by an [Abort] press is indicated as [Abort]-[Begin]. A possible problem withthe GamePad is that it requires a game port that supports all four buttons. The verycheapest game ports support only two buttons. This feature can be easily checked using thetest program that is supplied by the manufacturer of the GamePad. It was assumed thatthe price of a four-button game pad was not excessive, so we require it.When the Headturn program is run the Main Screen appears. There are sevenchoices on the screen. The program reads its configuration from a file called6. Design of the New Software Package^ 78headcnfg. dat from the current directory. If this file cannot be found, a warningmessage is displayed and the initial defaults are used. The choices displayed on the MainScreen, which is diagrammed on page 160 in Appendix F, are the following.1. Run Experiment2. Edit Configuration File3. Edit General Parameters4. Edit Session5. Edit Stage6. Edit Schedule7.^Edit Protocol & Stimuli6.2 The Configuration ProgramThe different parts of the configuration program are accessible from the mainscreen of the Headturn program.6.2.1 Edit Configuration FileThe complete configuration for an experiment session is stored in a configurationfile. The Edit Configuration File option reads, updates, creates and writes these files.Multiple files can be created and saved in any directory of any available disk. This screenis diagrammed on page 163 of Appendix F.6. Design of the New Software Package^ 796.2.2 Edit General ParametersThe Edit General Parameters option edits the parameters that apply to an entiresession. This screen is diagrammed on page 164 of Appendix F. There are the followingparameters.1. ID#, Subject Name, Subject Birthday, Experimenter and Assistantdocument and identify the experiment session.2. Response File is the name of the file where the experiment session, stage andtrial protocol parameters as well as the results of each trial are written as arecord of the experiment session.3. Sequenced Mode specifies whether the stages are to be run automatically insequence or if the experimenter must progress manually through the stages.4. Trial Screen Colour and Between Trial Colour select screen backgroundcolours that will visually identify to the experimenter whether or not a trial isin progress.5. Sampling Rate is the frequency in Hertz at which the original analog signalsstored in the sound files were digitized.6. Sampling Precision is the number of bits used to store each sample in thesound files.7. File Offset is the byte position relative to the start of the sound file (locationzero) at which the digitized information begins This permits various headerformats to be accommodated.8. DMA Channel is the direct memory access channel that is to be used tocommunicate with the Data Translation board. The jumpers on the board6. Design of the New Software Package^ 80must be set to match this value. Normally DMA channel 1 is used unless it isbeing used by another device in the PC.9.^I/O Address is the port address, in the PC I/O space, of the DataTranslation board. Normally 2ecH is used unless it is being used by anotherdevice in the PC.6.2.3 Edit SessionThe Edit Session option creates the list of stages that comprise an experimentsession. Up to fifteen entries may be made in the list. A particular stage can appear morethan once in the list. An experiment session can be created and run without saving theconfiguration in a file. This screen is diagrammed on page 165 of Appendix F.6.2.4 Edit StageThe Edit Stage option edits the parameters that apply to an individual stage. Astage is composed of a series of trials. The timing and presentation of the trials iscontrolled by the user with the GamePad and by the stage parameters. This screen isdiagrammed on page 166 of Appendix F. There are the following parameters.1. Stage Name uniquely identifies the stage.2. Main Protocol is the type of trials that are used by the stage.3. Retraining Protocol is the type of trial that is used when the [Abort]-[Vote]combination is pressed.4. Schedule Name specifies the type and ordering of change and control trials.If this field is set to "(random)", the schedule is computed automatically.6. Design of the New Software Package^ 81The probability of a change trial, the maximum number of consecutivechange trials, the maximum number of consecutive control trials and theblock size are used to construct the schedule. Schedules are 200 trials longwhich is the maximum length for a stage.5. Probability of Change Trial is the probability with which the target stimuliare played during a trial. This probability is based on sampling withoutreplacement to decrease the chances of a long series of change or controltrials.6. Maximum # Successive Change Trials is the maximum number ofconsecutive change trials that are allowed in a sequence of trials in a session.7. Maximum # Successive Control Trials is the maximum number ofconsecutive control trials that are allowed in a sequence of trials in a session.8. Block Size is the number of trials over which the statistical parameters arebalanced. Each block will contain the number of change trials specified bythe change trial probability.9. Minimum # of Trials specifies the minimum length of the stage in trials.10. Criterion is the number of correct answers that the subject must produce tosuccessfully complete the stage. If 0 is specified, the stage will continue untilthe [Abort]-[Begin] combination is pressed.11. Criterion Window specifies the number of trials over which the subject mustproduce the correct answers.12. Required # of Criteria specifies how many times the subject must achievethe criterion to successfully complete the stage.6. Design of the New Software Package^ 82The last two parameters on the screen handle situations in which the subject ishaving difficulty.1. # of Consecutive Misses Required is the threshold of difficulty. Only failuresto turn during change trials will be counted. False alarms, which are headturns during control trials, will not.2. Automatic Retraining? specifies whether or not an automatic retraining trialis done when the subject reaches the threshold. The computer beepswhenever the subject reaches the threshold whether or not automaticretraining has been specified.6.2.5 Edit ScheduleThe Edit Schedule option creates, updates and deletes schedules of trials. Aschedule is a specification for the ordering of change and control trials during a stage. Thisscreen is diagrammed on page 167 of Appendix F.1. Schedule Name uniquely identifies the schedule.2. Schedule Body specifies the ordering of the trials during a stage. An asteriskis used to specify a change trial and a dash is used to specify a control trial.A blank is used to specify that the trial type is to be chosen using the changetrial probability.6.2.5 Edit ProtocolThe Edit Protocol screen edits the parameters that apply to an individual trial. Aprotocol consists of tokens and specifications for playing them as well as specifications for6. Design of the New Software Package^ 83controlling the reinforcers. This screen is diagrammed on page 168 of Appendix F. Thereare the following parameters.1. Protocol Name uniquely identifies the protocol.2. Reinforcer Initiation specifies whether reinforcers are to be activatedunconditionally or when the [Vote] button is pressed. Both may be specified,in which case the reinforcers are activated at the end of the specified delay orwhen the [Vote] button is pressed, whichever comes first. (See section 5.8.)3. Initiation Delay is the delay in activating the reinforcers when the activationis unconditional. The delay is from the start of the trial. If activation istriggered by the [Vote] button, the reinforcers are activated as soon as thebutton is pressed.4. Reinforcer Duration is the length of time for which the reinforcers areactivated. This parameter controls the number of target stimuli that areplayed.5. Target Stimulus Reps is the number of times target stimuli are played duringa trial. This parameter is used only if there is no reinforcement during thetrial.6. Vote Button Extension specifies whether or not the reinforcers are keptturned on as long as the [Vote] button is depressed. The target stimulus isalso played as long as the [Vote] button is depressed in this case.7. Observation Interval is the length of time during which a head turn can berecorded with the [Vote] button. The observation interval starts when thetrial starts.8. Inter Stimulus Interval is the length of time between the end of one stimulusand the start of the next one.6. Design of the New Software Package^ 846.2.7 Edit TokenThe tokens (sound files) for a trial protocol are handled from the Edit Token optionwhich is reached from the Edit Protocol option by pressing the "F5" key. Each trialprotocol can have up to ten target and ten background tokens. This screen is diagrammedon page 169 of Appendix F.1. Target Token is the file name of a token to be played as part of a changetrial.2. Probability specifies the probability that this token will be played during atrial. Tokens without an explicit probability will be assigned a probabilityautomatically. This will be done by assigning each token without an explicitprobability an equal part of the total unassigned probability. As an example,if no probabilities are assigned to any of five target tokens for a trial, all fivetokens will have an equal probability of 0.20. If all tokens have an explicitprobability and the sum is less than one, the last token in the list will beassigned the additional probability.3. Background Token is the file name of a token to be played between trialsand as part of a control trial.4. Probability specifies the probability that this token will be played. Tokenswithout probability will be assigned a probability automatically in the sameway as the target tokens.6. Design of the New Software Package^ 856.2.8 Edit ReinforcersThe reinforcer configuration for a trial protocol is handled from the EditReinforcers option which is reached from the Edit Protocol option by pressing the "F6".Each trial protocol can have up to four different reinforcer configurations. This screen isdiagrammed on page 170 of Appendix F.1. The First Configuration, Second Configuration, Third Configuration andFourth Configuration each designate four fields. Each field contains a "Y"or an "N" which specifies whether or not a particular reinforcer is to beactivated in a particular configuration.2. The Probability fields specify the probability that the associatedconfiguration will be chosen for reinforcement during a trial. By default, allconfigurations receive equal probability. If some configurations are assignedan explicit probability and others are not then probabilities are assignedusing the same method that is used to assign probabilities to background andtarget tokens.6.3 Designing an Experiment SessionA session for an experiment is specified from the bottom up. The trial protocolsand schedules that are needed are specified first. Next the stages are specified usingexisting schedules and trial protocols. Finally, the session itself is specified using existingstages.6. Design of the New Software Package^ 866.4 Running an Experiment SessionWhen the Run Experiment option is selected from the Main Screen, the next stepwill depend on whether or not sequenced mode has been specified for the experimentsession.If sequenced mode has been specified, the first stage in the sequence is started. Thebackground stimulus is played at the specified intervals and the Running Stage screen isdisplayed. The program is controlled primarily by the buttons on the GamePad. [Begin]initiates a trial. [Abort]-[Begin] terminates a stage and starts the next stage automatically.After the last stage, the experiment session terminates and control returns to the mainscreen. During the session, [Abort]-[Vote] selects a retraining trial as the next trial.[Pause] suspends execution of the program. A second press on the [Pause] button restartsthe program. Pressing the escape key on the keyboard while the program is pausedterminates the experiment session and returns control to the Main Screen. The escape keyhas no effect if the program is not paused.If sequenced mode has not been specified, the Select Stage screen is displayed withthe list of stages that have been specified for this experiment session. This screen isdiagrammed on page 162 of Appendix F. When a stage is selected, the stage is run asdescribed above. If the stage completes by the criterion or by [Abort]-[Begin], control isreturned to the select stage screen. If the stage is terminated with the [Pause] button andescape key, control is returned to the Main Screen.6. Design of the New Software Package^ 87While a stage is running the Running Stage screen is displayed. This screen isdiagrammed on page 161 of Appendix F. The name of the stage that is running is displayedat the top of the display. The critical measurement in a stage is the criterion. To meet thecriterion, a subject must have a certain number of correct trials within a specified totalnumber of trials. A subject may be required to meet the criterion more than once tosuccessfully complete a stage. The following parameters, reflecting the state of theprogram, are displayed to help the experimenter in the conduct of the experiment session:1. Completed Trials is the number of trials, for this stage, that have beencompleted.2. Correct So Far is the number of correct responses so far in the current stage.3. Criterion Window is the number of trials during which the subject mustachieve the criterion before the stage is complete.4. Required Correct is the number of correct trials that the subject must achievewithin the window.5. # of Criteria is the number of times that the subject must achieve thecriterion to successfully complete the stage.6. Re-training Trials is the number of retraining trials that have been doneduring this stage.7. Consecutive Misses is the current number of consecutive times the subjecthas failed to respond during a change trial.8. Correct in Window is the number of correct responses so far in the criterionwindow.9.^Still to Go is the number of additional correct responses required to achievethe current criterion.6. Design of the New Software Package^ 8810. Times Met is the number of times the subject has achieved the criterion.11. Remaining Criteria is the number of times remaining that the subject mustachieve the criterion to successfully complete the stage.12.^The trial state of the program is shown by the screen colour, which is userselectable.At the start of each stage, the stage will be checked to see if it includes a schedule.If it does, no further action is required. If it does not, a schedule is automatically computedusing the change trial probability, the maxima for consecutive change and control trials andthe block size.6.5 TimingThe timing part of the program can be divided into two parts. The first part, themain loop, cycles continuously checking for button presses and the need to process a timedevent. The other part is driven by the timer interrupt.The count in the timer chip is changed from 65536 to 1193. With a clock frequencyof 1.19318 Mhz, this will cause an interrupt every .9998 milliseconds. The regular BIOSinterrupt service routine for interrupt 08H is replaced with one that correctly maintains thetime of day under these circumstances. The interrupt 1cH service routine, which isnormally just an IRET instruction, is replaced with a routine which checks the game port.Button state changes from up to down are recorded by this routine.6. Design of the New Software Package^ 89An event table is maintained by the program to determine exactly when certainevents must happen. Each event table entry contains the time at which the event is tooccur and the type of the event. The events in the table are ordered chronologically andthey are removed from the table when they have been processed. The main loop of theprogram checks the event table during every iteration.The main loop of the system performs the following tasks.1.^Check for a button press.a. [Begin]If the abort flag is set, the stage is terminated and the abort flag is cleared. Ifthe abort flag is cleared and if the program is between trials, thetrial-in-progress flag is set and a trial is initiated. The type of trial is selectedbased on the schedule for the stage and the retraining flag. If a trial is inprogress, the press is ignored.b. [Vote]If the abort flag is set, the retraining trial flag is set and the abort flag iscleared. If the abort flag is cleared and if a trial is in progress, a head turn isrecorded. The length of time between the start of the trial and the buttonpress is recorded. If a trial is not in progress, the press is ignored.c. [Abort]The abort flag is set.d. [Pause]Execution of the program is suspended until the [Pause] button is pressedagain or until the escape key is pressed. The keyboard is checked only whileexecution is paused. If an escape key is detected while the program is6. Design of the New Software Package^ 90paused, the program returns to the main screen. All other key presses arecleared and ignored.Button presses are cleared when they are detected. With the exception of the[Abort] button, the appropriate action can be initiated as soon as the press isdetected. When an [Abort] press is detected, the abort flag is set and an Abortevent is placed in the event table. If a [Begin] or a [Vote] press is detected beforethe event is processed, the abort flag is cleared and the appropriate action for themultiple button press is taken. If the abort flag is still set when the event isprocessed then the trial is aborted. A long press on a button is recorded as only onepress because the routine that records the button presses, int lcH, only respondswhen there is a state change from up to down.2.^Check the event table to see if an event must be processed:a. Token play event. A stimulus is selected and played. Selection is based onthe trial protocol and the list of tokens specified for the current protocol.The probabilities are used in making a random selection from the list. Thetime at which the next token is due to be played is calculated and entered inthe event table based on the length of the token and the inter-stimulusinterval.b. Reinforcers on event. The reinforcers are activated according to theconfigurations and probabilities specified for this trial protocol. Thishappens if the reinforcers are to be activated unconditionally and there is adelay specified. When the trial is initiated, the delay is added to the currenttime and an entry is made in the event table.6. Design of the New Software Package^ 91c. Reinforcers off event. The reinforcers will be turned off. This will happenunless the vote button extension has been specified. When the reinforcersare turned on the reinforcement time will be added to the current time andan entry made in the event table.d. Trial completion event. The trial results are written to the response file andthe trial-in-progress flag is cleared. When a trial is initiated with the [Begin]button, the completion time of the trial is calculated by adding theobservation interval to the current time. This time will be entered in theevent table. On trial completion, if the criterion has been met and theminimum number of trials have been completed, the stage is terminated. Ifsequenced mode is enabled, the next stage is initiated. If not, the systemreturns to the stage selection screen.e.^Abort event. If a trial is in progress, it is terminated and the results areignored. If not, the abort event is ignored.Because the main loop involves only two tests, unless there is a button press or atimed event to process, the loop time will be significantly less than one msec. Thus theprogram should be capable, under most circumstances, of responding to a button press inless than two msec.6.6 Token ProcessingThe digitized sound files (tokens), comprise the largest volume of data to behandled. At the start of an experiment session, tokens are read into memory until all of thetokens for the experiment session have been read or the available memory has been filled.6. Design of the New Software Package^ 92256 kilobytes of memory is reserved for storage of tokens. This is enough space for all ofthe tokens used in most current experiment sessions. If all of the tokens will not fit intomemory, the tokens for each stage are read at the start of the stage. The maximum size foran individual token that can be handled is 64 kilobytes. The last four memory pages in theconventional memory area are used to store the tokens. This is the memory space from060000H to 09ffffH. The PC must have 640 kilobytes of conventional memory installed.There must be a minimum of 384 kilobytes of free memory to run the Headturn system.A token descriptor table is constructed at the start of the experiment session andupdated if necessary at the start of each stage. The table contains:1. The file name of the token2. The segment address of the memory page in which the token is stored.3. The offset within the memory page where the token starts.4. The length of the token in bytes5.^The elapsed time to play the token. This is based on the length in bytes and thesampling frequency.For speed of handling during an experiment session, each token is referenced internally bythe software by its index in the table.When a token is played, the memory page and offset of the token in memory andthe length of the token are sent to the DMA controller. The length of the token and thesampling rate are sent to the Data Translation board. The DT board's continuous writewith DMA command is used to play the token. This frees the CPU from the task of movingthe large volumes of digitized sound data from memory to the Data Translation board. Ifnecessary, the DT board can be stopped, while executing a continuous write with DMA6. Design of the New Software Package^ 93command, by using the "STOP" command. Aborting a trial is one example of when thismust be done.6.7 The ImplementationA prototype system, which includes all of the functionality specified in the design,has been implemented. Most of the prototype was written in C. Assembler was used forthe timer interrupt service routine. As discussed in Chapter 2, the combination of a highlevel language with assembler for the timing critical functions is reasonable. This prototypeis being tested in the Infant Research Laboratory at UBC. To date, the design seemsrobust enough so that minimal effort should be required to turn the prototype into a systemsuitable for production use in ongoing experiments.Bibliography[Ather85]^P. R. Atherton and L. R. Caporael. A Subjective Judgement Study ofPolygon Based Curved Surface Imagery. CHI '85 Proceedings, pages 27-34,April 1985.[Beat91]^J. C. Beatty, W. B. Cowan and M. W. Schwarz. An ExperimentalComparison of RGB, YIQ, LAB, HSV and Opponent Color Models. ACMTransactions on Graphics, Volume 6, Number 2, pages 123-158, 1991.[Ber92a]^Beringer, J. Notes on Graves and Bradley's Timing Algorithm BehaviorResearch Methods, Instruments, & Computers, Vol. 24, No. 3, 453-455, 1992.[Ber92b]^Beringer, J. Timing Accuracy of Mouse Response Registration on the IBMMicrocomputer Family. Behavior Research Methods, Instruments, &Computers, Vol. 24, No. 3, 486-490, 1992.[Bovn90]^Bovens, N. and Brysbaert, M. IBM PC/XT/AT and PS/2 Turbo PascalTiming with Extended Resolution. Behavior Research Methods, Instruments, &Computers, Vol. 22, No. 3, 332-334, 1990.[Buhr87]^Buhrer, M, Sparrer, B. and Weitkunat, R. Interval Timing Routines for theIBM PC/XT/AT Microcomputer Family. Behavior Research Methods,Instruments, & Computers, Vol. 19, No. 3, 327-334, 1987.[Creeg90]^Creeger, C. P., Miller, K. F. and Paredes, D. R. Micromanaging Time:Measuring and Controlling Timing Errors in Computer-ControlledExperiments. Behavior Research Methods, Instruments, & Computers, Vol. 22,No. 1, 34-79, 1990.[Cros89]^Crosbie, J. A Simple Turbo Pascal 4.0 Program for Millisecond Timing onthe IBM PC/XT/AT. Behavior Research Methods, Instruments, & Computers,Vol. 21, No. 3, 408-413, 1989.94Bibliography^ 95[Cros90]^Crosbie, J. The Microsoft Mouse as a Multipurpose Response Device for theIBM PC/XT/AT. Behavior Research Methods, Instruments, & Computers, Vol.22, No. 3, 305-316, 1990.[Dalry92]^Dalrymple-Alford, E. C. Response Key Input Via the IBM PC/XT/AT'sParallel Printer Ports. Behavior Research Methods, Instruments, & Computers,Vol. 24, No. 1, 78-79, 1992.[Dix47]^Dix, M. R. and Hallpike, C. S. The Peepshow: New Technique for PureTone Audiometry in Young Children. British Medical Journal, 719, 1947.[Dlhop88] Dlhopolsky, J. G. C Language Functions for Millisecond Timing on the IBMPC. Behavior Research Methods, Instruments, & Computers, Vol. 20, No. 6,560-565, 1988.[Dlhop89]^Dlhopolsky, J. G. Synchronizing Stimulus Displays with Millisecond TimerSoftware for the IBM PC. Behavior Research Methods, Instruments, &Computers, Vol. 21, No. 4, 441-446, 1989.[Dorf87]^Dorfman, D. Software Timing of Events in Cognitive PsychologyExperiments. Behavior Research Methods, Instruments, & Computers, Vol. 19,No. 2, 185-190, 1987.[Dunc88]^Article 6: Interrupt Driven Communications. In R. Duncan, editor The MS-DOS Encyclopedia, pages 167-246, 1988.[Edge89]^Edgell, S. E. and Hertel, S. A. Running Laboratory Experiments Using theRSX Operating System and FORTRAN on the PDP-11. Behavior ResearchMethods, Instruments, & Computers, Vol. 21, No. 2, 303-306, 1989.[Eiler77]^Eilers, R. E., Wilson, W. R. and Moore, J. M. Developmental Changes inSpeech Discrimination in Infants. Journal of Speech and Hearing Research.,Vol. 20, pp 766-780, 1977.[Emer88a] Emerson, P. L. Using Serial Interfaces and the C Language for Real-TimeExperiments. Behavior Research Methods, Instruments, & Computers, Vol. 20,No. 3, 330-336, 1988.[Emer88b] Emerson, P. L. TIMEX: A Simple IBM AT C Language Timer withExtended Resolution Behavior Research Methods, Instruments, & Computers,Vol. 20, No. 6, 566-572, 1988.[Ferr88]^Ferraro, R. F. Programmer's Guide to the EGA and VGA Cards, Addison-Wesley Publishing Co. 1988[Gleit8l]^Gleitman, H. Psychology, W. W. Norton & Company Inc., New York 1981.Bibliography^ 96[Grav87][Gran89][Grav88][Grav91]Graves, R and Bradley, R. Millisecond Interval Timer and AuditoryReaction Time Programs for the IBM PC. Behavior Research Methods,Instruments, & Computers, Vol. 19, No. 1, 30-35, 1987.Granaas, M. M. TIMEX2: A Modified C-Language Timer for PC AT ClassMachines. Behavior Research Methods, Instruments, & Computers, Vol. 21, No.6, 619-622, 1989.Graves, R. and Bradley, R. More on Millisecond Timing and TachistoscopeApplications for the IBM PC. Behavior Research Methods, Instruments, &Computers, Vol. 20, No. 4, 408-412, 1988.Graves, R. E. and Bradley, R. Millisecond Timing on the IBM PC/XT/ATand PS/2: A Review of the Options and Corrections for the Graves andBradley Algorithm. Behavior Research Methods, Instruments, & Computers,Vol. 23, No. 3, 377-379, 1991.Jamieson, D. G., Ramji, K. V., Kheirallah, I. and Nearey, T. M. CanadianSpeech Research Environment 1992.Kuhl, P. K. Speech Perception in Early Infancy . Perceptual Constancy forSpectrally Dissimilar Vowel Categories. Journal of the Acoustical Society ofAmerica. Vol. 66, pp 1668-1679, 1979.Moore, J. M., Thompson, G. and Thompson, M. Auditory Localization ofInfants as a Function of Reinforcment Conditions. Journal of Speech andHearing Disorders. 40, pages 29-34, 1975.Moore, J. M., Wilson, W. R. and Thompson, G. Visual Reinforcement ofHead-turn Responses in Infants Under 12 Months of Age. Journal of Speechand Hearing Disorders. 42, pages 328-334.Posner, M. I. and Fitts, P. M. Human Performance Brooks Cole PublishingCo., 1967.Schneider, W. Micro Experimental Laboratory: An Integrated System forIBM PC Compatibles. (1988). Behavior Research Methods, Instruments, &Computers, Vol. 20, No. 2, 206-217, 1988.Schneider, W. Equipment is Cheap, But the Field Must Develop andSupport Common Software for Psychological Research. Behavior ResearchMethods, Instruments, & Computers, Vol. 23, No. 2, 114-116, 1991.Segalowitz, S. J. IBM PC Tachistoscope: Text Stimuli. Behavior ResearchMethods, Instruments, & Computers, Vol. 19, No. 4, 383-388, 1987.[Jam92][Kuh179][Moore75][Moore77][Posn67][Schnd88][Schnd91][Sega187][Sega190]^Segalowitz, S. J. and Graves, R. E. Suitability of the IBM XT, AT, and PS/2Keyboard, Mouse, and Game Port as Response Devices in Reaction TimeBibliography^ 97Paradigms Behavior Research Methods, Instruments, & Computers, Vol. 22, No.3, 283-289, 1990.[Shear88]^The Shearer Group. Operator's Manual, Dallas Texas, 1988.[Shoup79] Shoup, R. G. Colour Table Animation. Computer Graphics Vol. 13, No. 2,(Siggraph '79 Conference) pp. 8-13, August 1979.[Werk81]^Werker, J. F., Gilbert, J. H. V. Humphrey, K. and Tees, R. C.Developmental Aspects of Cross-Language Speech Perception. ChildDevelopment. 52. pp. 349-353, 1981[Werk82]^Werker, J. F. Development of Cross-Language Speech Perception: theInfluence of Age, Experience, and Context on Perceptual Organization.Unpublished Ph.D. Thesis. 1982[Werk83]^Werker, J. F. and Tees, R. C. Developmental Changes Across Childhood inthe Perception of Non-native Speech Sounds. Canadian Journal ofPsychology. 37(2). pp. 278-286, 1983[Werk88]^Werker, J. F. and Lalonde, C. E. Cross-Language Speech Perception: InitialCapabilities and Developmental Change. Developmental Psychology. Vol 24No 5. pp. 672-683, 1988[Werk91]^Polka, L. and Werker, J. F. Developmental Changes in Perception of Non-native Vowel Contrasts. Journal of Experimental Psychology: HumanPerception and Performance. (in press).[Wi1s76]^Wilson, W. R., Moore, J. M. and Thompson, G. Sound-Field AuditoryThresholds of Infants Utilizing Visual Reinforcement Audiometry (VRA).Paper presented at the Annual Convention of the American Speech and HearingAssociation. Houston, 1976.[Yaphe89] Yaphe, M., Raftery, E. and Jamieson, D. G. A General-Purpose Facility forAdaptive Testing in Psychoacoustics. Behavior Research Methods, Instruments,& Computers, Vol. 21, No. 2, 275-289, 1989.Appendix AHeadturn SpecificationThis specification was supplied by Mr. Goldhardt as part of the Headturn package.A request for permission to reprint this specification was sent to the address that isincluded in the specification. The request was returned as undeliverable by the post office.What follows is a re-formatting of the original documentation. The figures have beenre-drawn.98Appendix A Headturn Specification^ 99Software Specifications for"HEADTURN"(A Program for Visually-Reinforced Head-Turn Experiments)Revision 2Copyright (c) 1987-1990 Nirvonics, Inc.P.O. Box 5062Plainfield, NJ 07061Appendix. A Headturn Specification^ 100IntroductionHEADTURN is a program for the IBM-PC family of computers which is designed to assistan experimenter by controlling a visually-reinforced head-turn procedure.The setup consists of a subject infant (S) in a room in view of the experimenter (E) who isin a darkened booth; thus, E can see S, but S cannot see E. To the right of S is a speakerand an array of four reinforcers (mechanical toys which can be activated individually or incombination). In the booth with E is a computer console (terminal) and a button box (seeFigure 1).Each experiment consists of a number of stages (2 training stages, a conditioning stage, and1-4 testing stages). The basic procedure for each stage is as follows. E uses the console toestablish a set of operational parameters, some of which are implicit in the selection of thestage, and others which are specified explicitly by E (at this time or previously, by creating aparameter file). When E presses the [Begin] button, the experiment (stage) beginsDuring the entire duration of a stage of the experiment, some stimulus (e.g. speech sound/a/) is repeatedly played over the speaker at a constant inter-stimulus interval. (Thelength of the interval is one of the parameters.) While the interval remains constant, theactual stimulus may change. The initial stimulus is called the background stimulus.When E determines that S is in an attentive state, s/he presses the [Begin] button to begina trial; the trial actually begins at the next stimulus onset time. A trial is a specified periodof time (the observation interval) during which E looks for S to make a head-turn (towardsthe speaker). In most trials, the background stimulus is replaced by a target stimulus for aspecified number of repetitions (usually 3). Also, one or more of the reinforcers may beactivated, either unconditionally or contingent upon a head-turn. The 4 types of trials arelisted below.Trial Type^ Stimulus^Reinforcer Activationcontrol trial background nonetraining trial target immediate (unconditional)re-training trial^target^at head-turn, or after onset delaychange trial target at head-turnNote that in a re-training trial, the reinforcers are activated automatically after a specifieddelay; but if a head-turn occurs first, the reinforcers are activated at the head-turn.After each trial, the reinforcers are de-activated and the background stimulus resumes.Trials continue until specified criteria are met (e.g. minimum # of trials, hit ratio), or untilE manually terminates the process by holding down the [Abort] button and pressing the[Begin] button.The Button BoxOnce the parameters have been set, all control of the program is through the Button Box. Estarts the experiment running and begins each. trial by pressing the [Begin] button. E usesthe [Vote] button to indicate a head-turn.Appendix A Headturn Specification^ 101The READY light is on whenever the program is ready to begin a trial (i.e. it's not in themiddle of a previous trial). As soon as [Begin] is used to begin a trial, the READY lightgoes off. If the [Abort] button is pressed any time while the READY light is off, the trial isdiscontinued (at the first inter-stimulus interval) and discarded.The [Abort] button can also be used while the READY light is on, as a sort of special-function shift key. If [Abort] is held down while [Vote] is pressed, the next trial will be a re-training trial. If [Abort] is held down while [Begin] is pressed, the experiment (stage) isterminated (this is the only way to terminate Training Stage 1).In training trials (Training Stage 1), the [Vote] button has a special use. (Its normal use isnot applicable to training trials, since reinforcement does not depend on head-turn.) Whenthe reinforcer is activated at the onset of the first target stimulus, it normally remains activefor a previously-specified length of time. However, if the [Vote] button is pressed duringthis time, the reinforcer will be de-activated when the [Vote] button is released, whetherthis is before or after the normally scheduled time; if this extends the time beyond whatwould have been the beginning of the next background stimulus, additional target stimuliare inserted, as necessary.The StagesThe initial stage of an experiment is Training Stage 1. This stage consists only of trainingtrials (which use one background stimulus and one target stimulus). This stage isterminated by E pressing [Abort]-[Begin]. This is the only stage which does not allow re-training trials with [Abort]-[Vote].The next stage is Training Stage 2. This stage consists entirely of re-training trials. Asmentioned above, the only difference between training trials and re-training trials is that inre-training trials, the reinforcer is not activated until a specified onset delay, unless Eindicates (with the [Vote] button) that a head-turn was made. Typically, the backgroundand target stimuli will be the same as in Training Stage 1.Note that in Training Stage 2, both the normal trials and [Abort]-[Vote] trials are re-training trials. This allows E to specify two different onset delays as parameters. Typically,the onset delay for [Abort]-[Vote] trials in this stage will be zero.The third stage is the Conditioning Stage. In this stage, change and control trials arerandomly interspersed. The single background and target stimuli used will typically be thesame as in Training Stage 1. The probability of each type of trial and the maximum numberof consecutive trials of each type are specified as parameters.The remaining stages are Testing Stages 1-4. These are identical to the Conditioning Stage,except that instead of single background and target stimuli, E specifies sets of stimuli to bechosen from random. E must also specify the (single) background and target stimuli to usefor re-training trials; these are typically the same as the stimuli for Training Stage 1.The procedure the program uses for selecting from the stimulus sets is as follows. As eachbackground or target stimulus is ready to begin, the program randomly chooses a stimulusfrom the corresponding (background or target) stimulus set. The probability that eachAppendix A Headtum Specification^ 102stimulus will be chosen at any given time may be specified in the operational parametersgiven by E.E has total control over the order of stages. Normally, E will use the order described above,but may skip ahead or go back to a previous stage at any time.The order of stages can also be programmed in advance. This is described in the AutomaticSequencing section.Operational ParametersThe operational parameters which E specifies at the beginning of each session are dividedinto several Groups: general parameters, which apply to the entire experiment, and a groupfor each stage of the experiment.The general parameters are listed below:Parameter file to use for defaults:Parameter file to save new values in:ID #:Subject's name:Subject's birthdate:Response file:Stimulus set file:Inter-stimulus interval (msec):Number of stimulus repetitions per trial:Number of Testing Stages in this experiment:Run stages in sequence from parameter file instead of menu:The <Parameter file to use for defaults > expects the name of an existing file which willsupply default values for the remaining parameters; if this is left blank, no defaults will beprovided.For the rest of the parameters, including stage-specificAppendix A Headturn Specification^ 103parameters not yet mentioned, if a blank response is given, the default values (if any) willbe used. If any response (including the first one) ends with a dollar-sign ("$"), the remainingparameters will automatically take their default values.The <Parameter file to save new values in>, if non-blank, is the name of a file which willreceive all the values you specify for subsequent parameters, plus unused defaults from the< Parameter file to use for defaults >, if any. This file can be used later as a <Parameterfile to use for defaults > . The default for this parameter is always blank.<ID # > , <Subject's name> , and <Subject's birthdate> are used for identification only,and are simply copied to the <Response file > .The <Response file > receives a log of the experimental results and parameters for thesession. Its format is described in another section. The <Stimulus set file > provides themapping between stimulus numbers (used to select stimuli in subsequent responses) andactual stimulus files. Each line contains a speech file name. The first line is stimulusnumber 1, the second is stimulus number 2, and so on.The <Inter-stimulus interval > is the duration, in milliseconds, of the silence between theend of one stimulus and the beginning of the next.The <Run stages in sequence from parameter file instead of menu> parameter shouldnormally be left as No, unless you want automatic sequencing (see Automatic Sequencing,below).The remaining general parameter prompts are self-explanatory.After the general parameters (and subsequently, after each stage has been terminated), Euses a menu to select the stage to run. E is then prompted for parameters appropriate tothat stage (which may have defaults in a parameter file). Again, E can use a "$" to selectdefaults for all the parameters.The following parameters are common to all stages:Experimenter:Assistant:Reinforcer configurationDuration of reinforcement (msec):Observation interval (msec):<Experimenter > and <Assistant > are used for identification only, and are simply copiedto the <Response file > . Note that these parameters have no defaults, and must always beentered.The <Reinforcer configuration> indicates which of the 4 reinforcers will be activated(when appropriate). A reinforcer configuration is a list of one or more reinforcer numbers(1-4), separated by commas (","); for example, "2,3" means reinforcers 2 and 3 will beactivated simultaneously. The response to this prompt may actually be severalconfigurations (up to 4) separated by semi-colons (";"); this means that the variousconfigurations are to be chosen from randomly (with equal probability).Appendix A Headturn Specification^ 104The <Duration of reinforcement > is the number of milliseconds that reinforcers remainactivated once triggered (unless overridden in Training Stage 1). Note that the <Durationof reinforcement > takes precedence over the <Number of stimulus repetitions per trial>.If reinforcement ends before the beginning of one or more (target) stimuli which wouldnormally be part of the trial, the trial is terminated prematurely and the next stimulus willbe a back-ground stimulus. If reinforcement extends past the beginning of what wouldnormally be the first background stimulus after the trial, the trial is extended and additionaltarget stimuli are inserted as necessary.The <Observation interval> is the length of time, in milliseconds, from the onset of thefirst stimulus in a trial, during which the [Vote] button is recognized as an indication of aheadturn. Outside of this interval, [Vote]s are ignored.The following parameter is only used in Training Stage 2:Normal trials: Delay in onset of reinforcement (msec):This parameter gives the onset delay (in milliseconds) for normal trials, which in this stageare always re-training trials.The following parameter is used in all stages except Training Stage 1:Re-training trials: Delay in onset of reinforcement (msec):This parameter gives the onset delay (in milliseconds) for re-training trials invoked with[Abort]-[Vote].The following parameters are used in all stages except Testing Stages:Target stimulus #:Background stimulus #:< Target stimulus # > and <Background stimulus # > identify the stimuli to be used in alltrials in the stage. Typically, these will be the same for all stages.Instead of the above parameters, Testing Stages have the followingTarget stimulus/stimuli #s:Background stimulus/stimuli #s:Re-training target stimulus #:Re-training background stimulus #:<Target stimulus/stimuli #s > and <Background stimulus/stimuli #s > identify the sets ofstimuli to choose from for trials in the stage. Each of these may be one or more stimulusnumbers, separated by commas (","). Also, each stimulus number may be followed by acolon (":") and a decimal fraction (e.g. 0.23) indicating the probability of occurrence of thatstimulus. Any stimuli within each set which don't have probabilities specified get theremaining probability (out of 1.0) split equally between them.Appendix A Headturn Specification^ 105<Re training target stimulus # > and <Re-training background stimulus # > identify thestimuli to be used when E invokes re-training trials. Typically, these will be the same as the<Target stimulus # > and <Background stimulus # > for other stages.The following parameters are used in all Stages except Training Stage 1:Minimum number of trials:Criterion: Number of (almost) consecutive correct trials:Number of trials to check for criterion:Number of times criterion must be met:Number of consecutive misses to cause a warning beep:The first four parameters provide the termination criteria for a stage. When these criteriaare met, the program will automatically terminate the stage.Specifically, after each correct trial (hit or correct rejection), the last <Number of trials tocheck for criterion> trials are checked to see if at least <Criterion. Number of (almost)consecutive correct trials > of them are correct. If they are, the criterion-met count isincremented. Once the criterion-met count is at least <Number of times criterion must bemet > and there have been at least <Minimum number of trials > trials, the stage isterminated.The final parameter of this set, <Number of consecutive misses to cause a warning beep>,provides the number of consecutive misses which will generate a warning beep to let Eknow it may be appropriate to select a re-training trial. If this is left blank or zero, nowarnings will be given.The last parameters are used in the Conditioning Stage and in Testing Stages:Probability of change (vs. control) trials:Maximum number of successive change or control trials:The <Probability of change (vs. control) trials > is a decimal fraction between 0.0 and 1.0giving the probability of selecting a change trial instead of a control trial. The <Maximumnumber of successive change or control trials > imposes a constraint on the randomprocess.Summary of Operational ParametersGeneral ParametersParameter file to use for defaults:Parameter file to save new values in:ID #:Subject's name:Subject's birthdate:Response file:Appendix A Headturn Specification^ 106Stimulus set file:Inter-stimulus interval (msec):Number of stimulus repetitions per trial:Number of Testing Stages in this experiment:Run stages in sequence from parameter file instead of menu:Training Stage 1Experimenter:Assistant:Reinforcer configuration:Duration of reinforcement (msec):Observation interval (msec):Target stimulus #:Background stimulus #:Training Stage 2Experimenter:Assistant:Reinforcer configuration:Duration of reinforcement (msec):Observation interval (msec):Normal trials: Delay in onset of reinforcement (msec):Re-training trials: Delay in onset of reinforcement (msec):Target stimulus #:Background stimulus #:Minimum number of trials:Criterion: Number of (almost) consecutive correct trials:Number of trials to check for criterion:Number of times criterion must be met:Number of consecutive misses to cause a warning beep:Conditioning StageExperimenter:Assistant:Reinforcer configuration:Duration of reinforcement (msec):Observation interval (msec):Re-training trials: Delay in onset of reinforcement (msec):Target stimulus #:Appendix A Headturn Specification^ 107Background stimulus #:Minimum number of trials:Criterion: Number of (almost) consecutive correct trials:Number of trials to check for criterion:Number of times criterion must be met:Number of consecutive misses to cause a warning beep:Probability of change (vs. control) trials:Maximum number of successive change or control trials:Testing Stages 1-4Experimenter:Assistant:Reinforcer configuration:Duration of reinforcement (msec):Observation interval (msec):Re-training trials: delay in onset of reinforcement (msec):Target stimulus/stimuli #s:Background stimulus/stimuli #s:Re-training target stimulus #:Re-training background stimulus #:Minimum number of trials:Criterion: Number of (almost) consecutive correct trials:Number of trials to check for criterion:Number of times criterion must be met:Number of consecutive misses to cause a warning beep:Probability of change (vs. control) trials:Maximum number of successive change or control trials:Response File FormatHEADTURN keeps a log of operational parameters used, and trial results, in a responsefile. HEADTURN always appends to the end of response files; it never writes over existinginformation.Information in the file is divided into sections corresponding to each stage of theexperiment. The stages are identified by the following numbers:1 - Training Stage 12 - Training Stage 23 - Conditioning Stage4 - Testing Stage 15 - Testing Stage 26 - Testing Stage 37 - Testing Stage 4Appendix A Headturn Specification^ 108Each of these sections has two parts, one for operational parameters and the other for trialresults. The format is shown below:* * * STAGE <stage_number >{ <parameter >}*** TRIALS{ <trial result >}*** TERMINATED <reason>Curly braces ("{" and "}") indicate zero or more occurrences, and are not part of the file.< stage number > is from the list above. A <parameter > is:<paramname > = <param_value ><paramname > is a parameter name (see the next section), and <param_value > is thevalue for that parameter as it would be typed in response to a prompt.A < trial result > is:< start time > < type > <background list > ; < target list > ; <vote time >_^ _^_^_ti e start time> is the number of milliseconds from the beginning of the stage to the trialonset. —<e> (the type of stimuli in <trial list >) is B for background (control trial) or Tfor target (change trial); for a retraining trial, <type > will be R (and <vote_time > will beundefined).<background_list > and <target_list > are of the form:< stimulus number > {, <stimulus_number >}The <background list > will never contain more than 3 stimuli (the last 3). <vote time >is the number of Milliseconds from the trial onset to the onset of a [Vote]; if no [Voile] wasmade (in the observation window), <vote time> will be -1.The <reason> for termination will be MANUALLY if [Abort]-[Begin] was used, or BYCRITERIA if the termination criteria were met.General parameters are also put into the response file, using the special stage number 0.Note that this section omits the TRIALS and TERMINATION parts:*** STAGE 0{ <parameter > }Actually, any stage may have the TRIALS and TERMINATION parts omitted. This willhappen if E specifies the parameters for the stage but cancels the stage before pressing[Begin].Appendix A Headturn Specification^ 109Parameters and Parameter FilesThese are the parameter names used for operational parameters in response files andparameter files:Parameter NameIDSNAMESBDAYRFILESFILEINTERSREPSTAGESSEQENAMEANAMERCONFRTIMEOTIMEODELAYRDELAYTSTIMBSTIMRTSTIMRBSTIMMINTCRITCRITWNNCRITNMISSCHANGEMXSUCCPromptID #:Subject's name .Subject's birthdate:Response file:Stimulus set file:Inter-stimulus interval (msec):Number of stimulus repetitions per trial:Number of Testing Stages in this experiment:Run stages in sequence from parameter file instead of menu:Experimenter:Assistant:Reinforcer configuration:Duration of reinforcement (msec):Observation interval (msec):Normal trials: Delay in onset of reinforcement (msec):Retraining trials: Delay in onset of reinforcement (msec):Target stimulus #Target stimulus/stimuli #s:Background stimulus #Background stimulus/stimuli #s:Re-training target stimulus #:Re-training background stimulus #:Minimum number of trials:Criterion: Number of (almost) consecutive correct trials:Number of trials to check for criterionNumber of times criterion must be met:Number of consecutive misses to cause a warning beep:Probability of change (vs. control) trials:Maximum number of successive change or control trials:The syntax of a parameter file is like that of a response file, except that all stages, not juststage 0, omit the TRIALS and TERMINATION parts.Each group of parameters specific to a particular stage is preceded by a line of the form:* * * STAGE <stage_number>The general parameters are preceded by:*** STAGE 0Appendix A Headturn Specification^ 110See the Response File Format section for a list of stage numbers.Automatic SequencingNormally, the defaults for all the stages are loaded in at once, and E chooses each stage torun interactively, one at a time, from a stage selection menu. However, if the SEQparameter ( <Run stages in sequence from parameter file instead of menu> ) is set to Yesin a parameter file, the program will automatically sequence stages in the order they arelisted in the parameter file, bypassing the stage selection menu and the parameter screens.All of the parameters for each stage must be specified in the parameter file, includingENAME and ANAME, which are ignored in parameter files for non-sequenced mode. Ifthe program encounters a missing parameter at any time, it will revert to non-sequencedmode and present E with a parameter screen so s/he can fill in the missing parameter(s).Particular stages may be repeated in the sequence simply listing them multiple times.Parameter values for a repeated stage may be omitted from the parameter file; if they are,they will take on the values from the previous instance of the same stage.In both sequenced and non-sequenced modes, E may abort a stage before it begins, bypressing any key on the keyboard. This will also cause the program to revert to non-sequenced mode if it was in sequenced mode and bring up the stage selection menu.Appendix A Headturn Specification^ 111Hardware Specifications for"HEADTURN"(A Program for Visually-Reinforced Head-Turn Experiments)Appendix A Headturn Specification^ 112Rgure L -Me I3, tton Box^RTS pin 32>^^CTS pin 36/ ^DSR pin 37/\^DCD pin 38>^[Abort]I • No[Begin]I NoI No •(41.6 KOREADYThis figure is approximatebased on an estimate of24V between pins.10K0 [Vote]DTR pin 33/\\10K 010K0Appendix A Headturn Specification^ 113Button Box CircUt--7Serial PortDB25Appendix A Headturn Specification^ 114A.6 DIGITAL I/O SUBSYSTEMDIGITAL INPUTSInput TypeLogic FamilyLogic LoadLogic High Input VoltageLogic Low Input VoltageLogic High Input CurrentLogic Low Input CurrentLevel sensitiveLSTTLPresents 1 LSTTL load2.0V minimum0.8V maximum1.0mA @ 5.5v maximum0.07mA @ 2.7V (current at thresholdvoltage)0.250mA maximumDIGITAL OUTPUTSFanoutLogic FamilyLogic High Output VoltageLogic Low Output VoltageLogic High Output CurrentLogic Low Output CurrentDrives 30 LSTTL loadsLSTTL2.4V minimum0.5V maximum24mA maximum6.5mA @ 2.4V (current at thresholdvoltage)24mA maximumCompatible with OPTO-22 solid state relaysConnect reinforcers to DT2801 digital outputsReinforcer 1Reinforcer 2Reinforcer 3Reinforcer 4DIO 0 BIT 0 pin 28DIO 0 BIT 1 pin 29DIO 0 BIT 2 in 30DIO 0 BIT 3 (pin 40Note: Do not connect any signal sources (inputs) to any other bits of DIO 0.115Appendix BHeadturn DiagramsThe diagrams in this appendix provide a graphical representation of the operationsof the current Headturn software....III ^EXPERIMENTREPORT/ VISUALEINFORCER/// AUDIBLESOUNDSAppendix B Headtum Diagrams^ 116HEA - TUR\ S FTWARE SCHEMATIC__,EA T,R\ STATE IA3RA VT - P LEVEESEQ,E\2ED^F RUN THEPROGRAMREADYBEGINTRAINING#1ABORT^ ABORT^ ABORTBEGIN BEGIN BEGINTRAINING  ^CONDITIONING ^#2 OR ORCRITERION^CRITERION TRAISTATE _IAGRA\I\G STAGE -1V00HEAIT_ RTRAI \ ISTATP\] STAIA.-3RA VRDELAY+RTIMEORVOTE+RTIMEORABORT ^DELAY+RTIMEORVOTE+RTIMEORABORTABORTBEGIN^...-ORCRITERIONTARGET STIMULUS- 0 - 0 -0 0 00 0 0 0 00 00_0_00_0_00 0 0 0 0C"c",0;0;TARGET STIMULUS TOKENBACKGROUND STIMULUS TOKENVHEA__,T,R\ STATETRAI\I\] TRIALREADY LIGHTON^OFF^ ONBACKGROUND STIMULUS^ BACKGROUND STIMULUSBEGINREINFORCERS ON R TIMEINTER-STIMULUS INTERVALO_IA:3RA V] STAGER\ STAT,--/THEA,_,,VOTE + RTIMEOR ABORT ORBACKGROUND STIMULUS TIMEBEGINVOTE+RTIMEABORTBEGINBACKGROUNDSTIMULUSBACKGROUNDSTIMULUSORABORTCHANGETRIAL2 2ORTARGET STIMULUS TIMEHEAITBEGINTARGET STIMULUSo0 0 c'c0 0 Coo o c0 0 Coo c)-- c.0 Co REINFORCERSONRTIMEVOTESTATE\G CHA\_I A:-JRAv:]- 1- TRIALREADY LIGHTON^ OFF^ ONBACKGROUND STIMULUS^ BACKGROUND STIMULUSTARGET STIMULUS TOKENBACKGROUND STIMULUS TOKENINTER-STIMULUS INTERVALEA_L,R\ STATE _IA]RA VALL TESTI\] STASESVOTE + RTIMEOR ABORT ORBACKGROUND STIMULUS TIMEHEA_J_R\TESTI\GSTATF IA]RASHA\]E TRIALVTARGET STIMULUS TOKENBACKGROUND STIMULUS TOKENREADY LIGHTON^ OFF^ ONBACKGROUND STIMULUS^ BACKGROUND STIMULUSTARGET STIMULUSo cOTC^ V Vvv '7REINFORCERSONR TIMEVOTED o co o s ^ v Vvv7 V V g°Co BEGININTER-STIMULUS INTERVALV V V7 V VHEAIT_R\ STATE _,IA:3RA VTR L TRIALREADY LIGHTON OFF^ ONBACKGROUND STIMULUS^ BACKGROUND STIMULUSBEGIN BACKGROUNDSTIMULUSVOTEFALSE ALARMINTER—STIMULUS INTERVALBACKGROUND STIMULUS TOKENcnBACKGROUND STIMULUS TOKEN^TARGET STIMULUS TOKENTARGET STIMULUS0 C0 Co'8'c0 Co o- co o sooco o sEA_T_R\ STATERE-TRAI\IIADRA\:-] TRIALVONREADY LIGHTON^OFFBACKGROUND STIMULUS^ BACKGROUND STIMULUSBEGINVOTEOR^REINFORCERSRDELAY^ONOR^DELAYR TIMEgo1r--INTER—STIMULUS INTERVALAppendix CSupplementary Installation InstructionsThe purpose of these supplementary instructions is not to replace the installationinstructions that come with the original Headturn package but to supplement them. Thereare two ways in which this is done. First, a simplified overall picture of the system ispresented. Second, specific answers are provided to most of the questions asked by theHeadturn installation instructions. The goal is to allow a user, new to Headturn, to get thesystem installed and working easily in a standard mode. Later, changes can be made if thesystem is not exactly the way the user wants it to be.127Appendix C Supplementary Installation Instructions^ 128The following typographic conventions are used in this appendix1. Courier bold typeface indicates items that must be typed by the user.for examplecopy AUTOEXEC.BAT AUTOEXEC.SAV2. All capitals indicates a file or directory namefor exampleC: \ ETC \ INFO.The MSDOS operating system is not case sensitive. File and directory names can beentered in either upper or lower case.All capitals may also be used for abbreviations.for exampleMSDOS3. Italic script indicates an item that will be displayed on the screen by one of theinstallation programs.for exampleIs this installation for a hard drive?The Headturn package requires the following hardware and software environment.1. An IBM PC compatible computer. The package will run on a PC or XT (8088) classmachine but there will be significant waits between stages for disk access. An AT(80286) class or better machine is recommended.2. MSDOS or PCDOS 3.0 or later. Check for this by typing ver at the DOS prompt.3. A hard disk with a minimum of 2.5 megabytes of free space. The complete headturnpackage requires 1.8 megabytes. The remaining disk space is required for sound filesand for the output files from the package. Check this by typing chkdsk at the DOSprompt. If you get a Bad command or file name message, try moving to the directory inwhich the CHKDSK.COM file is stored or inserting the diskette with theCHKDSK.COM file.4. At least 256K of main processor memory. This can be checked by entering chkdsk.5. A Data Translation DT2801A analog/digital I/O board. The board can be installed inthe expansion bus of the PC by anyone familiar with PC hardware.Appendix C Supplementary Installation Instructions^ 1296. A serial port. This can be checked by looking at the back of the computer. A serialport will have either nine or twenty-five pins sticking out. All other nine or twenty-fivepin connectors on the back of the computer will have holes rather than pins. Thebutton box is connected to the serial port.There are five software modules to be installed:1. Headturn - main headturn program2. SWFT - digitizing program3. SSP - Standard Support Programs4. DT 2801A- Interface to the A/D board5. PC Video - Graphics interface filesThe installation of each of these modules is done separately from the installation of theother four.Appendix C Supplemental) , Installation Instructions^ 130Initial Preparation1. Enter the commandcd \to move to the root directory.2. Enter the commandcopy AUTOEXEC.BAT AUTOEXEC.SAVto save your AUTOEXEC.BAT file. The installation program automatically modifiesthe file AUTOEXEC.BAT which is not always desirable.3. Enter the commandmd \HEADTURNto create a directory.4. Enter the commandcd \HEADTURNto move to the directory.5. Enter the commandsmd HEADERSmd SSPmd VIDEOmd PROGmd DATAto create a group of directories for the headturn programs and data. These particularnames aren't mandatory, but they do provide a convenient convention. Other namescan be used but they must be consistently referenced.Appendix C Supplementary Installation Instructions^ 131Headturn Installation1. Put the headturn disk in drive A and enterA:2. Enter the commandinstall.3. If you follow these supplementary instructions carefully, you can disregard all of theinstructions on the screen. Simply keep pressing the Enter key until the first questionappears.4. Is this installation for a hard drive? Y5. Where do you want the utility programs? C: \HEADTURN\PROG6. Would you like the termset data files in the same directory? Y7. Would you like to run termset to set up a terminal configuration? NThis question will not be asked if the installation procedure finds a NIRVOSYS.PSFfile on your hard disk. For a new installation this question will always be asked. Thereason for saying "no" at this time is that unless you are actually in the directory thatcontains the termset command, the installation procedure will be unable to find it andso the terminal set up will fail.8. Where would you like to put the headturn programs? C: \HEADTURN\PROG9. Do you want the files for HTANAL1 in the same place? Y10. Where do you want the info file? c : \ETCIt appears that the info file must be kept in this directory.Appendix C Supplementary Installation Instructions^ 132SWFT Installation1. Put the SWFT disk in drive A and enterA:2. Enter the commandinstall.3. If you follow these supplementary instructions carefully, you can disregard all of theinstructions on the screen. Simply keep pressing the Enter key until the first questionappears.4. Is this installation for a hard drive? Y5. Where do you want the swft programs? C: \HEADTURN\ PROG6. Where are the character font data files located? C: \HEADTURN\ PROG7. Where do you want the info file? C: \ETCAppendix C Supplementary Installation Instructions^ 133DT 2801 Installation1. Put the PC DT 2801A disk in drive A and enterA:2. Enter the commandinstall.3. If you follow these supplementary instructions carefully, you can disregard all of theinstructions on the screen. Simply keep pressing the Enter key until the first questionappears.4. Is this installation for a hard drive? Y5. Where would you like to put the DT2801 speech interface? C: \HEADTURN\PROG6. Does your board have the standard jumper settings? YThe DT2801A board comes from the factory jumpered to use I/O address 02ECH andDMA channel 1. Headturn uses these settings by default. If some other device in yourcomputer conflicts with these settings, you must select different settings using the DataTranslation documentation and the Headturn installation instructions.7. Where do you want the info file? C: \ETCAppendix C Supplementary Installation Instructions^ 134PC Video Installation1. Put the PC Video disk in drive A and enterA:2. Enter the commandinstall.3. If you follow these supplementary instructions carefully, you can disregard all of theinstructions on the screen. Simply keep pressing the Enter key until the first questionappears.4. Is this installation for a hard drive? Y5. Where do you want the PC VIDEO graphics interface? C: \HEADTURN\VIDEO6. Select the video device that matches your system.7. Where do you want the info file? C: \ETCAppendix C Supplemental)? Installation Instructions^ 135SSP Installation1. Put the SSP disk #1 in drive A and enterA:2. Enter the commandinstall.3. If you follow these supplementary instructions carefully, you can disregard all of theinstructions on the screen. Simply keep pressing the Enter key until the first questionappears. Put disks #2 and #3 in drive A when they are requested.4. Is this installation for a hard drive? Y5. Where do you want to put the SSP programs? C: \HEADTURN\SSP6. Where do you want to put include files? C: \HEADTURN\HEADERS7. Where do you want to put character font data files? C: \HEADTURN\ PROG8. Do you want to install sample graphics programs? Y9. Do you want them put in the same place as the SSP programs? Y10. Where do you want the info file? C: \ETCAppendix C Supplementary Installation Instructions^ 136Terminal SetupThis procedure is done after the rest of the installation is done.1. Enter the commandCd \HEADTURN\ PROGto go to the directory2. Enter the commandtermset.3. Which (disk) directory should nirvosys.psf be in? C: \HEADTURN \ PROG4. Do you want to: 1 (1 is the menu choice to select a terminal configuration.)5. EnterIBM-PC6. Do you want to make any changes to this configuration? N7. Do you wish to test this configuration? N8. What name do you want to give to this new terminal configuration? IBM-PC9. Do you want to: 4 (4 is the menu choice to exit.)Appendix C Supplementary Installation Instructions^ 137Data Setup and Program Start1. Enter the commandcd \to move to the root directory.2. Enter the commandcopy AUTOEXEC.SAV AUTOEXEC.BATto restore your AUTOEXEC.BAT file.3. Enter the commandCd \HEADTURN\DATAto move to the directory.4. Create a batch file called HEADSTRT.BAT with the following contents:set savepath=%path%set info_file = C:\ETC\INFOpath C:\HEADTURN\GRAPHICS ;C:\HEADTURN\SSP;C:\HEADTURN\PROG;C:\HEADTURNheadturnset info_file =path %savepath%5. Copy the stimulus files to this directory.6. Create the stimulus text file in this directory.7. Create the parameter file in this directory.8. Enter the commandheadstrtfrom the C:\HEADTURN\DATA directory to start the Headturn system.Appendix DSwitch Test ResultsThis appendix contains the results of the switch testing. The following are included:1. Profiles of typical switch presses.2. Statistics for all of the switch types.3.^A single example of the trial-by-trial results.The following terms are used in the tables of statistics:1. Number of Cycles is the number, less one, of state changes measured for theswitch when pressed or released.2. Elapsed Time is the time measured for the switch to change from one steadystate to the other when pressed or released.3. Press Time is the length of time the switch remained in a steady state. Thismeasure was taken in situations where the switch was being pressed orreleased as quickly as possible. and was intended to explore the shortestpossible time the switch would remain in a steady state during a switch press.4. Down — Up refers to the transition period between a steady down and asteady up state.138Appendix D Switch Test Results^ 1395. Up - Down refers to the transition period between a steady up and a steadydown state.6. Rapid refers to a switch press in which the switch is presses and released asrapidly as possible with the minimum delay between presses.7. Quick refers to a switch press in which the switch is presses and released asrapidly as possible with time allowed between presses for the switch to settle.8. Slow refers to a switch press in which both the press and release are doneslowly to allow the switch to settle in both the up and the down states.9. Rapid Down is a measurement of the time the switch was in the down stateduring a rapid switch press.10. Rapid Up is a measurement of the time the switch was in the up state duringa rapid switch press.11. Quick Down is a measurement of the time the switch was in the down stateduring a quick switch press.12. Mean- 12 is the arithmetic mean for the measurements done using the 286-12 machine13. Mean-33 is the arithmetic mean for the measurements done using the 486-33 machine.14. Mean-all is the arithmetic mean for the measurements done using bothmachines.15. sd-12 is the standard deviation for the measurements done using the 286-12machine.16. sd-33 is the standard deviation for the measurements done using the 486-33machineAppendix D Switch Test Results^ 14017.^sd-all is the standard deviation for the measurements done using bothmachines.15. max- 12 is the maximum value for the measurements done using the 286-12machine16. max-33 is the maximum value for the measurements done using the 486-33machine17. max-all is the maximum value for the measurements done using bothmachines.18. min- 12 is the minimum value for the measurements done using the 286-12machine19. min-33 is the minimum value for the measurements done using the 486-33machine.20. min-all is the minimum value for the measurements done using bothmachinesFor the table of trial-by-trial results, each individual switch press occupies a row inthe table. The following terms are used in this table:1. Up is the time the switch was measured in the up state.2. Down is the time the switch was measured in the down state.Appendix D Switch Test Results^ 141Up^Switch on GamepadDownUp Switch on Top of JoystickDownTrigger Switch on JoystickUpDownUp^ Switch on Joystick PadDownProfile of Typical Switch PressesAppendix D Switch Test Results^ 142Switches on Game Pad - Number of CyclesDown - Up StatisticsRapid Quick Slow Allmean-12 0 0 1 1mean-33 2 1 2 1mean-all 1 1 1 1sd-12 1 1 2 1sd-33 1 1 2 2sd-all 1 1 2 2max-12 2 2 8 8max-33 7 4 9 9max-all 7 4 9 9Switches on Game Pad - Elapsed TimeDown - Up StatisticsRapid Quick Slow Allmean-12 6 3 27 12mean-33 12 5 17 11mean-all 9 4 22 12sd-12 10 8 55 34sd-33 13 8 24 17sd-all 12 8 43 27max-12 32 35 309 309max-33 69 36 91 91max-alt 69 36 309 309Press Time StatisticsRapidDownRapidUpQuickDownmean-12 64739 63355 65080mean-33 53013 57337 54666mean-all 58876 60346 59873sd-12 29699 13334 13488sd-33 17726 7431 12375sd-all 25221 11205 13951min-12 30058 42262 40735min-33 35251 43985 32695min-all 30058 42262 32695Appendix D Switch Test Results^ 143Switches on Top of Joystick - Number of CyclesDown - Up StatisticsRapid^Quick SlowUp - Down StatisticsAll^Rapid^Quick Slow Allmean-12 0 0 0 0 0 0 0 0mean-33 0 0 0 0 0 0 0 0mean-all 0 0 0 0 0 0 0 0sd-12 0 0 0 0 0 0 0 0sd-33 0 0 0 0 0 0 0 0sd-all 0 0 0 0 0 0 0 0max-12 0 0 0 0 0 0 0 0max-33 0 1 0 1 0 1 0 1max-all 0 1 0 1 0 1 0 1Switches on Top of Joystick - Elapsed TimeDown - Up StatisticsRapid^Quick SlowUp - Down StatisticsAll^Rapid^Quick Slow Allmean-12 0 0 0 0 0 0 0 0mean-33 0 9 0 3 0 0 0 0mean-all 0 5 0 2 0 0 0 0sd-12 0 0 0 0 0 0 0 0sd-33 0 41 0 24 0 2 0 1sd-all 0 30 0 17 0 2 0 1max-12 0 0 0 0 0 0 0 0max-33 0 190 0 190 0 10 0 10max-all 0 190 0 190 0 10 0 10Press Time StatisticsRapidDownRapidUpQuickDownmean-12 78232 60289 67953mean-33 41668 67524 42411mean-all 59950 63907 55182sd-12 13834 8609 14476sd-33 16349 5465 12740sd-all 23740 8067 18682min-12 58903 40990 50872min-33 17158 55897 14070min-all 17158 40990 14070Appendix D Switch Test Results^ 144Trigger Switch on Joystick - Number of CyclesDown - Up StatisticsRapid^Quick Slow AllUp - Down StatisticsRapid^Quick Slow Allmean-12 0 0 0 0 2 3 3 3mean-33 0 0 1 0 2 3 3 3mean-all 0 0 0 0 2 3 3 3sd-12 1 0 0 1 1 1 1 1sd-33 0 1 2 1 1 1 0 1sd-all 1 1 2 1 1 1 1 1max-12 3 1 0 3 2 4 5 5max-33 0 2 7 7 3 4 3 4max-all 3 2 7 7 3 4 5 5Trigger Switch on Joystick - Elapsed TimeDown - Up StatisticsRapid^Quick Slow AllUp - Down StatisticsRapid^Quick Slow Allmean-12 364 512 0 292 184 311 281 259mean-33 0 373 1017 463 165 259 232 219mean-all 182 443 509 378 174 285 257 239sd-12 776 1248 0 876 71 27 64 79sd-33 0 1118 2182 1477 39 44 31 55sd-all 578 1187 1625 1217 58 45 56 71max-12 2425 4156 0 4156 221 332 406 406max-33 0 3727 6852 6852 189 344 255 344max-all 2425 4156 6852 6852 221 344 406 406Press Time StatisticsRapidDownRapidUpQuickDownmean-12 93608 76162 113480mean-33 76786 45170 94971mean-all 85197 60666 104225sd-12 9407 33558 7999sd-33 4227 5790 21183sd-all 11132 28635 18494min-12 80371 45145 98524min-33 67561 36244 70288min-all 67561 36244 70288Appendix D Switch Test Results^ 145Switches on Joystick Pad - Number of CyclesDown - Up StatisticsRapid^Quick Slow AllUp - Down StatisticsRapid^Quick Slow Allmean-12 0 0 0 0 13 13 14 14mean-33 0 0 0 0 20 22 21 21mean-all 0 0 0 0 17 18 17 17sd-12 0 0 0 0 2 2 3 2sd-33 0 0 0 0 2 4 3 3sd-all 0 0 0 0 4 5 4 5max-12 1 1 1 1 17 18 18 18max-33 1 0 1 1 25 32 27 32max-all 1 1 1 1 25 32 27 32Switches on Joystick Pad - Elapsed TimeDown - Up StatisticsRapid^Quick Slow AllUp - Down StatisticsRapid^Quick Slow Allmean-12 2 14 13 10 947 1007 995 983mean-33 5 0 15 7 934 998 998 977mean-all 4 7 14 8 941 1003 997 980sd-12 8 62 43 44 88 101 86 95sd-33 12 0 50 30 136 220 146 174sd-all 10 44 47 38 115 171 120 141max-12 37 283 190 283 1118 1152 1156 1156max-33 47 0 230 230 1193 1504 1435 1504max-all 47 283 230 283 1193 1504 1435 1504Press Time StatisticsRapidDownRapidUpQuickDownmean-12 62848 55811 61575mean-33 52595 59438 71444mean-all 57722 57624 66509sd-12 12966 11674 20476sd-33 9726 10213 12042sd-all 12555 11117 17507min-12 40373 42088 33898min-33 30837 35112 48873min-all 30837 35112 33898Appendix D Switch Test Results^ 14680486-33 Machine UsedFirst Button on Joystick Pad10 Rapid Fire PressesDown^Up^DownMicrosecondsUp^Down Up Down Up Down Up Down Up Down4 2 7 7 4 15 14 4 6 4 52 5 114 4 7 6 4 15 15 2 6 4 67 5 144 2 9 6 4 13 15 2 6 4 81 2 54 2 9 6 5 13 15 2 6 4 84 5 104 4 7 6 4 13 15 4 5 5 67 2 104 2 9 6 4 13 15 4 5 5 67 2 155 2 7 7 4 13 15 4 5 5 84 4 104 2 9 7 4 13 15 2 6 4 67 2 104 2 7 7 4 13 15 2 6 4 84 4 104 2 7 7 4 13 15 2 6 4 85 2 1110 Quick Presses - MicrosecondsDown Up Down Up Down Up Down Up Down Up Down Up Down4 4 7 6 4 15 14 4 6 4 53 4 224 4 7 6 5 15 14 4 6 4 53 4 224 4 7 5 5 15 14 4 6 4 53 2 284 4 7 6 4 15 15 4 5 4 53 4 224 4 7 6 4 15 14 4 6 4 84 5 94 4 7 6 4 15 15 2 6 4 53 4 285 4 6 7 4 15 15 2 6 4 53 4 224 4 6 7 4 15 15 4 5 4 53 4 234 4 7 6 4 15 14 4 6 4 67 2 154 4 7 6 4 15 15 4 5 4 53 4 2310 Slow Presses - MicrosecondsDown Up Down Up Down Up Down Up Down Up Down Up Down4 2 7 7 4 15 14 4 6 4 67 4 154 4 7 6 4 15 15 2 6 4 53 2 124 2 9 6 4 15 15 4 5 4 68 2 104 4 6 7 4 13 15 2 6 4 53 2 144 4 7 6 5 13 15 4 5 4 67 4 144 2 9 6 4 15 14 4 6 4 53 2 124 4 6 7 4 13 15 2 6 4 53 5 164 4 7 6 4 15 15 4 5 4 53 4 235 2 7 6 5 12 16 2 6 4 68 2 105 2 7 7 4 13 15 2 6 4 67 5 14Appendix D Switch Test Results^ 14780486-33 Machine UsedFirst Button on Joystick Pad - Second Page10 Rapid Fire Presses - MicrosecondsUp Down Up Down Up Down Up Down Up Down Up2 10 2 5 10 5 2 5 9 4 23311 9 263 5 5 5 9 4 7 6 24 10 11 6 223 4 5 6 7 4 104 2 6 6 229 4 5 5 23 14 72 5 5 9 13 5 249 6 4 5 279 6 4 5 7 4 248 12 22 15 42 5 5 6 260 4 5 5 12 162 1984 4 5 10 13 4 239 5 4 6 2012 6 237 4 2 7 25 169 162 4 510 7 226 4 6 5 9 2 11 16 510 Quick PressesUp^DownMicrosecondsUp Down Up Down Up Down Up Down Up4 4 4 5 2 5 7 10 208 5 52 5 5 9 5 14 197 5 4 6 76 7 15 5 207 5 2 9 7 2 164 5 4 9 9 10 211 5 5 5 74 14 226 5 5 5 20 19 4 152 1525 7 10 9 203 4 6 5 7 4 164 5 4 9 10 9 214 5 5 5 92 4 6 7 10 9 206 5 5 5 67 7 5 2 228 5 5 6 6 4 172 5 5 9 5 2 2 9 221 4 610 Slow Presses^MicrosecondsUp^Down^Up Down Up Down Up Down Up Down Up10 5 2 4 243 4 4 6 26 12 92 5 2 10 5 9 4 4 234 5 62 5 6 9 2 5 230 5 4 6 74 14 11 10 229 5 5 6 5 5 1811 10 233 9 2 5 6 4 17 15 54 15 10 10 226 5 4 6 9 2 92 17 4 10 237 5 4 6 22 15 112 5 10 10 229 5 5 6 7 4 132 6 5 9 4 4 229 5 4 6 711 9 235 4 5 6 7 2 15 14 5Appendix D Switch Test Results^ 14880486-33 Machine UsedFirst Button on Joystick Pad - Third Page10 Rapid Fire Presses - MicrosecondsDown Up Down Up Down Up Down Up Down Up Down4 5 6 26 5 4 5 9 5 2 1396 2 150 2 2 165 4 4 7 6 417 2 165 140 4 4 7 5 5 15 14150 4 4 150 5 4 6 7 4 15 15022 2 128 180 12 7 4 11 252 4 50351141 2 4 190 5 4 6 7 4 12 234 2 7 7 4 13 15 4 5 5 3812 2 159 166 5 2 7 7 7 5 1086 7 4 11 79 4 23 4 48095 6 20161 147 4 4 7 6 4 16 14 2 610 Quick Presses - MicrosecondsDown^Up^Down Up Down Up Down Up Down Up Down5 9 4 11 17 4 40 4 19 4 1304 15 6 4 5 6 5 6 14 4 65 5 5 7 5 4 15 5 5 4 1294 14 15 5 6 2 19 2 14 2 204 5 5 7 4 10 81 2 25 2 65 5 5 2 9 6 15 5 139 2 144 4 17 2 5 10 147 4 9 138 44 20 5 2 7 5 5 6 15 5 55 2 6 6 144 152 4 6 5 7 25 6 4 20 15 5 5 4 125 2 610 Slow Presses - MicrosecondsDown^Up^Down Up Down Up Down Up Down Up Down141 147 4 5 5 7 4 13 22 5 845 5 4 21 14 7 131 2 11 149 44 17 5 4 6 4 6 6 15 4 1285 2 9 5 5 5 15 4 115 2 175 5 150 124 4 6 5 6 4 15 226 2 5 6 15 4 15 5 147 102 4146 10 4 130 4 4 7 6 4 13 2215 6 150 4 10 125 4 4 7 6 44 15 6 4 5 7 6 2 23 2 1246 2 151 130 4 5 6 6 4 15 15Appendix D Switch Test Results^ 14980486-33 Machine UsedFirst Button on Joystick Pad - Fourth Page10 Rapid Fire Presses - MicrosecondsUp^Down^Up^Down^Up^Down^Up^Down^Up^Down^Up171 4^4 7 6 5 10 81 2 125 415 15 2 7 2 38 2 14 4 22 44 6^5 83 2 41 2 16 4 40373 539305 15 2 33 4 47068 5 42 44765435292 22^2 31 4 149 47 50503 432972 14 4 121 89 6 2 15 7 58119 24 53908^51583451905 38^2 38 2 5 2 30 4 10 210 Quick Presses^MicrosecondsUp Down^Up Down Up Down Up Down Up Down Up85 14^6 5 6 22 2 47383 13275412 5 4 17 4 125 6 16 20 5 92 12^105 4 2 7 5 5 12 45465 10455742 109 12 12 90 5 5 6 5 5 122 40808^100507497 4 5 6 2 7 10 46388 9979876 5^6 4 14 15 2 6 5 53 44 6 2 113 2 15 9 9 83 5 414 22^5 52 2 23 2 64 5 50633 9593982 11 4 4 126 5 4 6 6 4 1510 Slow Presses - MicrosecondsUp^Down^Up Down Up Down Up Down Up Down Up4 15 2 42 2 905364 2 10 12081225 5 9 2 11 72 2 819774 1023756130 4 5 6 6 4 16 15 2 6 4120 5 4 6 6 4 15 21 2 630182 13481182 115 2 35 4 733963 12065175 6 5 5 12 802861 13546942 85 5 57 2 766015 109872715 14 2 7 2 68 2 16 4 874991 784 2 121 4 5 5 6 4 13 22 42 6 4 67 4 16 2 40 2 6 2Appendix D Switch Test Results^ 15080486-33 Machine UsedFirst Button on Joystick Pad - Fifth Page10 Rapid Fire Presses - Microseconds^Down^Up^Down^Up^Down67901^4476348237^5074614^4553416^4^33^2^6300910 Quick Presses - MicrosecondsDown^Up^Down^Up^Down^Up^Down^Up^Down^Up40873 103557033898 97908523^2^33^5^10^7^11^4^39300^9183516 4 6 7^46238 106894114^4^6^4^84^2^59^4^5213810 Slow Presses - MicrosecondsDown^Up^Down^Up^Down^Up^Down^Up^Down^Up^Down113^5^15^5^15^5^26^2^750221^2^14152 1080781744073 1032464932005Appendix D Switch Test Results^ 15180486-33 Machine UsedFirst Button on Joystick Pad - Sixth Page10 Slow Presses - MicrosecondsUp1205963Appendix EAssembler Code Used in TimingThe following three segments of assembler code were used to assess executiontimes1. The length of time to process a keyboard interrupt. This was code extracted fromthe system BIOS.2. The timing profile of switch presses for switches attached to the game port. Thiswas code written specifically for this purpose.3.^The length of time to process a timer interrupt. This was a mixture of BIOS anduser supplied code.152Appendix E Assembler Code Used in Timing^ 153Timing Analysis of BIOS Processing of Keyboard InterruptThe IBM BIOS listing was used. A 386-33 with memory caching and the ROMBIOS shadowed to RAM was assumed for the best case timing. 300 nanosecond ROM wasassumed for the worst case timing. The time calculated was to process the interrupt for asingle lowercase character. The best case and worst case times are in nanoseconds.Line # InstructionClockCyclesBestCaseWorstCase1850 sti 3 90 360push 2 60 330push 2 60 330push 2 60 330push 2 60 330push 2 60 330push 2 60 330push 2 60 330push 2 60 330cld 2 60 3301860 call 8 240 5105489 push 2 60 330mov 2 60 330mov 2 60 330pop 4 120 3905493 ret 11 330 6001861 in 12 360 630push 2 60 330in 12 360 630mov 2 60 330or 2 60 330out 10 300 570xchg 3 90 360out 10 300 570pop 4 120 390mov 2 60 330cmp 2 60 330jnz 3 90 360imp 8 240 510and 2 60 330push 2 60 330pop 4 120 390Appendix E Assembler Code Used in Timing^ 154Line # InstructionClockCyclesBestCaseWorstCasemov 2 60 330mov 4 120 390repne 56 1680 3040mov 2 60 330je 3 90 3601889 jmp 8 240 5101965 cmp 2 60 330jae 3 90 360test 5 150 4201968 jz 8 240 5101991 test 5 150 4201174 3 90 360 jmp 8 240 5102078 test 5 150 4202079 jz 8 240 5102134 cmp 2 60 330jae 3 90 360test 5 150 4202137 jz 8 240 5102202 cmp 2 60 3302203 jb 8 240 5102207 mov 2 60 330dec 2 60 330xlat 5 150 420cmp 2 60 330je 3 90 360cmp 2 60 330je 3 90 360test 5 150 4202227 jz 8 240 5102254 mov 4 120 390mov 2 60 3302256 call 8 240 5101779 inc 2 60 330inc 2 60 330cmp 6 180 450jne 8 240 510ret 11 330 6002257 cmp 6 180 450Appendix E Assembler Code Used in Timing^ 155Line # InstructionClockCyclesBestCaseWorstCaseje 3 90 360mov 2 60 330mov 2 60 3302261 jmp 8 240 5101973 cli 3 90 360mov 2 60 330out 10 300 570pop 7 210 480pop 7 210 480pop 4 120 390pop 4 120 390pop 4 120 390pop 4 120 390pop 4 120 390pop 4 120 3901985 iret 22 660 930Totals 451 13530 38110Appendix E Assembler Code Used in Timing^ 156Code Used to Time Switch PressesClocks286^486ppr1: in al,dx ; Input the game port 5 12test bp,01H ; See if first transition 3 2jz ppr4 ; It hasn't so do nothing 3 3add si,1 ; Count the button presses 3 2jncincppr4di; No need to increment high; Increment the high order11 11ppr4: cmp al,ah ; See if button has changed 2 2jz pprl ; It hasn't 3/9 3/9test a1,080H ; Check for button 4 down 3 2jz ppr3 ; Jump if it's a button down 3/11 3/11test ah,080H ; Check for button 4 before 3 2jnz ppr2 ; Exit if previously up 3 3ppr3: or bp,01H ; Set the flag to count 3 2mov ta[bx],di ; Save the high order part 3 2add bx,2 ; Point to next location 3 2mov ta[bx],si ; Save the low order part 3 2add bx,2 ; Point to next location 3 2xor si,si ; Reset the loop counters 2 2xor di,di 2 2mov ah,al ; Save the current state 2 2jmp pprl ; Do the next loop 9 9Appendix E Assembler Code Used in Timing^ 157Instruction / ProcessorTiming Analysis of Timer InterruptClock Cycles8088^80286 80386 80486int 71 25 37 28sti 2 2 3 5push^ds 14 3 2 3push^ax 15 3 2 4push^dx 15 3 2 4call^DDS 23 8 8 3push^ax 15 3 2 4mov^ax,data 14 5 4 3mov^ds,ax 2 2 2 3pop^ax 12 5 4 4ret 20 13 12 5inc^timer_ 29 7 6 9jnz^T4^— 16 9 9 3cmp^timer high,018H 20 6 5 4jnz^T5^— 16 8 8 3dec^motor count 29 7 6 9jnz^T6^— 16 9 9 3int^1CH 71 24 37 32push^ax 15 3 2 4push^dx 15 3 2 4mov^dx,0201H 4 2 2 1in^al,dx 12 5 13 14and^al,button_mask 15 7 6 4cmp^al,prevstate_ 15 6 6 4je^gpc3 16 8 8 3pop^dx 12 5 4 5pop^ax 12 5 4 5iret 44 19 22 23mov^al,EOI 4 2 2 1out^020H,a1 14 3 10 16pop^dx 12 5 4 5pop^ax 12 5 4 5pop^ds 12 5 7 5iret 44 19 22 23Total Clock Cycles 658 244 276 251Appendix E Assembler Code Used in Timing^ 158For the 8088 and 80286 machines, it is necessary to add some time. These machinesnormally do not have a memory cache or shadow RAM. The sequence shown contains 23instructions that will be executed from the BIOS. The ROM chips have an access time of300 nanoseconds. An additional 90 nanoseconds per instruction must be added to the totaltime for the 8088. An additional 220 nanoseconds per instruction must be added to thetotal time for the 80286.Processor 8088^80286 80386 80486Processor Speed (mhz) 4.77 12 33 50Microseconds/Interrupt 137.94^20.33 8.36 5.02BIOS Adjustment 2.07 5.06 0 0Total Time 138.01^25.39 8.36 5.02% of CPU used by Timer InterruptInterrupt Frequency 8088^80286 80386 80486500As 27.60^5.08 1.67 1.001 ms 13.80 2.54 0.84 0.503 ms 4.60^0.85 0.28 0.175 ms 2.76 0.51 0.17 0.1010 ms 1.38^0.25 0.08 0.0520 ms 0.69 0.13 0.04 0.03Appendix FScreen Diagrams for System ImplementationThe following diagrams are graphical representations of the screens for the newimplementation of the Headturn procedure.159Run ExperimentEdit Configuration FileEdit General ParametersEdit SessionEdit StageEdit ScheduleEdit Protocol & StimuliCompleted Trials: ENECorrect So Far: NEM^Criterion Window:  ^Required Correct:  # of Criteria: EN^Re-training Trials:  Consecutive Misses.  Correct in Window:  Still to Go: EE^Times Met:  Remaining Criteria: EERUNGSCRNStageNamePress [Begin] to begin a trial,Press [Abort)-[Begin] to terminate the stage.Press [Abort]-[Vote] to select a re-training trial.      Esc ExitRUNNINTAESLCTSCRNConfiguration Drive: MConfiguration Directory:^ : Esc ExitFlO Save and ExitID #: MEM^Subject Name: ^Subject Birthdate: ^Experimenter: ^Assisstant: ^Response File: ^Sequenced Mode:^Y/NTrial Screen Colour: MBetween Trial Colour: MSampling Rate: ^Sampling Precision: ^File Offset: ^DMA Channel: MI/O Address: ^ENEALARAMDocumentationWindowTestinglTesting2Testing3Testing4Testing5TraininglPgDn Next Stage     PgUp Previous StageF7 Delete Stage      F8 Add/Update Stage      Esc ExitDocumentationStage Name:Main^Protocol:E WindowRetraining Protocol:D Schedule Name:I Probability^of^Change^Trial:^....... —T Max # Succ.^Change Trials:Max # Succ.^Control^Trials:S Block^Size:^-T Minimum^#^of^Trials:^—..A Criterion:G Criterion^Window:E Required # of Criteria:Handling of Consecutive Misses:# of Consecutive Misses Required:Automatic^Retraining?: M Y/NSTAGESCNEDITDocumentationWindowProtocol^Name:Reinforcer^Initiation:^MInitiation^Delay:Reinforcer Duration:P Target Stimulus Reps:R Vote Button Extension:^M Y/N0 Observation^Interval:T Inter^Stimulus^Interval:     PgDn Next TrialF5 Edit Tokens       F7 Delete Trial      PgUp Prey TrialF6 Edit Reinforcers      F8 Add/Update Trial       Esc ExitTRIALSCNTarget Token ^Probability: MEMBackground Token: ^Probability: MBEsc ExitF10 Save and Exit  REMSCMUULLLRLRFirst Configuration:^M 0Probability: ^Second Configuration: 0Probability: ^Third Configuration: 0Probability: ^Fourth Configuration: 0Probability:RENF0RCERO 0N BDocumentationWindowAppendix GExperimentation Literature SampleThe results of the experimentation literature sample are tabulated and presented inthis appendix. The paper numbers in the tables refer to the paper numbers in thereference section of this appendix.171Appendix G Experimentation Literature Survey^ 172EXPERIMENTAL FEATURESPaper Number 1 2 3 4 5 6 7 819 0 1 11 2 1 13 4 1 15 6 1 17 8 1 29 0 2 21 2 2 23 4 2 25 6 2 27 8 2 39 0 3 31 2 3 33 4 3 35 6 3 37 8 3 49 0 4 41 2 4 43 4 4 45 6 4 47 8 4 59 0Word Completion I ISentence Completion 1Selection of Alternatives IReaction Time 1 1 1 IResponse Time 1 1 II I 1 III IVisual SearchFor Feature 1 1 1ComparisonScene Analysis 1 1 IClassification (Search) ITachistoscope I IIITarget TrackingVisual Audible Correlation IUser Manipulation of ScreenAdaption Based on Response 11111Feedback SuppliedVisual ilAudible I I I IBoth IEXPERIMENTAL FEATURESPaper Number 1 2 3 4 5 6 7 8 19 0 1 11 2 1 13 4 1 15 6 1 17 8 1 29 0 2 21 2 2 23 4 2 25 6 2 27 8 2 39 0 3 31 2 3 33 4 3 35 6 3 37 8 3 49 0 4 41 2 4 43 4 4 45 6 4 47 8 4 59 0Text Recognition and Comprh 1 II I I IILong Term Memory I I IKnowledge Application I IMemory Scanning 1General Recognition IMedium/Short Term Memory I III I IMemory Organization 1 1Measured Analog Input IProofreading IMotion Control IIVisual Processing IIIAudio Frequency Discrim ISpectrogram Shape Discrim. I ISeparating 2 Audio Signals I IPitch Deternr-Fund Freq I ISpeech Analysis I I IThreshold Measurement IIISuprathreshold 1Appendix G Experimentation Literature Survey^ 173COMPUTER FEATURES IN EXPERIMENTSPaper Number 1 2 3 4 5 6 7 8 19 0 1 11 2 1 13 4 1 15 6 1 17 8 1 29 0 2 21 2 2 23 4 2 25 6 2 27 8 2 39 0 3 31 2 3 33 4 3 35 6 3 37 8 3 49 0 4 41 2 4 43 4 4 45 6 4 47 8 4 59 0VisualText^ 11^1^1^1^1^1^1^1^III^1GraphicsSimple Line Drawings 1 1 1 11 1 1It Patterns 1 1Non Alpha Script 11Moving Simple ShapesAnimation 11Analog PicturesTiming CriticalArriihleBeeps 1 1 1 11 11MusicSPeech 1 I IAnalog 11 11Digitized/Stored 1 11 1 11SyntheticNoise Masking 1111 11COMMTER FEATURES IN EXPERIMENTSPaper Number 1 2 3 4 5 6 7 8 19 0 1 11 2 1 13 4 1 15 6 1 17 8 1 29 0 2 21 2 2 23 4 2 25 6 2 27 8 2 39 0 3 31 2 3 33 4 3 35 6 3 37 8 3 49 0 4 41 2 4 43 4 4 45 6 4 47 8 4 59 0OtherOrdering of Presentation 11 1 11 11 1 1 1111 111111 1Recording of Results 1 1 1 1 1 111 1 1 11 1Analysis of Results 11 1 111 1 1 1Randomization 11 1Simulation or Model 1Voice Activated Switching 1 1Type of CbmputerWorkstation 1PC Compatible 1 1 1 1 1 1 1 11 1 1 1 1 1Apple 1 1 1Ccnnodore 1 1 1 1None 1 1 1 1 1 1 1 1 1 1 IUnknown 1 1 1 I I I 1 1 1 111 1111DEC Minicomputer 1 1 1 1Terak 1Amiga 1 1Appendix G Experimentation Literature Survey^ 174Fifty Papers Surveyed from theJournal of Experimental Psychologyand theJournal of the Acoustical Society of America1. Allen, W. and Brooks, L. R. (1991). Specializing the Operation of an Explicit Rule.Journal of Experimental Psychology: General, 120, 3-19.2. Bahrick, H. P. and Hall, L. K. (1991). Lifetime Maintenance of High SchoolMathematics Content. Journal of Experimental Psychology: General, 120, 20-33.3. Fong, G. T. and Nisbett, R. E. (1991) Immediate and Delayed Transfer of TrainingEffects in Statistical Reasoning. Journal of Experimental Psychology: General, 120,34-45.4. Hopkins, W. D., Morris, R. D. and Savage-Rumbaugh, E. S. (1991). Evidence forHemispheric Priming Using Known and Unknown Warning Stimuli in TwoLanguage-Trained Chimpanzees (Pan Troglodytes). Journal of ExperimentalPsychology: General, 120, 46-56.5. Kyllonen, P. C., Tirre, C. T. and Christal, R. E. (1991). Knowledge and ProcessingSpeed as Determinants of Associative Learning. Journal of Experimental Psychology:General, 120, 57-79.6. Fisk, A. D. and Rogers, W. A. (1991). Toward an Understanding of Age-RelatedMemory and Visual Search Effects. Journal of Experimental Psychology: General,120, 131-149.7. Ashby, F. G. and Lee, W. W. (1991). Predicting Similarity and Categorization FromIdentification. Journal of Experimental Psychology: General, 120, 150-172.8. Navon, D. (1991). Testing a Queue Hypothesis for the Processing of Global andLocal Information. Journal of Experimental Psychology: General, 120, 173-189.9. Durso, F. T. and Shore, W. J. (1991). Partial Knowledge of Word Meanings. Journalof Experimental Psychology: General, 120, 190-202.10. Cleeremans, A. and McClelland, J. L. (1991). Learning the Structure of EventSequences. Journal of Experimental Psychology: General, 120, 235-253.11. Graesser, A. C., Lang, K. L. and Roberts, R. M. (1991). Question Answering in theContext of Stories. Journal of Experimental Psychology: General, 120, 254-277.12. Brooks, L. R., Norman, G. R. and Allen, S. W. (1991). Role of Specific Similarity ina Medical Diagnostic Task. Journal of Experimental Psychology: General, 120, 278-287.13.^Merriman, W. E., Schuster, J. M. and Hager, L. (1991). Are Names Ever MappedOnto Preexisting Categories?. Journal of Experimental Psychology: General, 120, 288-300.Appendix G Experimentation Literature Survey^ 17514. Hertel, P. T. and Rude, S. S. (1991). Depressive Deficits in Memory: FocussingAttention Improves Subsequent Recall. Journal of Experimental Psychology: General,120, 301-309.15. Farah, M. J. and McClelland, J. L. (1991). A Computational Model of SemanticMemory Impairment: Modality Specificity and Emergent Category Specificity.Journal of Experimental Psychology: General, 120, 339-357.16. Jared D. and Seidenberg, M. S. (1991). Does Word Identification Proceed FromSpelling to Sound to Meaning?. Journal of Experimental Psychology: General, 120,358-394.17. Conway, M. A., Cohen, G. and Stanhope, N. (1991). On the Very Long-TermRetention of Knowledge Acquired Through Formal Education: Twelve Years ofCognitive Psychology. Journal of Experimental Psychology: General, 120, .18. Tulving, E., Hayman, C. A. G. and Macdonald, C. A. (1991). Long-LastingPerceptual Priming and Semantic Learning in Amnesia: A Case Experiment.Journal of Experimental Psychology: Learning, Memory and Cognition, Vol 17 No 4,595-617.19. Danemen, M. and Stainton, M. (1991). Phonological Recoding in Silent Reading.Journal of Experimental Psychology: Learning, Memory and Cognition, Vol 17 No 4,618-632.20. Perfetti, C. A. and Zhang, S. (1991). Phonological Processes in Reading ChineseCharacters. Journal of Experimental Psychology: Learning, Memory and Cognition, Vol17 No 4, 633-642.21. Baluch, B. and Benser, D. (1991). Visual Word Recognition: Evidence for StrategicControl of Lexical and Nonlexical Routines in Oral Reading. Journal ofExperimental Psychology: Learning, Memory and Cognition, Vol 17 No 4, 644-652.22. Lukatela, G., Turvey, M. T. and Todorovic, D. (1991). Is Alphabet Biasing inBialphabetical Word Perception Automatic and Prelexical? Journal of ExperimentalPsychology: Learning, Memory and Cognition, Vol 17 No 4, 653-663.23. Vitkovich, M. and Humphreys. G. W. (1991). Perseverant Responding in SpeededNaming of Pictures: It's in the Links. Journal of Experimental Psychology: Learning,Memory and Cognition, Vol 17 No 4, 664-680.24. Tipper, S. P., Weaver, B., Cameron, S. Brehaut, J. C. and Bastedo, J. (1991).Inhibitory Mechanisms of Attention in Identification and Localization Tasks: TimeCourse and Disruption. Journal of Experimental Psychology: Learning, Memory andCognition, Vol 17 No 4, 681-692.25. Christianson, S. A., Loftus, E. F., Hoffman, H. and Loftus, G. R. (1991). EyeFixations and Memory for Emotional Events. Journal of Experimental Psychology:Learning, Memory and Cognition, Vol 17 No 4, 693-701.Appendix G Experimentation Literature Survey^ 17626. Nairne, J. S., Riegler, G. L. and Serra, M. (1991). Dissociative Effects of Generationon Item and Order Retention. Journal of Experimental Psychology: Learning, Memoryand Cognition, Vol 17 No 4, 702-709.27. Brown, S. C., Connover, J. N., Flores, L. M. and Goodman, K. M. (1991). Clusteringand Recall: Do High Clusterers Recall More Than Low Clusterers Because ofClustering?. Journal of Experimental Psychology: Learning, Memory and Cognition,Vol 17 No 4, 710-721.28. Fisher, R. P. and Chandler, C. C. (1991). Independence Between RecallingInterevent Relations and Specific Events. Journal of Experimental Psychology:Learning, Memory and Cognition, Vol 17 No 4, 722-733.29. Patla A. E., Prentice, S. D., Robinson, C. and Neufeld, J. (1991). Visual Control ofLocomotion: Strategies for Changing Direction and for Going Over Obstacles.Journal of Experimental Psychology: Human Perception and Performance, Vol 17 No3, 603-632.30. Schmidt, R. C., Beek, P. J., Treffner, P. J. and Turvey, M T. (1991). DynamicalSubstructure of Coordinated Rhythmic Movements. Journal of ExperimentalPsychology: Human Perception and Performance, Vol 17 No 3, 635-651.31. Treisman, A. (1991). Search, Similarity, and Integration of Features Between andWithin Dimensions. Journal of Experimental Psychology: Human Perception andPerformance, Vol 17 No 3, 652-676.32. Venturino, M. (1991). Automatic Processing, Code Dissimilarity, and the Efficiencyof Successive Memory. Journal of Experimental Psychology: Human Perception andPerformance, Vol 17 No 3, 677-695.33. Smid, H. G. 0. M., Lamain, W., Hogeboom, M. M., Mulder, G. and Mulder, L. J. M.(1991). Psychophysiological Evidence for Continuous Information TransmissionBetween Visual Search and Response Processes. Journal of Experimental Psychology:Human Perception and Performance, Vol 17 No 3, 696-714.34. Yee, P. L. and Hunt, E. (1991). Individual Differences in Stroop Dilution: Tests ofAttention-Capture Hypothesis. Journal of Experimental Psychology: HumanPerception and Performance, Vol 17 No 3, 715-725.35. Shulman, G. L. (1991). Attention Modulation of Mechanisms That AnalyzeRotation in Depth. Journal of Experimental Psychology: Human Perception andPerformance, Vol 17 No 3, 726-737.36. Delucia, P. R. (1991). Pictorial and Motion-Based Information for DepthPerception. Journal of Experimental Psychology: Human Perception and Performance,Vol 17 No 3, 738-748.37. Hauser, M. D. and Fowler, C. A. (1992). Fundamental Frequency Declination IsNot Unique to Human Speech: Evidence from Nonhuman Primates. Journal of theAcoustical Society of America, Vol 91 No 1, 363-369.Appendix G Experimentation Literature Survey^ 17738. Flege, J. E. and Fletcher, K. L. (1992). Talker and Listener Effects on Degree ofPerceived Foreign Accent. Journal of the Acoustical Society of America, Vol 91 No 1,370-389.39. Andruski, J. E. and Nearey, T. M. (1992). On the Sufficiency if Compound TargetSpecification of Isolated Vowels in /bVb/ Syllables. Journal of the Acoustical Societyof America, Vol 91 No 1, 390-411.40. Eefting, W. (1992). The Effect of Accentuation and Word Duration on theNaturalness of Speech. Journal of the Acoustical Society of America, Vol 91 No 1,411-421.41. Smoorenburg, G. F. (1992). Speech Reception in Quiet and in Noisy Conditions byIndividuals with Noise Induced Hearing Loss in Relation to Their Tone Audiogram.Journal of the Acoustical Society of America, Vol 91 No 1, .42. van Rooij, J. C. G. M, and Plomp, R. (1992). Auditive and Cognitive Factors inSpeech Perception by Elderly Listeners. III. Additional Data and Final Discussion.Journal of the Acoustical Society of America, Vol 91 No 2, 1028-1033.43. Carlyon, R. P. and White, L. J. (1992). Effect of Signal Frequency and Masker Levelon the Frequency Regions Responsible for the Overshoot Effect. Journal of theAcoustical Society of America, Vol 91 No 2, 1034-1041.44. Grose, J. H. and Hall, J. W. III. (1992). Comodulation Masking Release for SpeechStimuli. Journal of the Acoustical Society of America, Vol 91 No 2, 1042-1050.45. Huanping, D. and Green, D, M. (1992). Auditory Intensity Perception: Successiveversus Simultaneous, Across Channel Discrimination. Journal of the AcousticalSociety of America, Vol 91 No 5, 2845-2854.46. Kidd, G. Jr. and Mason, C. R. (1992). A New Technique for Measuring SpectralShape Discrimination. Journal of the Acoustical Society of America, Vol 91 No 5,2855-2864.47. Bacon, S. P. and Takahashi, G. A. (1992). Overshoot in Normal-Hearing andHearing-Impaired Subjects. Journal of the Acoustical Society of America, Vol 91 No 5,2865-2871.48. ter Keurs, M., Festen, J. M. and Plomp, R. (1992). Effects of Spectral EnvelopeSmearing on Speech Reception.I Journal of the Acoustical Society of America, Vol 91No 5, 2872-2880.49. Moore, B. C. J. and Peters, R. W. (1992). Pitch Discrimination and Phase Sensitivityin Young and Elderly Subjects and its Relationship to Frequency Selectivity. Journalof the Acoustical Society of America, Vol 91 No 5, 2881-2893.50.^Woods, W. S. and Colburn, H. S. (1992). Test of a Model of Auditory ObjectFormation Using Intensity and Interaural Time Difference Discrimination. Journalof the Acoustical Society of America, Vol 91 No 5, 2894-2902.

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0051436/manifest

Comment

Related Items