CA1216897A - Visual stimulator - Google Patents

Visual stimulator

Info

Publication number
CA1216897A
CA1216897A CA000430383A CA430383A CA1216897A CA 1216897 A CA1216897 A CA 1216897A CA 000430383 A CA000430383 A CA 000430383A CA 430383 A CA430383 A CA 430383A CA 1216897 A CA1216897 A CA 1216897A
Authority
CA
Canada
Prior art keywords
light
shutter
short
flash
stimulator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
CA000430383A
Other languages
French (fr)
Inventor
John Ens
Craig W. Beattie
James A. Mcewen
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
VANCOUVER GENERAL HOSPITAL
Original Assignee
VANCOUVER GENERAL HOSPITAL
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by VANCOUVER GENERAL HOSPITAL filed Critical VANCOUVER GENERAL HOSPITAL
Application granted granted Critical
Publication of CA1216897A publication Critical patent/CA1216897A/en
Expired legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/377Electroencephalography [EEG] using evoked responses

Abstract

VISUAL STIMULATOR
Abstract of the Invention A visual stimulator for light stimulation of a subject's eyes to obtain electroretinogram, electro-oculogram or visually evoked potential responses. The stimulator comprises a light directing means for direct-ing light from a light source into the subject's eyes, attenuator means for selectably attenuating the light source, photodetector means for producing an output signal representative of the radiant energy directed into the subject's eyes and signal processing means for receiving and processing the output signal to derive therefrom further output signals representative of the radiometric or photometric characteristics of said radiant energy.
A light shutter comprising first and second shutter leaves affixed to the shafts of first and second galvanometers is also provided. The shutter leaves are positioned for pivotal movement with the galvanometer shafts to attenuate light passing between the shutter leaves. Attenuation control means is provided for selectably varying current signals applied to the galvanometers to selectably pivot the shutter leaves, thereby selectably varying the attenuation of light passing between the shutter leaves.

Description

VI SUAC, STI MULATOR

Field of the I_vention This application pertains to visual stimula-tors for stimulating the visual s~stem to assist in recording its electrophysiological responses. More particularly, the application pertains to visual stimu-lator apparatus for stimulating the visual system to obtain an electroretinogram, a visual evoked potential or an electro-oculogram. In the art, the term "ERG/VEP/EOG stimulator" is often used to describe such apparatus.
Background of the Invention ~hen light strikes the retina of the eye, the photoreceptors in the retina (rods and cones) respond by generating a small electrical potential. The aggregate electrical potential representing the total response of all the rods and cones in the retina to a brief flash of liyht is an electroretinogram (hereinafter "ERG"). An ERG, together with other measuremen-ts, may he used by ophthalmologists to help determine the func-tional staL US
of the retina in various conditions including congenital and acquired degenerative states, trauma (injuries), toxic states and inflammatory diseases.
` 2S An ERG may be obtained by photostimulating the retina. Conventionally, a light flash of several milli-- seconds duration is directed into the subjec-t's eyes.
The flash intensity must be variable so that the sub-ject's ERG response can be evaluated throughout a broad range of adaptational states. In low ambient light ~ ~`7`J

r ~7 conditions (dark adaptation), it is mainly rod photore-ceptors which mediate visual sensation while in hiyh ambient :Light conditions (light adaptation) cones domi-nate visual processes. Rod function is best evaLuated 5 with low intensity light flashes while cones respond to flashes of much greater intensity. Rod and cone func-tion may also be differentiated by varying the chromatic properties of the light flash. Short wavelength (blue) stimuli are more effective in generating rod responses while long wavelength (red) stimuli produce mainly cone responses. Thus it is preferable to make provision Eor both variable flash intensity and chromatic filtering of the light stimulus The subject's ERG response is measured with a special corneal contact electrode. Usually, the res-ponse is displayed and stored for later analysis.
A typical prior art ERG stimulator comprises a reflective hemispherical bowl and a controllable light source for illuminatin~ the bowl. The subject is fitted with the corneal contact electrode and then looks into the bowl as it is illuminated. Conventionally, three separate tests are used to measure the subject's RRG
response. The first test is carried out in dark adap-tation, following a specific period of time in dark 25 ambient conditions sufficient to allow rod photoreceptor function -to be Eully expressed and well below the threshold at which cone function may occur. The eyes are then stimulated with a single light flash. The procedure is repeated, increasing the flash intensity in approximately three decibel (hereinafter "dB") steps over a rnaximum range oE about 36 d~ until an ~RG with a peak of at least 50 microvolts (hereinaEter "uV") is recorded. The 50 uV threshold is an arbitrary c,riterion threshold Eor photoreceptor response amplitucles broadly accepted within the clinical community. F~ollowing determination of the 50 uV threshold, responses are obtaine~ at higher stimulus intensities, sufficient to evoke mixed rod and cone responses in order to evaluate more complex interactions between both classes of photo-receptors. The second test is carried out in liyht adaptationr following a brief period of time in ambient light of sufficient intensity to suppress rod function.
A 50 uV threshold is determined for cone responses, followed by stimulation at higher intensities to elicit other components of the RRG having clinical significance in light adaptation. The third test is also carried out in light adaptation, a high intensity light source being presented at a stimulus frequency of about 30 Hertz (in contrast to the first and second tests in which the stimulus frequency is generally about 1 Hertz.) This higher frequency stimulus tests the temporal response characteristics of the cone photoreceptors, thus yield-ing further information regarding functional character-istics of these retinal cells.
The ERG represents the transient electrical responses of the retina to brief flashes of light, superimposed upon a more or less constant electrical potential originating in retinal structures, and present ; in both dark and light adaptation. The record of this "constant" or "standing" electrical potential is called the electro-oculogram (hereinafter "EOG"). Typlcally, the amplitude of this potential is considerably less in dark adaptation than in light adaptation. The ratio of the maximum amplitude in light adaptation to the minimum amplitude in dark adaptation is oE clinical significance and is a useful adjunct to interpretation o~ the E~G in some disorders, as well as having importance in its own riyht in certain hereditary retinal degenerative conditions.
The t'standing" potential referred to above is obtained by means of electrodes located horizontally ad-jacent to the eyes on the skin surface. Measurement of this potential is facilitated b~ instructing the subject to alternate his or her direction of gaze between two clearly indicated fixation targets placed 15 horizon-tally eccentric to a reference point directly in front of the subject. Typically, the fixation targets are placed within the same hemispherical bowl used in the ERG test. Thus conditions exist such that the same apparatus used to present the appropriate background ambient light for the ~RG can also be employed to pre-sent an appropriate background light ambience for the EOG test. An EOG test is commonly performed in three stages: a brief initial phase in which the subject views the fixation targets in light adap-tive conditions, followed by a second phase in dark adaptation during which the subject views the dimly illuminated fixation targets and concluding with a third phase in light ad-aptation (the second and third phases each being of about 15 minutes duration).

, - 4 -':~

~2~1~7 The ampliEied electrical responses obtained during the three phases of the ÆOG procedure are commonly recorded on a slowly ~ovintJ strip oE chart paper over the duration of the test. At the conclusion of the test r the recording is analysed in order to determine those times at which the minimum and maxllnum responses in dark and light have occurred, followed by calculation of the ratio of those responses.
Photostimulation of the eye causes the genera-tion of electrical potentials from the visual system in addition to the ERG and EOG. One other such potential, recorded from electrodes attached to the scalp of a test subject, is called the visually evoked potential (here-inafter ''VEP'I) or visually evoked cortical potential ("VECP"). The VEP is a very small electrical signal and must be differentiated from other electrical activity occurring on the surface of the scalp by computer assisted signal processing procedures. An extremely wide variety of visual stimuli can be employed to elicit a VEP, one of the most commonly employed being a diffuse flash of light presented at some chosen temporal fre-quency within the field of vision. Stimulus frequencies generally range between 0.5 and 60 Hertz. The VEP
laryely reflects functional properties of the central cone-rich portion of the retina as well as conduction characteristics within the visual pathways leading to the visual cortex of the brain. The principal clinical application of the VEP relates to the evaluation of in-flammatory and degenerative abnormalities of the optic nerves and posterior visual pathways.

~æ~

Many problems have been encountered with prior art visual stimulators. The greatest difEiclllties have related to the source, regulation, measurement anrl cali-bration oE the light flash stimulus. Most prior art visual stimulators have incorporated a stroboscopic gas discharye tube. Such sources have physiologically un-desirable spectral characteristics and stimulus energy is difficult to regulate. Measurements of the photo-metric and radiometric characteristics of the flash radiant energy are also difficult to obtain with such sources and in most cases flash energy declines to some extent as stimulus frequency increases. Prior art visual stimulator apparatus is often cumbersome and in-flexible, malcing it difficult to test subjects in both upright and supine positions. Various difficulties have been encountered with respect to obtaining a permanent record of the responses obtained during ERG, EOG and VEP
testing. The EOG in particular has been cumbersome to deal with due to the length of the continuously recorded potential.
The present invention addresses the foregoing disadvantages. For example, the light source of the preferred embodiment is an incandescent ~ilament with a continuous spectrum having physiologically desirable chromatic characteristics. Energy emitted from this source is very stable. Of particular importance is the means used to interrupt the transmission of the light stimulus from the source to the subject's eyes and to regulate stimulus duration together with stimulus inten-sity. Means are provided which permit fine incremental `,;

.
,~

,~

~.2~
control of stimulus intensity (attenuation) over a broadrange o~ energy levels. Measurement of stimulus eneryy and luminance is provided and allows display of stimulus parameters in absolute radiometric and photometric units. The photodetector device employed in the pre-~erred embodiment to obtain these measurements also mediates the selE-calibration system incorporated in the preferred embodiment, ensuring a very high degree of control over the light stimulus reaching the subject's eyes. Provision is made for altering the chromatic characteristics of the stimulus in accordance with test-ing requirements. Another feature incorporated in the preferred embodiment is a means by which the response ; obtained from the ERG, EOG or VEP procedure can be transferred to a hard-copy record together with a repro-duction of stimulus parameters on the same hard-copy record. This is of special significance with respect to the EOG response in that the results of a long recording procedure can be condensed into a compact hard-copy record.
The features described briefly above have been embodied in a device of sufficiently small size and flexibility to allow testing of subjects in a wide range of anatomical positions, and sufficiently mobile to allow testing in many clinical environments.
Summary of the Invention The invention is directed, in one aspect, to a visual stimulator comprising light directing means for directing light from a light source onto the entire ret-ina of a subject's eye; attenuator means for selectably ~2~
attenuating the light source; photodetector means or producing a first output signal representative of the radiant energy directed onto the subject's eye; and, signal processing means for receiving and processing the first output signal to derive thereErom urther output signals representative of the photometric or radiometric characteristics of said radiant energy. Display rneans is provided for displaying the radiometric or photo-metric characteristics so derived.
Preferably, the attenuator means comprises a light shutter which is another aspect of the invention.
The light shutter comprises a first shutter leaf affixed to a first galvanometer shaft, and a second shutter leaf affixed to a second galvanometer shaft; the shutter leaves being positioned for pivotal movement with the galvanometer shafts to attenuate light passing between the shutter leaves. Control means are provided to en-able repeated application of selectably variable current signals to the galvanometers, thereby interrupting and selectably attenuating the light source.
The first shutter leaf has a first notch and ; the second shutter leaf has a second notch. The shutter leaves are positioned to define a light attenuating aperture between the notches. The shutter leaves and notches are further positioned such ~hat pivotal move-ment of the shutter leaves varies the area o the aper-ture, thereby varying the attenuation of light by the ~; shutter. Advantageously, the notches are shaped such that the aperture area varies in proportion to the expo-nential of the distance between the shutter leaves.

6~

Advantageously, the aforementioned "further output signals" include a second output sign~l repre-sentative oE the light flux at the photodetector means.
The signal processiny means compares the second output signal with a calibration signal representative oE the light flux expected from the light source and produces an out-of-calibration alarm signal if the signals differ by more than a pre-selected amount.
Other features of the invention are defined in the appended claims.
Brief Description of th_ Drawings ; Figure 1 is a pictorial representation of a visual stimulator according to the preferred embodi-ment.
Figures 2a and 2b are, respectively, pictorial representations of front and back panels for the control console of the preferred embodiment.
Figure 3 is a block/schematic diagram of the power supply and optics control circuitry of the pre-ferred embodiment.
Figures 4a and 4b (hereinafter collectively called "Figure 4") together comprise an electronic cir-cuit schematic diagram for the control/display circuitry of the preferred embodiment.
Figures 5a and 5b (hereinafter collectively called "Figure 5") together comprise an electronic cir-cuit schematic diagram for the microprocessor and relat-ed circuitry of the preferred embodiment~
Figure ~ is an exploded view of the light shutter used in the preferred embodiment.

~.
, _ g '~

~6~7 Figure 7 is a pictorial representation of the optics portion of the flashlight sectlon oE the pre-ferred embodiment.
Figure 8 is a pictorial representation of the optics portion oE the background light section of the preEerred embodiment.
Description of the Preferred Embodiment I. Introduction:
Figure 1 is a pictorial representation of a visual stimulator according to the preferred embodiment.
A reflectively coated hemispherical stimulator bowl 10 is placed in front of the subject. The subject is fit-ted with a corneal contact electrode and is then posi tioned to look into the stimulator bowl by resting his chin on chin rest 12 and by resting his head against head rest 14. Fibre optics cables 16 and 18 convey light for illuminating bowl 10 from, respectively, a - background light source and a flashlight source (herein-after described in greater detail). Stimulator bowl 10 serves as a "light directing means" for directing light from the light sources into the subject's eyes. As an alternative ligh-t directing means, the subject could be fitted with a pair of goggles coupled to the fibre optics cables.
A control console 20 is provided to enable the selection of various operating parameters. For example~
- the operator may, with the aid of control cansole 20, control the timing, intensity, duration and chromatic filtration of light flashed in stimulator bowl 10, all as herinafter explained~ Control console 20 includes a display Eor providing the operator with a visual indica-tion o-f the backyrouncl irracliance within bowl ln and of the radiant energy of each light Elash which illuminates bowl 10.
optics box 22 contains a backyround li~Jht sec-tion for providing a controlled background irradiance which is conveyed to stimulator bowl 10 by fibre optics cable 16. Optics box 22 also contains a Elashliyht sec--tion for producing controlled flashes of light which are conveyed to stimulator bowl 10 by fibre optics cable 18.
The background light section provides controlled ambient light conditions to produce the light adaptational states required to elicit rod and/or cone response, as required. The flashlight section provides the stimu-lating light flashes necessary for ERG and VEP testing.
II. Background Light Section:
Figure 8 is a pictorial representation of the optics portion of the background light section of the preferred embodiment. The background light section in-cludes a vertically mounted light source and associated condensing optics obtained from a Rollei P350A slide projector. The light source and condensing optics includes a lightbulb 24 and associated reflector 26, converging lens 28, infra-red fil-ter 30 and a further converging lens 32. The Rollei P350A cooling fan 34 and its drive motor 36 are also used. Lightbulb 24 is a Philips FCS 24-volt, 150-wat-t liyhtbulb.
Two aluminium disks 38 and 40 are rotatably mounted above the light source. Disk 38 is fitted with three chromatic filters 42, 44 and 46 (red, blue and ~2~6~97 green) which are positioned in disk 38 for alignment over the light source as disk 38 is manually rotated.
DisX 38 also con-tains a hole having no filter which ~lay be positioned over the ligh-t source iE "white" (i.e. no) chromatic iltration is desired. Disk 40 is of the same size and shape as disk 38 and is rotatably mounted imme-diately above disk 38. Disk 40 contains four apertures 48, 50, 52 and 54 of preselected diameters which are positioned in disk ~0 for alignment over the light source as disk 40 is manually rotated. The edges of disks 38 and 40 protrude slightly from the side of op-tics box 22 so that the operator may manually rotate the disks. Magnetic stops are provided on disks 38 and 40 so that the operator may "feel" when the disks have been properly positioned with a filter or aperture in align-ment over the light source.
; A final converging lens 56 is mounted above disks 38 and 40 at the base of fibre optics cable 16.
When lightbulb 24 is illuminated, light therefrom is focused on the end of fibre optics cable 16, after fil-tration by whichever of the filters in disk 38 has been selected and after attenuation by whichever of the aper-; ~ tures in disk 40 has been selected.
III. Flashlight Section and Light Shutter:
Figure 7 i5 a pictorial representation of the optics portion of the flashlight section of the pre-~ ~ ferred embodiment. The flashlight section includes a ; vertically mounted light source and associated condens-; ing optics obtained from a Rollei P350A slide projector identical to that used in the background light section.

6~7 Three chromatic filters (red, blue and green) 58, 60 and 62 are pivotally mounted on electronicall~
controllable rotary solenoids ("filter rnovement rneansl') 64, 66 and 68 which may be electronically actuated as hereinafter described to pivot any of chromatic filters 58, 60 or 62 into or out of the light path between the flashlight section light source and fibre optics cable 18. This provides the operator with remote control over the chromatic filtration of light flashed into stimu-: 10 lator bowl 10.
The flashlight section also includes a lightshutter 70 which is mounted above chromatic filters 58, 60 and 62 between a final converging lens 72 and fibre optics cable 18.
Figure 6 provides an exploded illustration of light shutter 70. A first shu-tter leaf 74 is rigidly affixed to the meter movement shaft of a first galvan-ometer 76. A second shutter leaf 78 is rigidly affixed to the meter movement shaft of a second galvanometer 80.
The shutter leaves are positioned for pivotal movement with the galvanometer shafts to variably attenuate light passing between the shutter leaves, as hereinafter described.
A first notch 82 is cut in first shutter leaf 74 and a second notch 84 is cut in second shutter leaf 78. Shutter leaves 74 and 78 are positioned to define a light attenuating aperture between notches 82 and 84.
; Shutter leaves 74 and 78 are affixed on the shafts of galvanometers 76 and 80 such that, when no current pass-es through the galvanometers, shutter leaves 74 and 78 :

~2~

overlap one another, "closing" the aperture ~nd prevent-ing the passage of light between notches 82 and 84, thereby coinpletely attenllating the flashlight source and preventing light from that source ~rom reachi.ny stimula~
tor bowl 10 via Eibre optics cable 18.
When current signals are applied to galvano-meters 76 and 80, the galvanometer shafts pivot accordingly, causing shutter leaves 74 and 78 to pivot away from one another, "opening" the light attenuating aperture between notches 82 and 84, and enabling light to pass there-through. The arc through which each of shutter leaves 74 and 78 pivot, and the resultant aper-ture opening, are directly proportional to the magnitude of the current signals applied to galvanometers 76 and 80. The light flux allowed through the shutter is, in turn, directly proportional to the area oE the aperture opening.
Notches 82 and 84 are shaped so that the area of the light attenuating aperture between shutter leaves ` 20 74 and 78 varies in proportion to the exponential of the distance between shutter leaves 74 and 78. This is '~ accomplished, in the preferred embodiment, by giving first notch 82 a semi-circular shape and by giving second notch 84 a shape which converges in exponential ,- 25 fashion. The appropriate notch shape may be determinedJ experimentally by measuriny the attenuation of light ',~, passing through the aperture at various aperture set-tings, and then varying the shape of the notches as ~ required so that the aperture area varies in proportioni 30 to the exponential of the distance between the shutter c ,~ 14 ~,;

~2~;897 10aves. The effect is that, for relatively small aper-ture openings, the area oE the aperture is proportlonal to the exponential of the distance shutter leaves 74 and 78 have moved apart. Accordingly, the attenuatin-~
effect oE shutter 70, in dB, is approximately dlrectly proportional to the degree of rotation of the galvanometer shafts. This allows light shutter 70 not only to interrupt the flashlight source (by selectably opening or closing the light attenuating aperture), but also to attenuate the flashlight source over a range of about zero to 40 dB.
Galvanometers 76 and 80 are mounted beneath a 1/8th inch thick aluminium plate 86 with the aid of screws 88. Final converging lens 72 is mounted on the bottom of plate 86 with the aid of lens holder 90. A
1/32nd inch thick stainless steel plate 92 is mounted on top of plate 86 to provide a wear-resistant surface for shutter leaves 74 and 78. Shutter leaves 74 and 78, which are cut from a piece of .005 inch thick stainless steel, move across the surface of plate 92. Another 1/32nd inch thick stainless steel plate 94 is mounted immediately above shutter leaves 74 and 78 with the aid of spacers 96. Plate 94 prevents vertical fluttering of ; shutter leaves 74 and 78. A 1/16th inch thick aluminium plate 98 is placed on top of plate 94 to provide a mounting surface for connector 100 to which fibre optics cable 18 is attached. Connector 100 also prevents stray light from bypassing the shutter. Stove bolts 102 and associated nuts and washers are used to hold plates 86, 92, 94 and 98 together.

~2~L6~

IV. Stimulator Bowl:
Stirnulator bowl 10 is formed from plexiglass in a hemispherical shape and coated on the inside ~lith Eastman Kodak ~o. 6080 white reflectance coatiny~ ~tirn-ulator bowl 10 i5 supported from the rear on a yoke (notshown) which is mounted on a ball and socket joint and supported on a steel-pipe stand 104 manufactured by Li-Ee-Tech :Cnstruments, Inc. of Houston, Texas. optics box 22 is mounted on pipe stand 104 as shown in Figure 1.
Fibre optics cables 16 and 18 convey light, respectively, from the background and flashliyht sec-tions of optics box 22 to stimulator bowl 10. Fibre optics cables 16 and 18 are connected to the bottom of : 15 stimulator bowl 10, adjacent to its outer rim, behind reflector 106 which disperses light evenly over the inner surface of stimulator bowl 10.
A solid-state photo diode 108 is mounted in stimulator bowl 10 on top of head rest 14 to detect radiant energy directed into the subject's eyes from stimulator bowl 10. Photo diode 108 produces a tlfirst"
output signal representative of the radiant energy directed into the subject's eyes for processing as hereinafter described.
~ pair of red light emitting diodes 110, 112 are mounted in the back of stimulator bowl 10 to facili-tate FOG testing as hereinafter described.
~ V. Control Console:
: Figures 2a and 2b are, respectively, pic-torial ~68~7 representations of the front and back panels of control console 20.
The front controL panel (~Flgure 2a) is divided into two separate segments labelled, respectivel~ RG"
and "EOG". The segment labelled "ERG" may be used to control the vlsual stimulator when ERG measurements are to be obtained, or when flash VEP measurements are desired. The segment labelled "EOG" may be used to control the visual stimulator when EOG measurements are to be obtained.
A switch 114 is provided for turning back-ground lightbulb 24 on or off. Light emitting diode 116 is turned on when switch 114 is in the "on" position to provide the operator (who may be separated from the sub-ject and from stimulator bowl 10) with a visual indica-tion of whether the background light source is on or o~f.
A four-position switch 118 serves as a filter position selection means with which the operator may select one of chromatic filters 58, 60 or 62 for posi-tioning in the light path between the flashlight section light source and fibre optics cable 18 to chromatically ~ filter the -flashlight source. The four positions of ; switch 118 are marked, respectively, "W", "R", "B" and ~- 25 "G" corresponding, respectively, to white (i.e. no) chromatic filtering, red chromatic filtering ti.e.
rotary solenoid 64 is actuated to position red chromatic ` filter 58 in the light path between the flashlight f . section light source and fibre optics cable 18), blue chromatic filtering and green chromatic filtering.

.~
'f~
.'.

A pair of thumb-wheel switches 120 are cali-brated, as hereinafter described, to contro:L the attenu~
ation of the flashlight section light source b~ enabling the application of selected current signals to yalvano-meters 76 and 80, thereby selectably pivoting shutter leaves 74 and 78 to vary the opening of the light atten-uating aperture between the leaves. Thumb-wheel switches 120 are calibrated to read off directly in d~, with a dynamic range of zero through 39 dB, correspond-ing to the 40 dB attenuation capability of light shutter 70.
A three-position switch 122 permits the opera-tor to trigger the flashlight section light source to produce either a single flash sequence, or a repetition of flash sequences in stimulator bowl 10. For example, by depressing switch 122 from its normal "off" position to the "singlel' position, the operator will cause shut-ter leaves 74 and 78 to pivot apart (the degree of pivoting, and the resultant attenuation being determined by the setting of thumb-wheel switches 120), thus trig-gering a single light flash, or flash pair, in stimu-lator bowl 10. By holding switch 122 in the "repeat"
position, the operator will cause shutter leaves 74 and 78 to repeatedly pivot apart and close, thus repeatedly interrupting the flashlight source and illuminating stimulator bowl 10 with a series of flash sequences.
The rate at which Elashes are produced when switch 122 is in the "repeat" position may be controlled by the operator with the aid of three-position switch 124. When switch 124 is in the "low" position, the ~2~

flash repetition rate may be varied Erom .2 to 2 He-rt~
by adjusting low frequency trimpot 146 (Figure 2b).
When switch 124 is in the "high" position, the fla~h repetition rate may be varied from 27 to 33 ~lertz by adjusting high frequency trimpot 148 (Eigure 2b). When switch 124 is in the "double" position, two flashes are sent in rapid succession, the time interval between successive flashes being determined by the setting of double interval adjustment trimpot 136 (Figure 2b) as hereinafter described, and the frequency of the flash pair being dependan-t upon the setting of low frequency trimpot 146.
When switch 124 is in either the "low" or "double" positions, a pre-trigger pulse is output from pre--trigger ~NC jack 140 (Figure 2b) immediately before the flash, to allow triggering of a signal averaging device before the flash occurs. The length of the pre-triyger pulse may be adjusted with the aid of pre-trigger trimpot 138 (Figure 2b) as hereinafter described. When switch 124 is in the "high" position, no pre-trigger pulse is sent and the flash length is held constant at 15 milliseconds.
The flashlight section lightbulb is controlled by electronic circuitry in order to minimize "on" time and therefore prolong its life. This may sometimes cause a slight delay of the flash. For example, when switch 122 is actuated for the first time after the apparatus has been turned on, the ac-tual triggering of the flashlight section lightbulb is delayed for about one second to allow the lightbulb to turn on and reach , its full intensity~ Subsequent actuation of switch 122 should cause immediate illumination oE stirnulato~ bowL
10 by the Elashlight section liyhtbu:Lbl unless more than about five minutes have elapsed since the last flash.
The flashlight section lightbulb is automatically switched off if liyht shutter 70 is not triggered for at least five minutes to produce a light flash in stimu-lator bowl 10.
A green light emittiny diode 126 is illuminat-ed for the full duration of each flash to give the oper-ator a quick visual check on the flash frequency and duration. Since the operator is often separated from the subject and from the stimulator bowl, this feature may be of considerable assistance -to the operator.
Display 128 includes a three-digitl seven-segment light emitting diode display for providing the operator with an indication of the photometric or radio-metric characteristics of the flash radiant energyl such as the irradiance in stimulator bowl 10 (in microwatts per square centimeter) or the radiant or illuminance energy of the last flash used to illuminate stimulator bowl 10 (in microjoules per square centimeter). A two-position switch 130 permits the operator to select the measurements appearing in display 128 by moving the switch between the "flash energy" and "irradiance"
positions.
Light emitting diode 132 is illuminated if the - light flux detected at photo diode 108 differsl Eor three successive flashesl from the expected light flux by more than a pre-selected amount. Illumination of ;

~æ~6~7 liyht emitting diode 132 constitutes and alarm siynal to notify the operator that the apparatus is out of cali~
bration. Light emittiny diode 132 is ex~inyuished as soon as the light flux detected at pho-to diode 108 does not deviate from the expected light flux hy mo~e than a pre-selected amount.
Flash length adjustment trimpot 134 (Figure 2b) facilitates adjustment of the flash length from 10 to 320 milliseconds in 10 millisecond steps. r~ouble interval adjustment trimpot 136 facilitates adjustment of the time interval between flash pairs (produced when flash ra-te switch 124 is in the "double" position) from 100 to 730 milliseconds in 10 millisecond steps. Pre-trigger interval adjustment trimpot 138 facilitates adjustment of the length of the pre-trigger interval pulse (output at BNC jack 140) from 10 to 80 milli-seconds in 10 millisecond steps.
Trimpots 134, 136 and 138 are enabled only when calibration switch 142 is moved from its normal "off" position into the "on" position. When calibration switch 142 is in the "on" position, calibration selec-tion push-button 144 may be depressed to select one of trimpots 134, 136 or 138. When calibration switch 142 is in the "on" position, one of the messages "flash length", "double interval" or l'pre-trigger interval"
will be displayed at the right side of display 128, depending upon which of trimpots 134, 136 or 138 has been seIected with the aid of calibration selection push-button 144. For example, the message "flash length" appears at the right side of display 128 if ~Z~6~

callbration selection push-button ]44 has been depressed to enable flash length adjustment trirnpot 134. ~n this case, -the three-digit~ seven-seyment portion of ~isplay 128 provides the oL~erator with a visual ~eading oE the flash length in milliseconds. After adjustiny the flash length with the aid of trimpot 134, the operator may then depress calibration selection push~button 144 once, to enable double interval adjustment trimpot 136. This will be indicated by the appearance of the message "double interval" in the right portion of display 128.
In this case, the three-digit, seven-segment portion of display 128 provides a readout, in milliseconds, of the time interval between successive flash pairs. After adjusting that time interval with the aid of trimpot 136, the operator may again depress calibration selec-tion push-button 144 once to enable pre-trigger interval adjustment trimpot 138. This will be indicated by the appearance of the message "pre-trigger interval" in the right portion of display 128. In this case, the three-digit, seven-segment portion of display 128 provides a readout, in milliseconds, of the length of the pre-trigger pulse, which may be adjusted with the aid of trimpot 138.
Adjustment of any of trimpots 134, 136 or 138 when calibration switch 142 is in the "off" position has no effect, unless the visual stimulator apparatus is turned off and on again. This is because the settings of trimpots 134, 136 and 138 are "read" only when the apparatus is first turned on, or when calibration switch 142 is in the "on" position.

.

~æ~L68~7 BNC jack 150 facilitat~s connection of e~ter-nal devices for triggering the visual stimuJator. Ap-plication of a volta~e potential of between 2.~ and 25 volts at jack 150 will trigger the flashlic3ht section to produce a flash or flash sequence in stimulator bowl 10 according to the settings of switches 120, 122 and 124.
The voltage potential at jack 150 should not exceed 30 volts (to avoid damaging voltage comparator 246 herein-after described) or a frequency of 50 Hertz ~since this frequency approaches the limit of the ligh-t shutter's mechanical capability).
A .1 volt signal is presented across the ter-minals of BNC jack 152 whenever light shutter 70 is opened. This signal may be recorded concurrently with the subject's ERG response, etc. for correlation of the ERG response with the opening of the shutter.
BNC jacks 153, 155 and 157 facilitate coupling the apparatus to the "X"~ "Y" and "penlift" output ports of a conventional signal averaging device. Such devices are routinely used in ERG testing -to average and ampliy ERG response signals obtained from the subjec-t and to drive an X-Y plotting device to produce a graphical representation of the ERG waveform by plotting electri-cal potential (in uV) as the ordinate versus time (in milliseconds) as the abscissa. By continually monitor-ing the signal at "penlift" port 157, -the software which controls the operation of the preferred embodiment may determine whether or not any plotting is to be done.
Analog data passed from the "X" and "Y" ports of the signal averaging device is digiti~ed by the visual stim-~2~6~97 ulator apparatus and then passed to a plottiny de~ice (not shown) via KS232 connector 159. In addition to digitizing the data, the visual stimulator appara'~us determines the maxima and minima oE the ERG waveform ~nd flags the~ with special symbols on the yraph plotted on the plotting device. The visual stimulator apparatus also calculates the difEerence (in uV) between the maxima and minima of the ERG waveform and prints that value on the graph plotted on the plotting device. The ti~e interval (in milliseconds) between the start of the light flash and a-ttainment of the ERG waveform maximum is also calculated and printed on the graph. The attenuation (in ds), flash length (in milliseconds), chromatic filtering ("white", "red", "blue" or "green"), calibration status ("OK" or "error") and time the flash occurred (with respect to the time axis of the graph) are also annotated on the graph to produce a one-page documentary sumrnary of the ERG test.
The "EOG" segment of control console 20 pro-vides both "manual" and "automatic" modes of operation which are selected with the aid of two-position switch 1540 EOG electrodes attached to the subject are coupled ; to the apparatus ~through external amplifiers - not shown) via BNC jacks 225 and 227 (Figure 2b).
When switch 15A is in the "auto" position, EOG
light emitting diodes 110 and 112 in stimulator bowl 10 ~Figure 1) are alternately illuminated and extinguished over five EOG cycles in each minute of a 30-minute time span. The EOG cycle frequency may be varied from .2 to
2 Hertz by adjusting EOG rate trimpot 156 (Figure 2b)o The flrst 15 minutes of the test is conducted in dark adapted conditions (i.e. background lightbulb 2~ is off) and the last 15 minutes of the test is condu~ted in light adapted condltions (i.e. background lightbulb 24 is on).
The apparatus determines, in respect of the previously mentioned five EOG cycles of each minute dur-ing the 30-minute span, the amplitude of the EOG wave-form and stores that value in a memory device. At the end of the 30-minute span a hard-copy record is produced on an X-~ plotting device (not shown) via RS232 con-` nector 159 (Figure 2b) by plotting the EOG amplitude (in ` uV) as the ordinate versus time (in minutes) as the abscissa. Separate traces are plotted for each eye, on the same shee-t of paper. The apparatus also determines and prints on the graph, the light rise ratio which is the peak amplitude during light adaptation divided by the lowest amplitude during dark adaptation. According-ly, a compact record of each EOG testing session is produced, which simplifies analysis of the results.
A TTL compatible s~uare wave signal synchron-ized with the EOG light fre~uency is provided at the output of BNC connector 158 (Figure 2b) for use in monitoring EOG tests.
~` 25 When switch 154 is in the "manual" position, EOG light emitting diodes 110 and 112 are illuminated only if either of push-buttons 160 or 162 are pressed.
~ Pressing "left" push-button 160 forces the left hand EOG
'~ light emitting diode 110 "on" for as long as the button is held down, regardless of the position of switch 154.

l''~

~L2~ ~7 Similarly, pressiny "right" push-button 162 forces the right hand EOG light emitting diode 112 "on" regardless of the position of switch 154. Light emittin~J diodes 164 and 166 are illuminated, respectively, whenever EOG
light emitting diodes lln or 112 are illuminatec3, p~o-viding the operator with a visual inclication of the status of the EOG li~ht emitting diodes 110 and 112.
VI. Attenuation Calibration of Light Shutter:
Light shutter 70 is actuated, as hereinafter described, with the aid of an eight bit digital to ana-log converter. Accordingly, there are 256 possible set-tings for the area oE the light-at-tenuating aperture de-fined by notches 82 and 84 in shutter leaves 74 and 78.
The numbers zero through 255 may thus be used to repre-sent the possible range of aperture settings. To cali-brate attenuation thumb-wheel switches 120, one of the possible 256 shutter settings must be selected to cor-respond to each of the 40 possible positions oE thumb-wheel switches 120 (thumb-wheel switches 120 may be positioned to show the numbers from zero through 39 to define the 40 possible settings which correspond to the 40 dB attenuation capability of light shutter 70).
Calibration of switches 120 should only be necessary if characteristics of the flashlight section light pathway or of the electronic circuitry controlling light shutter 70 change. It may, for example, be necessary to recali-brate switches 1~0 if stimulator bowl 10 is recoated, if shutter leaves 74 and 78 are removed from yalvanometers 76 and 80, if any electronic components in the shutter ;' :~2~6~

control circuitry or power supplies are chanyed, etc.
Calibration may be done manually or automatically.
Before entering the automatic calibration mode, the operator should eliminate any sources of ambient light in the vicinity of stimulator bowl 10 so that the calibration will be done at zero background irradiance. Automatic calibration is initiated by mov-ing calibration switch 142 (Figure 2b) to the "off"
position and then depressing and holding down calibra-tion selection push-button 1~4. The numerals ~oon~
(representing the initial attenuation setting of 0 dB
corresponding to a wide open aperture) are initially displayed in display 128 and the apparatus waits until the irradiance measured in stimulator bowl 10 equals zero. Once a zero irradiance value is detected the apparatus cycles through the range of possible attenua-tion settings, triggeriny light shutter 70 and measuring the resultant radiant energy in stimulator bowl 10 at each attenuation setting. The current attenuation setting, in dB, is displayed in display 128.
If the light flux detected at photo diode 108 differs, at a given aperture setting, and for three successive flashes, by more than a pre-selected amount from the expected light flux, then the apparatus search-es for a different aperture setting which will yield theexpected light flux. When the appropriate aperture setting is found, it is stored in a calibration table maintained in a memory device. Automatic calibration continues in similar fashion for each possible aperture setting, and may be aborted at any time by releasing - ~7 -:3LZ~68~7 calibratlon selection push-button 144. Automatic calibration facilitates simple, rapid calibration oE the apparatus to compensate for changed optical conditions such as lightbulb decay, movement of the various lenses, wear of shutter leaves 74 and 78, etc.
The manual attenuation calibration rnode faci-litates complete external calibration of the device. To enter the manual attenuation calibration mode, calibra-tion switch 142 must be toggled at a rate slightly less than .5 Hertz. Since normal operation of the visual stimulator apparatus should never call for such toygling of switch 142, inadvertant entry of the manual attenua-tion calibration mode should be avoided. Light emitting diode 132 remains "on" throughout the duration of the manual attenuating calibration mode.
When the manual attenuation calibration mode is first entered, and provided switch 13n is in the "irradiance" position, the three-digit, seven-segment portion of display 128 provides a visual indication of the present attenuation calibration setting for each position of thumb-wheel switches 120 (i.e. a number between zero and 255 appears in display 128 Eor each of the 40 possible positions of thumb-wheel switches 120, depending upon the previous calibration). Moving switch 130 to the "flash energy" position causes the radiant flash energy of the last light flash which illuminated stimulator bowl 10 to be displayed (in microjoules per square centimeter) in the three-digit, seven-segment portion of display 128.
~ 30 ; - 28 -6~

Calibration switch 142 and calibration selec-tion push-but-ton 144 are used to chanye the calibration settings of thumb-wheel switches 120~ Calibration switch 142 is moved to the "on" position iE it 1s desir-ed to change the attenuation calibration setting appear-ing in display 128 to a higher value, or to the "of"
position if it is desired to change the attenuation calibration setting to a lower value. Calibration selection push-button 144 is then pressed to change the attenuation calibra-tion value. The attentuation cali-bration value changes relatively slowly for the first four counts and then relatively rapidly thereafter. The operator may, at any time, use flash trigger switch 122 to produce a light flash within stimulator bowl 10 in ; 15 order to obtain a measurment of the radiant energy at the current attenuation calibration setting. The manual attenuation calibration mode may be exited at any time by again toggling calibration switch 142 at a rate slightly less than .5 Hertz.
A typical manual attenuation calibration session may accordingly proceed as follows:
(1) Adjust the flash length to the desired value with the aid of flash length trimpot 134 since it cannot later be changed during the manual attenuation calibration sequence.
(2) Enter the manual attenuation calibration mode ; by toggling calibration switch 142 at slightly less than .5 Hertz.
(3) Move display selector switch 130 to the "ir-radiance" position to cause attenuation cali-i` - 29 -:

6~7 bration settinys to appear in the three~digit, seven-se~rnent portion oE display 128.
(4) Adjust thu~h-wheel switches 120 to the "00"
position (corresponding to an attenua-tion of 0 d~). The value "2S5" should appear in dis-play 128 corresponding to a "wide open" sett-ing of light shutter 70 and no attenuation of the flashlight source.
(5) Produce a light flash in stimulator bowl 10 with the aid of flash trigger switch 122 and use an accurate radiometer to measure the radiant energy of that flash.
(6) Adjust thumb-wheel switches 120 to the "01 dB"
position and experiment with different at-ten-uation calibration settings until the radiant energy of flashes produced in stimulator bowl 10 is 1 d~ down from the radiant energy of flashes produced at the previous attenuation setting of switches 120.
(7) Repeat step 6 by advancing switches 120 through all 40 possible settings.
(8) Exit the manual attenuation calibration mode by toggling calibration switch 142 at a rate slightly less than .5 Hertz.
25 VII. Microprocessor and Electronic Circuitry:
, An Intel 8085 microprocessor (Figure 5) con-trols the electronic circuitry in the preferred embodi-ment. Three Intel 2732 erasable programmable read only i~ ~
memories ("EPROM") 170, 172 and 173; two Intel 2142 sta-tic random access memories ('IRAM") 174 and 176; and .~

t .

ii~7 two ~icor X2210 electronically erasable proyra~nahle read only memories ("EEPROM") 178 and 180 are used to store the logic programs defining the sequsnce oE opera-tions by which mic.roprocessor 168 controls the operation oE the visual stimulator and to store volatile data.
(The aEorementioned attenuation calibration tables are maintai.ned in REPROMs 178 and 180. Accordingly, since these devices are capable of retaining data when power is switched off, the attenuation calibration tables are not lost when the power i.s switched oEf.) A National Semiconductor 74LS138 memory select integrated circuit 182 Eacilitates selection of the memory devices as follows:

Address Range (~lexadecimal) Memory Device 1000-lFFF EPROM 172 3000-33FF RAMs 174 and 176 4000-403F EEPROMs 178 and 180 An Intel 8212 latch integrated circuit 184 is used to latch the lower eight bits of the address bus from data/address bus 186 at the falling edge of the address latch enable ("ALE") signal produced by micro-processor 168 Input/output ("I/O") operations are handled by ; the integrated circuitry depicted above data bus 186 in ; Figure 5. 10k ohm pull-up resistors are used on all digital inputs to microprocessor 168. Such inputs are gated with the aid of Motorola 74LS244 tri-state buffers ~ 30 L68~

188, 190 and 192. The Elve eight-bi-t digi-tal output ports "oUIrl", "OUT2", "O~T3", "OUTDl" an~ "OUTD2" are latched by Intel 8155 integrated circuits 194 and 196.
A National Semiconductor ~DC0816 analoy to digital converter 198 converts analoy voltac~e signals in the 0 to 3.6 volt range into digital Eormat. ~ lN4729 zener diode 200 defines the 0 to 3.6 volt input range of analog to digital converter 198. This ensures maximum quantization of the 0 to 3.5 volt output ranye oE the National Semiconductor LM324 operational amplifiers hereinafter described. The analog output is accomplish-ed by a National Semiconductor DAC0808 digital to analog converter 202 which is driven by one of the output ports. A second National Semiconductor 74LS138 shown at 204 in Figure S is used to select the appropriate I/O
chips during an I/O operation.
A National Semiconductor 74LS138 integrated circuit shown at 206 in Figure 5 is used to produce a 400 nanosecond pulse when an I/~ "read" or "write"
occurs to locations A0 through A7 (which are dedicated to the performace of I/O functions by the specific microprocessor used in the preferred embodiment). This pulse enables s-torage and recall of data from the memory devices under software control.
Microprocessor 168 is driven at three mega-hertz with the aid of a 6.144 megahertz crystal 208.
Clock pulses for triggering analog to digital converter 198 are obtained by dividing the "CLK" output signal produced by microprocessor 168 by eight with the aid of National Semiconductor 74LS161 divider 210.

~IL2~61~

An Intel ~251~ integrated ci:rcui.t shown at 207 in Figure 5 produces serial data output which yates a 2N3906 switching transisto.~ to produce an RS232 ~5 volt output signal for driving a plotter via R~232 con-nector 159. Clock signals Eor driviny integrated cir-cuit 207 are obtained from integrated circuit divider 210 and further divided by a National Semiconductor 74L~90 divide-by-10 integrated circuit 209.
Connector 212 couples microprocessor 168 and its related circuitry to the control panel circuitry shown in Figure 4 with the aid of mating connector 214.
Most of the signals obtained from the switches on control console 20 are fed directly to microprocessor 168 via the I/O circuitry shown in Figure 5 above data base 186. An exception is the "left" and "right" EOG
push-buttons 160 and 162 which directly gate light emitting diode pairs 110/164 and 112/166.
Calibration trimpots 134, 136 and 138 yield voltages in the range of 0 to 3.6 volts which are fed, respectively, into channels 3, 4 and 2 of analog to digital converter 198.
The input signal at "penlift" BNC jack 159 is directly input to channel 6 of analog to digital con-verter 198. The input signals at "X" and "Y" BNC jacks 155 and 157 are input, respectively, to channels 7 and 8 of analog to digital conveter 198 via National Semicon-` ductor LM324 operational ampli:Eiers 221 and 223. The .~ output signals produced by EOG electrodes applied to thef subject are input, respectively, (through external amp-` 30 lifiers - not shown) via BNC jacks 225 and 227 (Figure ,~ .

68~9'7 2b) to channels 9 and 10 of analog to digital converter 198.
Light emittinq diodes 126 and 132 have a current limi,ting 180 ohm resistor driven by a 2N3906 switching transistor~ The ~ecimal points oE the three-digit, seven-segment digital display 128 are driven in the same ~anner, with a discrete light emitting diode 222 used to provide the fourth decimal point to facili-tate the display of numbers in the range ".001" through ".009". Light emitting diodes 224, 226 and 228 are placed behind message cutouts positioned in the right hand portion of display 12~ to illuminate the messages during calibration with the aid of trimpots 134, 136 and 138. Three General Instrument MAN6780 seven-segment light emitting diode displays are used in display 128.
Three Fairchild 9358 decoder driver integrated circuits 232 with on-board current limiting are used to power light emit~ting diodes 230.
BNC jack 152 is coupled to a resistive poten-tial divider 234 used to obtain a .1 volt signal with the aid of a 2N3906 drive transistor 236 which is soft-ware gated. "Pre-trigger" BNC jack 140 is driven by a 2N3906 drive transistor which is also gated by software.
A lk ohm current limiting resistor 240 is placed between drive transistor 238 and BNC jack 140.
Only the "RST 6.5" and i'RST 7.5" interrupts of microprocessor 168 are used. The two clock signals Eor the RST 6.5 interrupt are provided by a National Semi-conductor 556 integrated circuit shown at 242 in Figure 4. Low frequency trimpot 146 and high frequency trimpot :

~L2~

1~8 facilitate adjustment o the clock frequencies pro-vided by each half of integrated circuit 242. The clock output signals provided by each halE of integratecl cir-cuit 242 are gated through Motorola 40()1 NUR gates 2~4 to facilitate software selection of the RST h.5 inter-rupt frequency, BNC jack 150 facilitates connection of an external device to trigger the RST 6.5 interrupt and consequently the flashes produced in stimulator bowl 10.
The signal from BNC jack 150 is fed into a National Semiconductor LM339 voltage comparator integrated cir-cuit 246 having a threshold of 2.5 volts determined by a resistor divider~ Increasing the input voltage over the 2.5-volt threshold causes the presentation of a falling edge to Motorola 4528 monostable multivibrator 248 ; 15 which, in turn, produces a controlled pulse of about 10 milliseconds duration. The two clock signals produced by the two halves of integrated circui-t 242 and the pulse produced by monostable multivibrator 248 are "OR'd" by a Motorola 4025 NOR gate 250 and a Motorola 4049 integrated circuit inverter 252 for input to the "RST 6.5" input terminal of microprocessor 168. The RST
7.5 interrupt is clocked every minute by the "CLK" sig~
nal produced by microprocessor 168 which is in turn sub-- divided by two software controlled Intel 8155 timers 194, 196 before presentation to the "RST 7.5" interrupt terminal of microporcessor 168.
The frequency of EOG lights 110 and 112 is determined by a National Semiconductor 555 integ-ated circuit configured as an as-table multivibrator, shown at 254 in Figure 4. The EOG frequency may be adjusted from ~2~6~

.4 to 4 Hertz with the aid of trimpot 156. This -fre-quency is divided by two by Motorola 4013 "~" flip-Elops 2S6. The complemented outputs oE flip-Elop 256 are software yated with the aid of a pair oE Motorola 4001 N~R gates 258. The outputs of NO~ yates 258 are then "NOR'd" with the output signals produced by ~OG "leftt' and "right" push-buttons 160 and 162, thus enabling the push-buttons to override the "automatic" trigyering of EOG lights 110 and 112. The "left" and "right" signals then each gate 2N3906 transistors 260 which, respect-ively, switch light emitting diode pairs 110/1~4 and 112/166.
Current signals produced by photo diode 108 in stimulator bowl 10 create a voltage potential across 10k ohm resistor 262. The resultant voltage is low pass filtered and amplified with the aid of an RCA 3140 inte-grated circuit 264 which is configured as a vol-tage followerO The resulting signal, which is representative ; of the background irradiance in stimulator bowl 10, is amplified by a National Semiconductor LM324 operational amplifier 266 and presented to channel 0 of analog to digital converter 198. The voltage potential obtained from voltaye follower 264 is also used as the refarence level Eor a second RCA 3140 integrated circuit 268 which integrates any potential above this leval (i.e. any light pulses above the ambient light level) onto a .1 microfarad capacitor 270 when Motorola 4016 switch 272 is "on". Capacitor 270 is discharged by Motorola 4016 switch 274 whenever a pre-trigger pulse is software triggered via transistor 238. Switches 272 and 274 are :

~Z~6~

each software driven with the aid oE 2N3906 transistors 236 and 238.
The voltage signal representative oE the back-ground irradiance in stimulator bowl 10 is subtracted from the integrated flash racliant energy with the aid of National Semiconductor LM32~ differential amplifier 276.
The resultant signal, which is representative of the radiant energy in stimulator bowl 10, is amplified by a second National Semiconductor LM324 operational ampli-Eier 278 and presented to a third National SemiconductorLM324 operational amplifier 280 which filters out any negative potentials which might harm analog to digital converter 198. The resultant signal is then presented to channel 5 of analog to digital converter 198 for further processing to derive therefrom further output signals representative of the radiometric or photometric characteristics of the radiant energy in s-timulator bowl 10, such as radiance, irradiance, radiant Elux, lumin-ance, illuminance, luminous flux, etc. as may be desired. In particular, in the preferred embodiment, one such further output signal is a "second" output signal representative of the light flux at photo diode 108. The "second" output signal may be compared with a calibration signal (provided by the software from a look-up table) representative of the light flux expected from the flaslight source for a given aperture setting of light shutter 70, thus facilitating attenuation cali-bration of the light shutter as hereinbefore described.
With reference to Figure 3, the llO-volt alternating current line voltage is filtered by a General ~lectric V130L~20A varistor 282 and ~ .1 micro-farad capacitor 284. The line voltage is then switched by the main on/off switch 286 Eor presentation ~o the various power supp:Lies.
A -~5 volt signal is obtained with a model HBB5-3 Power-One power supply 288. The power supply for background lightbulb 24 (which is a Philips FCS 24-volt, 150-watt lightbulb) comprises a 25-volt, seven-amp transformer 289 whose primary is switched by a Crydom D1202 relay 216 which is in turn software controlled by background light switch 114. ~ackground light source cooling fan 34 is on whenever switch 286 is in the "on"
position.
A Crydom D1210 solid-state relay 290 control-led by a software driven 2N3906 switching transistor 292 (Figure 4) controls a second 25-volt transformer 293 which powers another Philips FCS 24-volt, 150-watt lightbulb 295 which serves as the light source in the flashlight section. A 200-volt, 8-amp bridge rectifier 294, a 75-volt, 4200 microfarad ripple filtering capac-itor 296 and a National Semiconductor LM350 voltage regulator 298 are used to regulate the secondary output voltage of transformer 293 to 27 volts. A lN4002 diode 300 is placed backwards across voltage regulator 298 to protect it from residual back currents after the power ~ supply is switched off. The 27-volt supply is used to ; drive rotary solenoids 64, 66 and 68 and galvanometers 76 and 80.
; Rotary solenoids 64, 66 and 68 are software controlled with the aid of 2N3906 switching transistors ~ 38 -.~

~2~

302 which saturate Motorola 4N2g optical isolators 304.
The switched output of optical isolators 304 is used to gate MJE2955 power transistors 306 which, in turn, switch on Ledex model A-35235-035 rotary solenoids ~, 66 or 68. lN4004 diodes 308 suppress the reverse EMF of solenoids 64, 66 and 68.
The current output from digital to analog con-verter 202 directly drives another Motorola 4N29 optical isolator 310. The current regulated output of optical isolator 310 creates a voltage potential across lk ohm trimpot 312 directly proportional to the output current of digital to analog converter 202. Trimpot 312 con-trols the master gain of light shutter 70. The output from trimpot 312 is -fed to a National Semiconductor LM324 operational amplifier 314 which is configured as a voltage follower. The output signal from voltage fol-lower 314 is amplified by a second National Semiconduct-or LM324 operational amplifier 316. The amplified out-put signal biases Motorola MJE3055 power transistor 318 which regulates the drive current for galvanometers 76 and 78. A feedback loop through lOk ohm resistor 320 improves the step response of light shutter 70. Back-to-back lN4736 zener diodes 322 suppress the reverse EMF
of galvanometers 76 and 78. Galvanometers 76 and 78 are each M.F.E. model R4-155 galvanometers.
The values of electronic components not speci-fically described herein are shown in the drawings.
V[II. Softwareo Appendix "A" to this specification is a 45 page source code listing for a computer program develop-~`

~2~6~7 ed for the preferred embodiment. The computer prog-ram is written in the "C" prograrnming language. It i5 be-lieved that the computer p:rogram listing, toyethe:r with the many explanatory comments embedded therein, wi:L:L
enable those slcilled in the art to understand the oper-ation of the computer program.
As will be apparent to those skilled in the art, in the light of the foregoiny disclosure, many alterations and modifications are possible in the prac-tice of this invention without departing from the spiritor scope thereof. Accordingly, the scope of the inven-tion is to be construed in accordance with the substance defined by the following claims.

Barrigar & Oyen Patent Agents for the Applicant ~ Z ~ ~? ~ 7 APPEND I X A

'?~ J~?'?ti~ ***~ *~*~*~ ***~'~t~**~ *~*~ ?.~?~*~t***~*~ **~**~*~***~/
L'?EF I r~E
?'st~ ?~*~-~*~*~
,~ ~ s' /
'~ T~lls routlne ~e~lnes th three strl.~ctures nerussar~ for ~?lrect accesslns sPeclflc PartS of the l~a~lor~/i ana al! ~he ~ePlnL-t1ons use~i slDba~ b~,~ the ~ra~r~
~?~ */
*/
~*~'~*~ *?~**~r~*******~***~*~**i~4*****-~*~i~-~?~*~ J~**~***~*~ *~**~/
/; The Yollo~ ns structlJres are use~ to trlc~; the ~ a3e Into refer- */
/* In~ to taoles store,~ il sPeclf~c sPots ln l.lelnore. ?t/
~;~ The ,~-natural Prosr~l~l 'h~rers.~3' stores the ,~I~Pla~ callbratlor, */
taole Por the barKsroun~ lisht in t~le ~PR~M Illemor/ star~,lns at */
~* loc3tlan 44 ~he:~). Thls ,tr~lcture liePInes a referencQ to that */
/* taole.
s t r u c t beqlrl unsl~ned shart b_ta~leC~56~:
en~l;
#,~eflne t_bac~; ~Q~ 4-~b_table) ~ The A-l?atural Prcsra~ 'h~irer~.8' stores the ~IsPla~ callbrat1on *~
/~ table tor t.he tlash eners~t In the ~Ph~ me~lor~ start1ns at */
/* locatlon ~45 ~he:(~. rhls structure det`1ne-, a reterence to that ~/
/~ t~lnle. ,~
- t r u c t b e s l n unslsne~ shart ~_tableC~55~;
el~d~
et`lne t_t`lasn l~?x~4C - ;~f_tabLe) hls ~tructure oet'lnes a ret'erence to the taDle In the ~EP~Ort whlc.q -~
alihrates t~e 3tte~uatl0n settlns on the control Panel to t~e *~
~* aFProQrlate shutter aPenlns. *~
ruct besln unsl~ne-i char c_table~4];
` end ieflne t_cal IO:t4~00-"c_table) !~ Ir)Put Part ~tefLI lt~ons for the varlous 3n~10s to ~lsl~.31 conl./en~lons ~,~
J~ th~t set the analo~ tlP1e:ter an~ sGart the con~.~erslon ~/
H-~efll-e ~D_P~K ~uE~ ac~;sro~lnd llsnt ~Irr-~dlance~ ln t~e ~owl ~;.te~ine f~ 12l~ LE ()xE4 J* Trln~r~ot a~Just~nent t'or lnterlJal bstween ~t~
double flashes ~/
eflne f~O .FLf~SH (~:~ES /-~ Flash eners:~ 1n ~ne howl H~eFlr,e ~ .if~L~.10 I!~tE~ Trll"Pot a~JI.lstl-lent For len,th o& t'lash 'f.~
~',t~ne ~ EOU ~ t ~O~ sl~nal */
lef lne f~O._PE~I O~(t-~ en uP or ~o~-ln t`roln the slsna! a~eraser ~/
h'ie~lne f~D_TR~ F. ~0 Tr1,~Pot a-~JI.lsth~ent ~'or Pre-trlsser ~nte~uaL*/
t~e&lne ~D_~_EOC~ E9 ~ ~lcnt ~O~. sl3n~

6i~

1t1eflne ~O_~' O~tE7 /~ ,~ axls t'rom the slsnal auera~er ~/
~,ieflne ~ ' O~E3 ~* Y a~ls t'rom t~le slsn.-~l alJera~er ~/
eflne COMl Ox80 /* Com1llan~ recllster f~r the Intel t31~ chl~ J~/
/* that han.iles all the ou~ut F~Qrts excePt ~t /~t the ~iictltal ,iisPla~
ieflne CO~? OxCO ~* G~onlm~n~ re~lster ~'or th~ Intel ~155 chlP */
/~ ~hat han~ile5 the OUtf'l.~t Port5 for th~
i l 9 i t ~ i i 9 P ~ * /
~ief`lne ~U~ VxC10 /* Caml.lonl~ use~ urlns an 'out' Instructlon ~/
~* when Qnl~ the ai~ress ar~i~ not the cata */
/* 15 slsnlficant ~/
t~.iefine r.i~lGH O~ l /* elt sectuence to set the rst t3.5 interuPt */
/* cloc~t to the hlsh freql~enc~
fl.lef~r,e ~_LO'~ O~O~ /* elt seql~ence to set the rst 13,c lnterUPt ~/
/* cloc~; to the loll Frequenc~ */
tl~e~lne F_OFF 0~03 /* 31t ~equence to tl(rn o~'-' tne rst ~ */
/* ~nteruPt cloci; *~
~llieflne I~ x40 /~ -lrst ~nPut Port ~/
~ieflne ~N~ t~O /* ~econ.i lnPut Port *~
t~e~`loe IN~ O~OO ~* Thlr,~ ~nPut Port ~/
tn~e~lne IN_~Dt3 O~O ~* InPut Port Ycr the lilsltl~o,i analo~ slsnal */
Y~ieFlne L I /~ Left e~e ~iat3 YDr use wltn EOi-l rout,lnes */
~he t'ollo(~tlns ,iet'lnlt~ons are usea to ~lasK ln IJarlous blts that */
~* contaln the .~eslre4 ln~ormatlon */
#leflne M_C~LIe~ OxOl /* ~tatus of the ca}ibratlon bac~; Panel */
/* swltcr~ whlch shoul4 be u~e~i wlth inPut */
/* Port IN~ *~
l1~et'lne ~-oFoLl ~)~10 ~ Status of the EOG cloci; whlch shoul4 be *~
/* use~ Wl th lnPut Port I~13 */
~defl\-,e iM_CHi?LD~ 0:~70 ~* Status oY the chrQ"(atlc Yllter select */
/* swltch whLch shol.(l~ be use.i wlth ln(~ut ~
/* i~ort INl */
~de~Lrle l~l_DBf~OK ~ O~ /* ~;tatus of the Bac~;srol.l~ ht swltch */
- /* whLch shou1-i be use,~ with inPut Port IN3 ~
t,~,iet~lne ~ EOCl ~x~2 /~ Status of the EaCl ~uto/~anual swltch whlch .i~' /~ should be used Wl th inP~lt ~ort IN1 ~/
#def`lne 1`1_~ISPLA~' OxSC) /* !3~atus of ~l~sh eners~/irradlanr,e 51~1tCh~ */
whlch qhoul~i be use~ lth InPut Port I1~
e~lne ~_DSE~E~T ~07 .~* ~UtPUt o~ Panel la~liPs t'or the i-1essas~s ~' /* 'FL~SH LEN~TH'. 'DOUe.LE INTER(.1~L'~ ~nd ~/
: /* 'PI~E-FL~5H I~TER~ L', whll. h sh oul~ be ~/
/~ se,i wlth OUtPlJ5 Port I~UT~
~e~lne ~_E~PT~ 14 /~ Status of serlal Port. ~lnlch should ~e .~ u~e~i wlth lnPut Port SE1~_5T~T ~
e~.~ne M~ c ~):<4~ tatus ot' EOO of the ~naio, tO lilaltal :i/
/* conuertor, wn1ch shoul~ be use.~ ~llth ~t/
/'J 11'1PUt Port ~N3 ~
~1et'lne M_l~ LI.lO ~41~ Ol.ltPIlt 5~ shutter st~t,l.ls I-lhlc~1 sno~.(!,i be ~' use,~ Wl Ih O~(tP'lt Port ~-~Tl ~ ' '1et'lne M_H_O~LI.lO 0;,~3,~ St,atus or ~ln that oan ~al~ ths? snlltter -~' ~* OP5?n whlcn sho~..ll~i be use~ W1 t.h ll~PUt. :i .~ Port IN3 ~2~97 ~iJe-`lr~ INI~:R ~x~3 /* Mas~; use~ to blan~ ou~ the tl~/o ~, ts whlch ~/
ena~le the two lnteruPt frequenole~ ~/
~!~eflne M-LI~l~T Ox04 /* 'rurn t'lash ~ectlon ll~t sol~rce an or rff. */
/* Use Wlth outPIlt Port OU'r~
~le~lne M~ O~E Oxl)~ tatus of rate ~electlon sl~1tch; I.~IICh ~/
/~ shoLIl,i be u5e~ ~Jlth lnPUt Port IN1 */
~'~ef`lne M_OUr_0~L 1~<1~ ~'t l'urn 'out of callbratlon' 1l3ht on or ot'f. i~
/* Use wlth OtltPUt Port OUT1 it/
e~`lne M_liEAD`/' ~x~ * ~tatus af the Plotter lnPI.lt but'Fer wnlch ~/
/~ shoul~ be 1.15e~ l~lth lnPllt Port SErt_D~T ~/
~-let`lne l'1_.REPEQT O(~l ~* Statu~ of rePeat Swltch ~nlch shoul~ be */
/* uged Wl ~h lr~Put POrt ~Nl *~
~ei'lne ~_RS'rG5 I)x~O J* ~UtPIIt whether the PrORr3m lS ln the */
/* IrlteruPt or nat. Use wlth rutPut Port */
/* OUTl *~
h'~f~ne M_~ K Ox~2 /* Turn bac~;~rr.)un~ ht on or rff. Usr~ wlth *~
/~t UUtPUt Port our3 fflie~lne M_SELECT o~ it Status O~ callbratlo)l select Push-button *~
~* ~JhlCh should be use~ wlth lnPut Port IN3 *~
let'lne ~_~EOG Oxll;~ ~ Turn EOG osclllator an or ot`f. Use Wlt~ */
/* ol.~tPUt Port our~
#lieFlne ~_S~OLD OxO~ /~ OUtPut sa~Ple ano holl~ Pulse. Use wlth */
/* outPUt Port OUT3 ~t/
~lefine M_SINGLE Ox~4 ~* ~etects lf slnsle ~lasn sequence has been */
/~ calle~ for. Use wlth lnPUt Port Ir~3 *
~eflne M_TRI~ Ox20 /* OUtPUt the l~re-trlsser Pulse when use~ ;t/
/* Wl th outPut Port OIJTl */

~deflne N_OFF l~xFF /~ 'rurn o~ a Port uslns nes~tlue loslc i~J
l;~e~ine OUTI Ox81 /it OUtPUt Port i~/
#lief lne ~UT2 l~ /* L)utPut Port */
H le& lne OUT~ xC~ L1~ltPut Port ~, #lleflne ~UT~ xLl /* ~Ut~.lt Port t`Dr '~ne' an-.l 'tens' dislts ~/
/* ~ sPlax *~
de&lne OUT_D2 VxL`2 /* I~UtPI~lt PVrt t'or 'hun-ire~s' ~ lt ilstla~ */
~* an~ the fo-.lr ieln~al POlntS */
-~eFlne OUT_DAC l~x8Z ~* OUtPUt Port to the ilsital ta a)lalas can- i~
/* I.lerter that contrals the shutter */
1~eflne L'.~IERFlL'W 1?~7FF /i~ ~an be use-i ta ln-ilcate an o~er-t'lo~l ran- */
/* ditlan to the aisPla~ raullne *~
~.~et`lne P_OFF (?x~10 /* Turn ot`~ a Port uslns Posltlue lo~lc */
I~e~'lne R O ~-~ Rl~ht ~Ye ~ata to be use-i wlth ~OLi ~/
/* rautlnes */
#-.'eflne Rf--L'ALL Vx~l /* ~trohe Port to rec311 contents of EE-Pr~O~
~* onto ~n-chlP RAM */
#lie&lne S~ VArA ~.~xA3 /~ Port ~'or lnPut and outPut Ot' data to t~e t/
.~* serlal co~lmul-~catlons rhlPr Il~lrEL ~'51~ ~/
#-~et`lnY S~:R_~TA- I~xA~ ort ~or lnPI.lt an~3 ol.ltPut o~ status an-i ~/
/* co~1lman-i wor~s to tne IN'f-EL S~51A ~;
~efl.ne ~T_C~N ~x~" /* ~trobe Port to start analo~ tQ ~131tal -~
/* conl!erslon -~
-iet'lne STA_-rI (:~x~F ~ om~arla ~-~orli t iet -~e P-.rts an~ start ~
/-~ the tlmer on the ~l55 C~ILP *~

~Z~8~7 h~1eflne STOP_TI Ox4F /~ o~llh~an~ ori to set the Ports and stuP the ~/
/* tlmer on the ~155 chl~ ~/
Nieflne ~ror~El)~AO ~* ~trot~e ~ort to store contents sf sha~Jaw */
~ Q~ lnta the l-EPI~OM ~/
/-~*t~*************~*ii*****t~*~*i~*tlt~*t~********~t~ ~t~****~**~****~t~t~***t~*~t~;~*/
/t~ aLOt~tL . Er~ */
**t~ ****t~*t~*t~* ~/
/'~ */
/l~ Thls ro-(tlne ,iaes all ~h~ slobal iefinlt~oos~ t~/
~ * ~/
/*t~t~ *~t*~t~**~***~**~tl~****t~****t~********t~ t~*t~i~**t~***~*~******t~*******/
~u1s~ e~i char t~cdC4~=O; f* Arra/ use~ ln con~ertlns the eln3re ~/
/* Ca,iel~ Declnlal oF the attenuatLnn */
/* selec-t swltch lrlto t~lnar~ */
unslsnei ch~r ~os_aC2]~31~=0; ~* EO~ al~Plitu~e liata tor hoth e~es an~ */
/* e-)er~ mlnute */
unslsne~ char exPectedC4l~=0; /* rable l)nlch l~et`lne~ ln the routLne ~/
/~ lnlt(~ contalns the blnar~ */
/* ~alues ~or the flash at all */
~* ~osslble attenuatlon settlnss */

~n1slsnei short atten=V; ~* ~ttenuatlon swltch settlns */
unslsne~ short b_bac~=O~ nar~ ~alue of bac~;sr~luna lrrailance */
unslsnei short b_~lash=O; ~* ~lnar~ lalue ot last ~lash er,ers~ */
u slqne~ short bav~;=V; /~ ~allbr~te~i ~alue ot` hlc~;srouni llsht */
unsl~ne~i shvrt c_outl~O; ~* Current lalue of outPut Port ~UTl */
onslsne~ short c_out2=V; ~* ~urrent ~lue ot OUtP~It Port ~UT2 *~
~Jnslsned shart c_out3=0; ~* ~urrent ~a1ue of outPut POrt ~UT3 */
unslsne~ short chan~e-O; ~* Poslti~e 105~c flaq usea to ln~ilcate */
/* that tne ~EP~M tab!e shoul~i he -~f /* re-store~ */
~nsl~ne~ short crash=~; /* Prsltl~e loslc flas that lndlcates tu an */
~* lnteru~t routlne t~at an analo~ to ~/
tal conuerslon ~as 111 Prosress ~
~o~s1sne~ short ~_hund=O; ~* ~LD ~alue ot the hun~relis ilsPla~ 151t ~/
unslsne~ short i_one=~: ~* ~CD ~lalue of the ones dlsPla~ als1t */
u~lsl~ne~i short d_ten=~); /* ~ alue of the tens d1sPla~ olsit *~
unsl~nei short lioubl=~; /* Positl~e lo~lc flas that lndicates lf */
/~ ~iouble rate lS callei for */
uns~sned short eos_fln-O: /~ Poslt~le lo~lc llas that 1n~1cates when */
~* the ~0~ test sequenoe has been com- */
/* Plete~ */
Unsl~ne~ shurt error=~ * ~oul-ter of flash calibr~tlon errors ~/
unslqned short f_e~Pect=~ E~Pecte~ ~alue of flash that has been *~
~* correcte~ fqr D~c~;sraun~i llsnt and *~
,* shutter oPenlns lensth 1~/
unsl9neq short Plash=~ alibrate~ alue oP t~e last f1as~ *~
unstsned short ~al)o=~ lnar~ callbrated value oP the shutter ~/
/~ oPenln~ to De sen~. tO the analos to ~/
/* 'il91 t~ll cl)n~.~ert~?r :~
uns1sned ;hort ne~ Posltl~le loslc Flas that ln~lcates lf ~t~
:
:

~S~
i g~

J* the routlne ~lsPla~) sho~ leaoY tne */
/* .Jata lt recelves ln nexa.~ec~hli3l Porm~t ~/
.lnsl~ne.J short hlsh=O; /* Posltl~e losla ~la~ 1~hlch lndlaate~ lP h/
/~ the rate 15 set ~t hlsh ~/
UnSl~ne.~ short ln calib=cl; /* PosltllJe Ioslc tlas wh~ n~lcates that */
/~ the de~lre lS ln a call~ratlon ~/
/* sequence: lf set to 1 its thc call- */
/~ Dratln~ une of the three trlmPots lf ~/
/* set to ~ ltS callbrat-n~ the attenua- */
/~ tlon s~ tch */
.1nslsnei short l_err=~; /* ~oiea lnilcatlon a~ Lrrors ~J~Irlns an ~OG */
/* test for the left e~e */
.lnslsne~ short llsht_on~ * Posltlve lo~lc tlas that ~ lcates the */
/* status o~ the fl3sn ll3nt source ~/
o!lslslled short laoP=I~; J~ oo~Jnter o~ looPs thro~.~sh the maln Pro- ~/
~* sram. Its used to slow down the rate */
/* of ~at~ outPI.lt to the dlsltal dlspla~
nslYne~ short lo~ Posltloe loslc tlas l~h1ch lnalcates lf */
/* the rate lS set to lo1.l or not */
onslsneli short l~a~_eosC ~=0; /* Ma~lmu~ amPllt~1~ie ~or both eYes dur~ns */
/~ the EOCl test ~/
nslsne.~ shart mln_eosC2~=0; /* Minlmum ah~Plltuie tor both Y~es i~lrl)~s */
/* the EOG test */
nslsned snort mode=~:~; /* TehlPorar~ blt Pattern reaio1lt oF the */
/* rate s~lltch */
nslsne~ short ran~e=O; /* ~11QWa~1e ran3e of error far the flash */
/* error ietectlon software ~/
unslsnea shvrt rePeat=O; ~* pQ5ltllJe loslc flas l~h1ch lnalcates lt */
~ the hl~de swltch 1S ln the rePeat Po- */
/* sl tlon */
.lnsl~nrJd short r_err=C~ n.~e.J Ir"ilcatlor) o~` e1-rors lr, the ~il3na1 ~/
/* ~rom the rl~ht e~e ~urlns the EO~l test ~/
~nslsne~ short select=O; /* I?otatlns blt ~h~ch 1ndlc~tas whlch of ~
; ~-* the three trlmPrt. beln3 ca!l- */
/* brate~i */
nsl~nea shorb sln~le=O; ~ If e~l.lal to l thls l.~eans a 51n';l e flash ~/
~* seq~.lence 15 aeslred. Thls IJarlaDle ~J
/~ 15 set to ~ 1~hen the seq~1ence lS Per- */
/* ~ormei anli reset ~o O whell the slnsle *i /* lnP~It has ~one low ~/
~1nslsnea short t_d~lble=1); /;~ Time aela~ between .~o~lDle flashes *~
unslsned short ~_~al~a=(~; /* Tlnle ~ela~ whlle shutt~r lS oPen ~/
ul-~slsnea shart t_trls-V; /~ Tl,~e iela between st~rt of Pre-trl3sier */
/* Pulse an-J t.he flash ~
uilslsneli short t~lu~b=O; /* Elt rea-ilns of the ~um~l.lheel attenua- ~/
/* tL~n swltch *~
unsl~ne.i short tlf~ei~iO; /* ~ounter to aeterhl1ne wne1l the flash *
/* source shoul~ he turned off */
st1ort l_ran~e=V; /* Lol~er lln)Lt of exPected IJalue ot flash -~/
u~lsl3~led short ,l~lnutes=(); ~ Tillle ehat has Passei iurlns an ~OG test *!
/~*********~**~*******************~***********~****~*******~*~*~ **/
` ~ /* Mf~ rl ~ */
. ~

.

8~

, ~,~***~*** **~* * ~
f /

~t rhls rou~lne t~c calle,i b~ the A-Natural Prasr-a~l 'h,~rer~,~' an~
n turn calls all the 'C' lan3ua3e r~out1ne~; to o~erate the */
/- c,tl~nulator. It tir~t l~lltlall-es 311 aPProPrlr~t,e aarla~les ~
/1~ b~ calllns lnlt(~ ani tnen enters th~ In~lnclte looP of the */
~* nlaln Pro~ranl. Here t~e callbratlol~ swltch lSt che~ ed an~
f an, calPot~) is calle~J to callbrate the three trlh\pot~i t'ur */
/~ ~lash lensth, ~au~le InterlJal, and Pre-trls~er lnteroal. ~
Then ca]att~) 15 calle~ hlch ~1:low5 the oPeratur to ,~anl~all~ */
~t~ chan e the callbratlon of the attel7uatl0n 3wltcn. Ne~t, */
/`~ sh~o~e() ls callea ~Ihlch rea~s all the front Panel s~ltches an~ */
~* sets t,~le aPProPrlate lJarlanles to ret`leot lts statlls. ~/
~ ~F a s~nsle Plach SeqUQIlce lg calle~ tor then rst~
/~ oalle~ the ~ir~lect' Pushbllttrn on the bacK Panel IS Pre~
/~ se~ then the automatlo attenuatlon callbr3tlnl~ routll,e, *~
/* autcal() lS called. A chech l5 made to see If the Penllft llne ~/
/~ an,~ 1~ so Piot~) l5 calleo to Plrt the ERG traces. A rea,~lns */
/* o~ hacKsroun~ Irra,3lance lg then ta~;en. an~ the hac~;~roun.i */
/* lrra~lance or the flash enersY 15 ~iisPla~e,i, ,~ePen.~lns on the */
/~ settlns of the ~ront ~anel s~lltch. Lastl~ lf the EOG swltch lg */
,'-~ on ~n~ ~ test has not been cohlPlete.~, eo~(~ 15 calle,J. *~
/* ' */
/~ THIS ROUTI~E C~LLS: ~/
nlt( ) 5~ll0~3e~ ) */
,'1t calPot(~ autcal() */
/' cala~,t(~ rst6~(~ */
;* l~lsPla~ ela~ */
/-~ a~Jc() Plot(~ *~
~'~ eas(~
/ ~ */
/* GLLBALS: -r;
/-~ ln_cal lb iooP */
/* sln~le crash */
/~ ~ bac~ ash */
bac~; t_bac~; *~
9_ ~ 1 11 ~ ~
/* */
/* AUrO~ATIC LOO~LS: */
,J~ nane use.~ */
/ ~ */
~I?C~ENtS: ~/
/~ nane use.~ */
/* *J
COI~lSTf~NTS: ~/
~ 13 M_C~LI& */
/~ ~_SELECT A~_eACK ~i/
~ ISPL~' */
,'~ A~_PEN ~_DEOG ~r~
/~*it**i~***~r**~*i~******~l****~t*:~****~******P,***i~-~il~*~**~ **~.~it~'~t-~i~*~ *~
maln( ~
be~n ~6 .6~7 lnlt(~ /* In1tlall e slobals It/
f o r ~
be~.n calatt~ t ~nuctl callbratlon of atten1.la~lon ~i!)!tCh ~i/
le ~ n (IN'3) ~ ~_C~LIe)) /* ~allbratlon ~wltcn lS on */
besln ln_callb ~ 1;
sh~olie ( ); /~f Rea-~ front Panel */
f (slnsle =- 1) rst~
ctlPot~.); /* calLbrate one of the tnree trlmPOt5 ~t/, ielas~ ; /* ~lo~1 iown the ou~Put to the l~15Pla'~
ln_callb ~ O;
en-~
sh10ie (); /~t Rea~ front Panel ~t/
f (slnsle == 1) rst6~ ();
if t!(ln (I~ M_SELECT)) ~* If 'select' Pushb-~tton lS ?t/
autcal(); /* Presse-i then Perforhl */
/* autnh~a~lc callbratlon */
f (a~c(~_PEN) < lOO) i* IF the Penllft lnPut soes low */
(a.~c(~D_PEN) ~: 10~) /* then a Plot of the E~G .t/
if ~a~c(~_PEN~ C lO(~) /* traces lS exPecte-1 ~/
Plot~);
crash = l;
b_bact; = aic (~-e~cK ); /* Get rea-ilns oF bacr~sroun.i ~/bac~ = t_bac~;[b_bact;]; /* lrra-ilance */
crash = (~;
o o P
f ( l on be~ln looP = /~;
lf (~n (INl) ~ M_~ISPL~') /tt ~easureh~ent ot` hac~sroun.J ~t/
; dlsPla~ (bac~); /* lrr3.~lance to be ilsPla~e.~
else dlsPla~t (t`lash~; /* Flash eners~ to oe .~lsPla;~ed ~t/

iF ( ! ( in( I~ll) & M_DEOG) ~ !eos_fln) : then eos();
else eos_~ln = O;
end en~i ~` ~************~**************it******************~t***~t******~*********lt*~t~
~ / * ~DC . ERG -.t *~
*~*****~t**it***t~ *~
1 ~ , *;
/t~ Th~s routlne re~urn the 1.Jalue of an analos to ils~tal conl.Jerslon ~t/
~ ?

~Z~L6~397 /~ an the analos Port sll~en as an arsuhlent 1i/
/* ~/
/* THI5 I?OUTI~IE C~LL5:
ela~
~* ~lLO~LS: ~/
e ~se~ ~/
i~ QlJrOM~rIC LOC~LS: ~/
o ll e ~15 e ~
/~ */
~ GUMENTS: */
/~ unsl~nea short Port - analos ln~ut Port */
/~ */
~-t ~ONSTQNT5 /~ ~UD I~l~ #/
~ E~ DC ~/
/1~ */
1 *** ~*~***~******~tl *****li****** #************** ~*~*7~i~* t l~*i.*~*~*******ii /
~-~1C ( Port ~
~nslsne,~ short Port;
besln ~ut ~ort, DUD); /* Set analos hlultlplexer an~ start con~Jerslon ~/
aela~ ~3); /* ~ait a~hlle to ma~;e sure EOC has sone h1sh */
t~hlle (ln ~IN~) ~ M_EOC) /* D~ta re~a~ hen ~ 30es lol~ */
;

return ~ln (IN~ )); /* Return ~alue af con~erslon */
? n~1 ,'~*****~i****~**************~************~*******tii~t~*#******~*1~*********/
~ L)~POT.ER~
******,~,***,1l,***** * /
~,~ tt/
Thls routlnr return~ the scalea ana ot`fset ~alue ot` the ~nalos #/
~* channel sl~en b~ t~e arsuh~ent 'Port'. [t ls usea to reaa t~e ~/
Jalues o~ one o~ the t~lree callbrltlon trlhlPuts. 'flash *~
~i lensth'. '~auble lnter~/al' and 'Pre-trlsser lnterl~al'. The *~
~* Potentlal o~ the tr~l~lPot lS con~erted to an ~ tllt ~lsltal nuhlner, soaled accoralns to the arsuhlen~ 'r_shlt`t' ani ad~ie~
to the o~`~set lnilcate~ b~ the arqunlel-t 'ba~;e ~. rhls Pro~.1U~eS *~
r slll~abl~ t`or ~se l.llth ~Icl ,o~ e tlhl~ ,~el~
'~ aela~. slnre th~re ts an lnternal nll~ltl~l ICltlOI~ O~' lG
/1? THIS R~UTI~E ~LLS~
/* a~ic(~ *~' ~* CiL~BQLS:
none use~
~ */
* ~lJTO~ r ~ C L~C~LS: - ~/
~* unsl~ne~ short te~lP - tenlPorar;~ ~alue netl~een oalculatlons ,' ~ ~, ~ CUMENr~
~e~

.6~

~* uns~ ed shart POrt - analog lnP~.~t Port ~/
/* unslsned short r~snlft - b1nar~ Plaoes that the ~DC val~lu -f/
/~ 15 s5ale,:~ b~
nslsne.i short base - a~fset that ~he ~lr,al sraled lJ~ e ~/
~* lS ~.hlf~e~ b~
f /

/~ CONST~NTS: */
~ none usei *
/~ ~f/
,'4~-1*~*~ ~*~ ~*~*~t*~t******~**~****tt*~******~f~**'~*~t*~*~ ***'~*-f*****~f****/
a-:iCPot ~ Port, r_shl~`t, hase) .lnslcil-e.~ short ~ortr r_.shl~`t, has~t;
besln unslsne~ short temP;
tehlP = a.~ (Port) .~`~ r-shlft;
return ~ emP CC 1) ~ (te~ 31) ::. 4~ ~ base1;
~'I~-i ~**~**************************************~***********~******************/
~ /* ~PLIT.ER~l * */
*****~******* */
/~ */
~* Thls routlne ietermlnes the ahlPlltu~e o~ the rlsht an.i left EOG */
~ lnPuts tor onQ swltrh of the llshts~ It is assuhleo that the */
/* Polarlt~ of the roc slsnal is suoh that the r~sht e~e ma~es */
/* a Pos1ti~e steP and the left e~e ~na~;es a nesatl~.~e steP. For */
/~. the first 8~ lllsecon~is a basellne lS estaollshe.i~ If the i~
/~ .ie~Jl3tl0n from th~s basellne is too larse then for the rls~t */
~* e~e r_err 15 set to 1. ~n-i ~or the let`t e~e l_err !5 5et to l. ~/
J* The routlne then searches tor the Pea~; slsnal olJer the ne~t */
/* 75(~ hllllisecon~s an~ calls the .ilfference the amPlltu.ie. rhe ~/
arlables r~err for the rlsht e~e an.i l_err for the left e e. i~/
/* ~re set to 2 i~ the Pea~; s1snal ~oes oft` srale. */
~* *"
rH r s R~UT I NE CALLS: * ~
. /* a.ic() ~ela~() *J
C1Loe~Ls:
r_err l_err */
~,~* *"
~* ~UTC1M~rIC LQC~LS: (~reoee-~in~ r 15 ~or rlsht e~,~e *~
an~ Preoee-ills l 1S tor !e~`t eYe) ~/
/* uns1sne.i C~ort. ste~ - ;ncrementer for loo~s */
unslsne-i short r~ a~leClC] l_~JalJeClC] - ranle ~./hloh hol~s /* the baseline ~/alues to be a-.-erase~ *~
unsl~ne-~ short r_total, l_total - rurlnlr,~ totals Ot' ~-al~.~e -~
to be a~erase.i */
~* unsisne.i short r_~asellne l_hasellne - oasellne ot EQC1 i~
slsnals before the ll~ht s~ tch ,* ~nslsned short r_~e~ atlon l_~ie~latlon - ~e~ atlon ln the ~* ~aseline sisl~L
~' ,:

~Z168~

J* ~Inslsne~ short r_~nax, l~ a>( - Pea~ ahIP1lt~.ldes ~/
/* ~lns~sne4 short temP - temPorar;~ stor~se ~or oarlables a~tnr J~/
an analos to ~ tLI1 rono~rs1u) ~/
t* */
IJ U~1 E N r ~: 'f ~
/* I.lnslsne~ short *r_a~P, ~ aI~lP - fOr1 amP11tl.n~es to hs ~/
retI.lr~ed to the oall1ns raIltlne ~/
/~ ~ON~T~NTS: ~/
D_R_EOC ~_L_ECJG */
/~1 ~/
~tf~*~ *****i~*.~*****~**~**~****~.~****~****~*~*~**~***~**~**~*~
~hlPll t ( r - ahlp ~ 1 _~hlP) s1sne~i short *r_amP, *l_amP;
be~in nslsne~ short steP;
I.n~slsne~i short r_waoeC16~r l_IJa-leCl6];
unslYne~ short r_total, l_total, r_bisellne, l_baseline;
unsisned short r_de~/latlon, l_,ie~latlon;
unslsne~i short r_~ax, l_max, temP;
r_tot31 = l_total = (~;
for (steP=O; steP~:lG; steP+~) hesln r_waveCsteP] = adr (~D_R_EO~
aoeCsteP~ = a,ir ~D_L_EOG);
~ela~
r_tot31 ~= r_wa~eCsteP]; ~* Clet runnLns total of bIsellne -~/
I_total ~ eLsteP]; ~ ~JalI.Ies ~/
end r_basellne = r_total ~`~ 4~ erase to t`ln,i the basellnel_base.~lne ~ l_total ~`~ 4, r_total = l_total ~
~`or ~steP~I.~; steP-.1~; st~P+~) ~esln ~* fln~i the total o~` the absol~.Ite ~Ie-.llatlons 1~ (r_wa~.-eCsteP~ ~ r_basellne) t~Ien r_total ~= (r_wa~eCsteP~ - r_basellne);
else r_total ~= (r_basellne - r_wa~.~ecsteP]);
f ~l_I,~a~eCsteP] ~ l_basellne~
then l_total ~= (l_wa~eCsteP] - l_basellne~;
else l_total ~- (l_basellne - l_wa-leCsteP]);
end r_,ieIJl~tlon = r_total `~ fln~i the a~lerase ,ieolatlon t`roh~
l_deolatlon = l_total ~i 4; ~* the basellne I.-all.Ie */
i~ (r_.~eolatlon ,~ SO) ~* Set error ~la~q l~ the alIerase ~/
then r_err = 1: /* ~ievlatlon lS ton larse 1 else r_err = O;
f ( l~ at ~
t~en l_err = l, ~lse l_err = O;
r ~ a x = ''~;
l_hl~ = 255, t'or (steP=I~; str-~P'150; ste tJasln ~* Find the Posltloe Pea~ ~or ~
tefftP = a~c (AD_R_EO~ t the rlslht e/e ~IrlrJ the ~f f (telllP == 255~ /* nesatl-le Pea~; for the */
r_err = ~; /* left e/e */
f (temP ,~ r_n~a~) r_max = teinP;
te ff~ P - a,~c (AD_L_EOf'l);
f ( teh~P == h) l_err = 2;
f (te"~P ' l_n~a~) l_h~a~ ~ tefllF~;
~ela~ (8Ct);
en~
lF (r_err == O) /* ~eturn ah~plltu~e IJalues */
then *r_an~P = r_n~ax - r_basellne; /* Dnl ~ lf no errors ha~e -~t~
else *r_amP = i); /* occurred */
f ~l_err -= ~tj then *l_~fllP ~ 1 baseline - l_fnax;
e' 5f3 *l_an~
end /*** #it****~**************************
/* e~tUTff~L.ER~ * */
/it*********~***** *f /* */
/-t Thls routlne Performs the autof.)atlc callbration o~ c_tableL~r */
/* which 15 the 100~;-UF' ~attle to match the control Panel atten- */
/* uatlon setti~ to the aPProPrlate sh~tter aPenlnq. It Itaits */
~ t untll the bac~;srftun~ irra,~iance 15 set ta _ero. sets the ~lasn -t/
/~ lensth to ~0 ~nlllisecon~s. an~ then c~cles tfrtroush all the */
/~ attenuatlon settinss (rt to 4~'t~B), (thlrh are sho~ln on tne *~
/~t ~lsPla~ as theY are belns Processe~ the otttalne,i t`lash *~
~t enersY falls out o¢ ranse o~ the e~Pecte.i $1ash eners~, as #/
~# ln,Jlcated bY the rautlne calt'sh~, three tlmes ln ~ rD~.I, then *~
/* a ~tlnar~ search is ~a~e of the Possible shutter oPenln~s untll ~t~
~t a oalue is ~ound that ~alls wlthln the e:(PeCte,~ ranse, ar untll *~
~* the uPPer an,i lo~.ter bounds ~tf the search ,~eet. Th}, routJne -t/
~t 15 aborted 1~ the callbr~tlol~ buttor" I.~hich arlqlnall~ causelt */
~* thls rautlne to be calle~i. ln release~
,~ * *f ! ~t TH r S I~UTI~E Cf~tLLS: ~/
~t a~c() calfsh(~ t/
/~t dlspla~ ela~f) *' f ~ 5 a tblt~ re 5 etbt~t~
;~t y ~ it c;Ll~e~f~tLs ~

PeCtedC~ ln_c~ b tt/
~ ~t b-bar: r; C _ o U -t 1 # ,:

5~

~L2~

b~ sn t_saluo */
~-~ atten 3 ~ o t 5 ~ 1 ~ ]
~UTO~-rlC LOC~LS: */
/~ unslqne3 short luw - lower boun~i Yor blnar~/ searah ~/
/~ unslsne~ short hlsn - uPPer bo~lni for ~Inar~ searcn */
/* unslsne3 short tenl~_salvu - temPorarX storase for tne */
~* o ~ s ~ Ja l l.le o~ a l l.
t~t ~RGUMENTS:
/* none tlse~ */
~ CONST~NT~
/* ~V_e~CK DUD */
~ 3 ~_!iELECT */
/~ M_OUT_C~L OUT1 */
~* STORE */
/* ~/
*******~t**************~*************~*********~**~****~*~*****~*~******/
aut~al ~ i b e s l n ~nslsned short low hish te~lP_salt~o;
in_cal~b ~ 2; /* ln~lcate calibratlon of a~tenuatlon */
~* swltch lS ln Progress i~/
b_bac~; = ada (~_B~K);
hlle (b_bac~ ) /* i~alt untll the bac~;sroun~ lrra~lance ~/
~esln /* becomes ~ero */
dlsPla~ ~DUD), b_oac~; = a~c (~D_8~K);
en ~3 temP_saloo ~ t_sal~lo; /* Save orls1nal ualue of flash len~th -~
t_~al~Jo ~ C 4) - 1; /* ~et ~`lash lensth to ~ 1illsecunis */
atten = 1~
hllæ ~lltterl;41~ n~IN3~ ~l M_~ELELT)) h e s l l-~sPla; ~atten); /~ DlsPla~/ attenuat1on settlnq be1n~ ~/
~a11JO = t_calLatten~; /* oal~brate~ */
t` (!cal~sh()) /* r~1oe ehe flasn three cnances to ~/
bes1n /* Pru~uce the exPecte~ f`lash ~' ~ela~ ~1600~); t~ eners~ */
f (!calfsh~)) beqln ~ela~ (lr;~ )r ~f ~!calfsh~)) esln e l a Y ~ 0l) );
S~tb1t (~_OUT C~L. ~c_out1, OlJT1); /* Turn on ~UT t/
0~ C,~LIBl~T-oN ll~t ~/
t (b_f`lash exPecte~Latren]) then ~* Flash 15 les~ than exPected so set */
be~1n /~ ~oun~s t~o lower Portlon */
',~
5~

r .

., ~ .

low = t calLatter,];
hlgh = ~55;
en.~
: else /* Flash l~ sr~ater than e;~Pect~d 50 se~ ~/
besln ~* bounf~s to uPPer Portlon */
law = l4l:~;
hlsh = t._calCatten~;
eni ~al~o = llow ~ hl~h~ ~" l; /* Set shl~tter oPenlns ~/
/* ~o nl~ le of bo~lnds ~/
h~le ((!~alfsh()) && !(in(IN3~ SELFCT) ~ llow~hl~h)) be~ln /* Perform blnar~ search ~/
if (b_flash ~: e~Pecte-iCatten]~
low = sal-Jo;
else hlsh = saloo;
sal~o = ~10l-~ + hl9h) >~ 1;
~ela~ OI~
eno t_calCatten~ = 3aloo; /* Pern)anent1~ store new -~/
aut ~STORE. DUV~; /* callbrated ~al~le */
dela-~ (~OO~;
resetblt (M_OUT_C~L &c_outl OUT1); t~ Turn Dff ~
en~ /~ OUT OF C~LIeRQTION ll~ht */
en.i en-i ~atten; f* Tr~ ne~t attenl~atlon settln~ */
en.i t_~loo = tehlP_sal~Jo; i* RestDre orls~nal IJ~lue ot` t'lash lensth ~/
n_calib = 0:
~ni /*~******J~****~*******************************~***~********~*******~****/
/~ C~L~TT.ERG * ~/
**t~*:~**~******* */
/~ */
/* This rout~ne allo~s the oPerator ta h)anuallY chanse the calibration ~/
/* of the a~ten-~ation s~i~ch. It ls entered or aborted b~ */
/* tussllns the callbratlan swltch an actlon wnlch woul-i not nor- ~/
/* mall~ be ~ane on the contrl~l P~nel. For anf atten~atlon set- */
/~ tlns the ~lsPla~ wlll show the current VAC settlns from the */
/~ table t_calC]. Thls vallle can be chan~e.3 b~ Pl~sh~ns the */
select calibrat~on' bueton. I~ the bl.ltton ls held the ~
/* lilsPla~ wlll co-lnt slowl~ ~or the t'irst fo~r cDunts ani raP~ */
/* thereat'ter. rhe .i~rectlon of count l5 l~etermll1e~ b~ the */
/* 'callbrat~on' tossle swltch~ ~
/# ~/
~ rHIs ROUTINE C~LLS~
/* ~ela~t) se~blt() ~,~
smode~ rst~
sPI~f~ rese~lt() ~/
4 f * rlL~ Ls: ~
/* !n_c~lib chan3~ f/
c_o~ltl sll~31e ~

5~

-~2~6~3~7 saloo flash ~/
/* t_calC] atten ~/
/* ~/
UTOMA'rIC LOC~LS~
/* ~Insl~nei short coI~)lt - use~i to l~eeP trac~; w~ the n~ her */
/~ o~ roIln-ts that the seleat cal~
/* bratlon i 5 Pre s se~i for */
/* ~/
~RaU~ENTS: ~/
~e ~ 5 e~ ~/
/* ~/
i i~ CU~`IST~I`ITS:
r~ 1 lJ T ~ L Ll ~1 -r I ~ /
!~t M_~lSPLf~' IN'3 N/
/1t 11_SEL.ECT M_6f~LIE ~/
~It STORE DUD '~/
~* ~/
~-***~*~****~*~***~***~**~t***~*~*****~**~************it*~t**.t**~********1~/
c~alatt() bes1n ~nsl~ne1 short coIlnt;
f ~!~in IIN3~ & M_C~LIe)) ~* I~allbr~tlon sw~tcn n~Ilst ~e tossle~ */
besln /* ~t abolIt .5 h7 to enter the lnner */
iela~ (~?0O); /* looP */
~f (in (IN~) ~ M_C~LIB.) be~in ~ela~f (320 if (!(ln (IN~) & ~_C~
b e s l n ln_callb = ~ t Sèt flas that callbratlon of atten- lf/
chanse = O; /* ~latlon swltch 15 ln Pr~9re5s whlle (1n_calib) b e g l n ~et~lt (M_OUT_C~L &c_a~Itl ~UT1~; /* Turn ~ IIT t/
/It tlF I~LIUR~rI~ ht t/
sn~o~e (); tN Rea-i cuntrol Panel */
I lf (sln31e == l) /~ Perform slnsle flash lf ~/
rst65 (~; /* calle.i For ~/
++ln_callb; /* Set IIP short tlmer that wlll */
/* not allo~.I the oPerator to ~
/* lmn\e~ilatel~ tossle OIIt of */
(ln_rallb :? lOOOj /* the aallbratlon mode -~
n_calib ~ 00;
~; iF (ln (I~ 1_DISPL~i dlsPla~ (sal-~oi;
else dI5pl3`~ ~Flashi; /* DlsPla~ flash ener~
; /* lf Flash eners SWltCh 15 uP -~/
i~
` 5S~

;

.

~L2~

..
o~ t = (~;
~hlle ~(!tin(IN3?~ ELECT)~&&~lnlI~ t~_DISPL~
e s l n f ~ n ( I N~ ~ & M_CQL I 13 ) b e g l n lf (t~_calCatten~ != 255) : ~t_ralLatten~ LnGr-ehlent al- */

end /~ lbratlon settlr,s */

Qlse ~F (t_cal~atten~

--t_ral[atten~ Decrement cal~ */

/* l~ratlon settlns ~/
d 1 S ~ 1 a S' l t _ t: alLatt a n ~ ) ;
+~count;
chanse = 1: /* In~ilc~te that the EEPRO~ table ~/
/* has been chansed an~ shoul,i ~/
/* be restore,i */
if trount ~: 5) ,~ela~ OO~; J* Slo~ count */
e1se dela~ ~l600~; ~* F~st count *~
en.i f ((!(1n ~rN3) ~r?-cALI~ n_callb s= IO(:I~?~
be~ln ~ Test for cal. SlJltCh ~eln~ *~
del~ O); ~* to~sle~ to a~ort thls */
~* routlne */
f (in (I~ CALIe) bes1n in_oalLb = 1~
resetblt ~_OUT_CAL. &c_outl, OUTl), if (chanse) ~* Re,tore table From snadow */
bes~n ~ t~ lnto the ~EPROM *~
out ~STORE. DU~);
~elaY (2(~)', /* ~alt ~or en~ of store en~
ena ~ end : enii '~ enii en,i ` ~ en~i an~
~*********ti***~**~***************~************t~*********-~***********t~***,~
~* ~LFSH.ER~ ~ *~
~*********~****** *~

/* *~
~-- Thls routlne Pert`orms one tlash, meas11res the rece~ e~ tlas~1 */
/* ener~ , coh1~ares lt to the e:~erte~ ual~1e ~t' -the t`l~sh *~

SS-' ~

~:, `' ~

PlUS or mlnlJ~ ~ Sllla 1 l ran3~ an~i returr,s 1 1~ the l:J~srl 1S ~/
/* In callbratlan or 0 1~ the ~lash 1S out o~ callbratlon ~/
f* ~/
/~ ThIS RUUTINE CALLS: ~/
/~ setb1t() ~iela~
/~ resetblt() oP~n~salllo() ~
~* ado() ~/
~ LL7~LS:
,'~i C_O-ltl t_trl3 ~ b flash ranse *J
/~ e~Pecte,~] atten */
/* l_ranse ~/
/* ~t/
~ UTO~TIC LO~ALS: *~
/- none llse~ *~
J ~~ * /
J~ENTS: */
/* nont! use,J */
/~ *~
/tf Cl:lNST~l\lrS */
/~ M_TRIG ~Url */
/~ ~D_FLASH */
i *~*~*i~****~***-~**********************~****7~*~***tt*~***'~***~*i~****/
L'~ t`Sh( ) b 1~511 11 setbit t~_TRIG ~c_autl ~UT1); ~* Sen~i out Pre-tr1sser PUlSe to */
~elaY ~t_tris); ~* t;ll1 the char~e storei on *~
resetblt ~M_TRICl, &c_ou~ UTl); /* the lntesratlns caPacltor 1~/
Oa~ 9al~lo ( ~
b_flash = a~c ~D_FLASH);
ranse = (e~PeCte~atten] ~ ) + 4: ~* Deterh)lne al1o~able ranse o& *~
~* error */
1_ranse - e~Pected~atten] - ranse; ~* ~at;e sure lower boun~ lS not ~/
f (l_ranse t 1~) l_ranse = ~; ~* nes~tl~l~ */
L~ ((b_flash t e~eate~Catten] ~ ranse) ~ (b_~lash ~= l_ranse)) return (1): ~* ln cal1bratlon */
else return ~); /* out of callbratlon *~
; en~
~-~*************~**~****************************~**~***~*~****~*****~***~f*/
/* ~ALP~7.~RG i~ */
,'**~**~*********
/* -~/
/* This routlne allows the oPerator to select anl~ charl3Y -the ~dJust- */
/* n~ent of an~ one of the ~hree trlm~ots, '~`lash lensth~ liouble */
/* lnter~al', ~nd 'Pre-trlsser lensth'. The nah~e of the trln~Pot */
/~ ~hat lS un,~er o~ns callbratlon lS lit on the ~ilsPlar 3n~ the i~
~* ~alue o~ that tl~le aliJustn~ent ln i~llllseconds i5 shol~n or, the i~/
~ sPla~r. rhe lii~ferent trlmPots ~re selected b~ Presslns ~ e ~/
/ `~ ' 5 el~ct o~llbratloll' PUshbl.lttol~. if ,~
~ /

` 12~68~7 /* ThIS ~OUTlNE C~LLS: ~/
P ~ P l a / ~ ~ * /
~* ~/
/~ ~iLO~L.S: ~/
~ select t tr1s */
/~ ~lash t_3;tll.~0 ~f/
.~ t_douol~ *
~* ~UTOMhTlC LOCALS: */
~ none use.i */
/* ~/
~ ir1UM~N rs: ~ /
/~ none use.i ~/
/* */
/* CONST~NTS: */
/~ ~D_TRICl ~D_G~LI.~O */
/~ ~D_DOU~LE IN1 */
ISPL~ IN~ */
J~ M_SELECT *
/~ *~
~*i~**~*~*~******t~***********~***~******~***~****~***********1~********~
C~ Pott~
besln swltcn ~select~
b e s l n case 4:
t_t.rlY - a~cPot (~O~TRIG, ~, 157); /* Set Pre-trl~ser t~(~e #/
~f (ln (IN1) & M_DI~PL~ /* Interual */
sPla~ t_tr~ 43 ~ 1);
els~ ~isPla~/ tflash~;
brea~;;
case 1:
t_~alvo - a~Pot ~Lt_G~L~.IC 3 1~7~; /* S~t lellsth ot flash */
f (in (IN1) ~ ~_DISPL~) ~isPl~Y t~t_sal-.~o `r~ 4) + 1~;
else J1sPla~ (flasn~;
brea~-~ase 2:
t_,~ouble = a~cPat ~D_~OU~LE ~ 1597); /* Set tlme :~nter- -.t/
~f ~ln (IN1) ~ M_~ISPLQ~ al betlJeen */
~ilsPla/ ((t_iouble ~ 4) + l); /* iouble tlashes */
else a~s~la/ (flash~;
brea~;;
en~
if (!~-n (I~3~ & M_SELECT~) /* If select callbration but~on 15 ~/
b~sln .~* PreSSe~i then ~h3nse selectlon */
select :c~ /* to the ne~t trlhl~ot ~/
if ~select ~ 4 select = 1;
wttile ~!~ln ~ . M_SELECT)) .~* ~a~;e sure ~-.ltton ~s release~ *~
J* oefore c~ntln~llns ~/
ena .~
~ 7 1 .
,~ .

end /I~'I**~*~t****~ ~*~******~*~l~#****~**~*lt~*****-~*~ t~lt*~ f~*~*~****/
~ ~ ~t)NDEN . ~R-i * ~/
/~***~******~***~
~i~ */
/-t This routine ~lll fJlot the con~ense~ EOrl a~n~lltudes tar the r1sht ~t /~ an~ left e~es, wlth a wrltterl ln~iloaslon of both ll~ht rlse */
~* r~tlos. The 4UtPUt ~ne,ii~ " IS an HP 747f,7~4 liraPhlcs Plotter */
a an RS''32 lnterFace. The Plotter oo~ ndn.is are ~.ne HP ~/
.ira f~ h1cs Lansuase mll~moll1c 5. ~. /
/* ~/
,~ ~t THIS RI~LJTINE C~L LS: */
.~ ~ serlal ( ) move ~ ) ~t/
/~ fractn~
,'~ ~/
/~ GLOB~LS: s~/
/ ~ eog_aC2] C31 ] hlan_eo~L''] *,/
/~ mln_eosC2~ */
/ ~ */
/ ~ f~uTortp~TI5 LOC~LS: */
/~ unsIsne~ short steP - ~Jarlable for stePPlns PoSltlOnS */
~-~ across the sraPh *~
/~ unsl~ne~ short n)Inute - tlme l~alue to be Plotte~ */
~lt */
~* ~RGUI~IENl S: ~/
~* none us~d */
/* */
.~* t~f7NST~NTS:
/~ nane use,~
* /
/ *~t**;~*~ ~ t*****s~*** ~*~t ~***sf~*****~ t*t~ **~t*~*~* lf*-~ *~t~it*s~***~ ti~t-~
D ~ e \ ~ ) ~ e s 1 n Insl~ned short steP, m~n~.lte:
serlai~"~N"); /* In~tlal~Q Platter ~/
~,er~ "\3 7~5f3\10~ Set h~ndsha~ln~3 to Pln ;'O -t/
,erlal f "CSC):SS;DT ;SPl ;!3f 0,400,0.3''C1" ); /* ~et ,; rans2 to 4~)1t *~
molJe (30, eos_a~R]~0]+_0); /* an,~ Y ran~e ta ~ u~ ~t/
serlal ( "PD" );
~tea = ~(7 t~or t~ nute-l; f1llnute~=30; ~ nute+~
~esln f* Plat r~sht exe amPlltu~es */
f ~eos_aL1?~Cmln~1te] ,~ 0) mo~.~a ~steP~ eos_aCR]Cn1ln-1te~+~
5t~P += lQ;
: end serlal~"PU;P~335,200;LeRlsht LBRa~lo LB.= ~P"~; /* Print rls~t I19nt 'f~
fractn (max_eosLR], 1~ln_eosCR]); /* rlse ratlo on tne */
serlal("LT~,S;P~13~ 0;PD;P~l80,~70;PU:LT"); ~* slie ot` the ~ra~h .
serLalt"P~73.260;LB~RK LB~D~PTED 1'~225,~ 1;Le.LI~1Hr LBAD~YrED ~P~");
~a1.1e (31~, ~03_a~L~ ]~?O);
5~ rlai ~ t e P - 40;

~2~689'7 for ~mlnute=l; mlnute'.=~O; hllnute~i besln /* Plot left e~e 3mPlitll,ies */
lT' leo9_aCL]Cmlnllte] `~ O) mo-.~e (steP~ eog_alLlLmln~lte~21));
ste~ l= 10, en~
serlal~"PU:P~335.lSO:L~Le-~t Le.r~/atlo l_B= CP"): /* ~rlnt le~t llsht ~/
f'ractn (max_ea~CL]. mln_eosCL]~: /* r1se ratlo on the ~/
serlal~"P~330,~1~PD~ 0.~,27(~PU;TLl.5,1.5"), /,~ slde o~ the sraPh */
far (steP=?7CI; steP.~21); steP-=50) hesln /* Pllt In Y scale tlcl: ~nar~;s */
ooe ~30, steP);
serlal ( "~'T" ) .
en~J
~or (steP=40; steP~34l3; steP~=l/~) be~ln /* PUt ~n ~' scale tlC~ hTarT;S */
mooe (steP, 20);
serlal ( "~(r" ):
enl~ /* Label scales an-i title the ~raPh */
slrlal~"PA32G, lo:Le3o p~?2~lo:L~2o PA126~ lo:Lelo f'~2~.5,1C~;LBO ");
serlal~ "PA20, 17.6;LB~ P~lO,:ZI;7.6;LB2';Q " ):
ser~al~"P~(~,14~;L~u~l P~16~ ;Le,~lnutes ");
serlal(''S~ ,l.O;PQO5,30V:LeEOC1 Le~pL I ru~Es s~l:); l~ ):
end ~****1~*~1***********************************************~****************/
~EL~'.ER~1 5 *
~***-~************ */
/* */
/* Thls routlne Pro~ es a softw~re ~ielaY ot~ ~2.~ mlcroseconds Per */
/* looP, or l millisecon~ ~or 16 looPs~ */
/-~ */
/* THtS ROUTI1`1E C~LLS: */
/* nothln3 *, /* *~
/* ~lL~ */
/-~ nDne used */
/* */
/ ~ ~u rol~T IC LOC~LS */
~* unsl~ned ohar dud - liuh~m~ uarlaole */
/* unsisned short he~ increme1-ter t~or the l~ela~ looPs ~/
/~ unslsne~ ~hort looP - nuh~ber of lanser !ooPs that are */
~ Performe.~ *~
/*
t ~ ~RGUI~IENTS: *
/*unslsned 5hort tLhle - total nul-lber oF looPs to be tra~Jerse,i -~
~^~*/
r s~ Cl~NST~N rS: * /
/;~ none used 7t/
~*******~****.~**~**~******-~*************~**~t*~ ***~ *~*~*~ *!
a~tlhl~
unslsne,3 short tln~e;
b esln ,:
~:

5~

'~

~2~68~7 uns~3ne~ char .iui;
(nsl~nei short he~
nslsne~ short looP;
looP = tlme >`~ ~; /r Orle lon~er looP 15 PerFo~rhlelJ for eoer~ uen */
tlhle -~ looP; ~* shorter looPs ~/
f'or (heldl = O; held1 '; tlme; ~heldl~ /* Perform short lorPs */
;

~or (heldi = O; heidl C looP; *~hr?~ * f'erfcrm lonser looPs */
O;
end / ~t******* j **** **lt**** lf **~t***~***~********1t****~t********~tt 't*1t*~********** it /
J* DISERR.ERG t~ *~
/*~********~*~** */
/**/
Thls routlne 1,~ sPla~ thc~ error code encountered durlns an */
~!t ~OG test. ~n 'E' aPPears ln the left han,~ slt of the ,~lsPla~ */
/~t`allowe~ bY tho code 1 lt there 15 a nols~ basellne, the co~e ~/
~thr~ Pea~ a~Pl ltu~ie lS o~t' jc~le, an~i the co.ie ~ It' the */
/It ah~plltu~es fluctuate too sreatl~. l'he r1sht e;e 15 selecte~i *~
/~b~ Placlns the d~sPla~ o~e sw1tch ln the 'lrra,~lance' Postlon */
~tand the let't e~e ls selete~ b~ Pl lCln9 the ~lsP]a~ r~oie swltch */
~* 1n the 'Flash Eners~' Pos1tlon. *~
~* *~
T~1IS Rl::IIJTINE C~LLS: */
~ -t i i s P
,~ * *
~* GLOP~LS: */
~* he~ r_err *~
err ~t ~t *~
/~ ~U'l'O~ATIC LOCALS: *f ~*~lnsl3ne,i short ~i~ta - use~i to send the co~ie to the routlne *~
.i l s P l a ~**~
~t ~RGU~E~ITS: *~
~* none usei ~t~
~* *~
~ON~T~NTS: *~
~lt lNl M_DI5PLQ~' *~
~* *~
~ -t***********~t*~*****-1t****~t******************-it***********~******~t****~t***
.ilserr() bes~n unsl3ne~ short ~ata;
~ O ~ = .1;
,ia~a - (~xFEI~O; ~* T~lrn ~ier.1l.lal Polnt~ off ar"i ~lace an 'E' t~
n ~ M_DISP!_~S') ~-t ln the Let't h~n~ s1t ot` tne ~i1sPla~
then ~iata l= r_err;
else data l= l_err' ~* D1sPla~ re~leste~i error on~e ~t~
lilsP~ at~), '~ en,i ::
b :
9~

***~ Jt~ *** ~t~ t****** ~******~** r/~-~ *~ * Jtr~* s~lt~t*~ ~**~:ft** )t~r~* J~:~*** ~ * *~f ** *** /
/~ DISPL~'.ERrl ~ */
*****~*******~ */
,/ ~ */
,~* rhls rPutlne n~lll sen~i the lrlr~.~t ar~ nl~rlt to the 1119lta~ 5Pla~
/~ It also cnntrols the lier,lmal Polnts and the ll~hts ~ehlnd t,he ~/
~* messases. 'fLQSH l_EN~lrH', 'DOU~I~ INIERI.~l'll', and 'PRE-FI_~SH */
/* INTER~L'. h /
,/ ~t ~ /
/* l~IS ROUTINE CALLS: */
~ J() *J
/* *~
,'~ GLOB~LS: "/
f-:t ~n_calib d_one */
~ ~i_hun~i ,i_ten */
/* hlgh rePeat */
/~ c_out? hex */
/* *~
/~ AUTn~TIC LOC~LS: *t /~ Unslsne-J short ~ecl~al - code for whlch .ieclmal Polnts */
/~ shoul~ be on */
/* */
/* ~I?ClU~ENTS: */
/; unsl~ned short iiata - num~er to be ,~lsPla~e~i */
/* */
~* CONSTQNTS: */
~* OUT_Dl OUT_~ */
/~t M_C~SELECT */
* VI~t~ * V~***~***~**:~***~t~ It* *~t ~ l~* ~ r*~t*~ r**~ t~ *~ **i~ ~t l :~*~ f * /
~ sPla,~ ta) an~l~ne~ short dat3;
besln unsisned short decimal:
~f tln_c~lib) oeGlltlal = ~xF; /* Turn declmal Polnts at'F \^lhen ln cal- -t~f /* lbratlon mode */
else ,i~clmal = d~ta ,>.`~ l?; /* Loo~;-uP tahles contaln the ln- -~/
~* Frrmatlon For ~he decli-lal */
,~, Polnts as the uPPer 4 bl~, *f ~lata .~= O.YFFF;
t` ~hexj then be~ln /* OLsPia,~ ,iata ln hex format ~/
.~_one - ,iata ~ l~xF;
~i_ten = (~t~ & I:i,y~ .` 4;
~:i_h~ (!t~F~O! `~ 8, he~
- ;e ~ e = ~ ta, l~:~O. ~ _hlll~ _ten,, /~ Con~./ert num~er to ~eclmal */

~ .

~2~ 9'7 ~hlsn ~ rePe~t) ~* Put OFf onto the ,~lsPIa~ to In~Jlaate ~hat -,~
bes1n ~* the l~sht h~eter wolJ11i be ~ Lns in~orreat -s/
out (OUT~D1, O)~FF); ~1~ re~ nss ~/
~llt ( ou r~ F~
en.i el~e bes1n out (OUT~DI, (,i~tel ~ 4) + ~i_one); /t~ Eurl"~lt the nu~bers */
~ hund ~- ~iec1~a~ 4: /* ~r d1sPla~/ */
out (OUT_~2, ~_hund);
erld f (lr,_r,allb = I) /~ Turn on the aPProPrlate Pa~e1 lamPs 1~ the -~/
be3ln /~ .ie~ ce 15 1n tr1mPot cil1brat1on mo~e */
c_out~ &= ~M_~SELECT;
c_out2 l= ~~se1ect & ~ DSELEl,T);
en,i else c_out2 I = M_I~SELECT:
out ~OUT~, c_out~;
en~
/~***************~**-~*********************************~i~*******~*******4/
~'t~ J I l?E . ERG * * /
/**************** t~/
/* */
/ * l HF Rl:~U T I NE: d i ~ e ( .i l ~ e n .J, ~ l s o r . q u o t l e n t ) * /
/
/~ Th1s lnte~er ~i~J~de rout1ne l~ 1,ies the ~ den~J b~ the ~1~J1SOr */
~* stor1ns the resu1t 1n the l~cat1on Po1nte~ to b~ the quot1ent. */
/* The remaln~er 15 returned b~ the ro~t1ne. rhe d~ en~ and the */
sor ~ust be suah that the e~ected res~l1t 1S betl.~een 1~ an~J */
/t~ lS 1nc1us1ve.
~ / ~ */
THIS ROUTINE CALLS: nothlng */
/* ~/
/~ GLOBALS,. none ~
~ /t~ */
/~ !;TATIC LOCALS: n one */
/* ~/
/tr ~UTO~TIC LOCALS: US temP ~/
/ *
/* */
/~ AR~U~ENTS: US ~ en~ 1sor ~/
/* PTR quotlent ~/
/* *t /* C~ sT~NTs none *~
/ ~ ;~, ; il ;~ ~*~*~*******~**********~ ~*********~****~***~***** ,~ j~**~*-,~*~,~*~* ~/

c ~ r, q -l ~ t l ~ n t j .~ un~1sne~ snort ~ en-i,~J1~;1sor,~ lntlent;

~ ~2 :;
.~

~2~

besln unslsne~ short t~hlP
char l;
uotlent = s~;
for ~l=3 l e= O;
besln *quotlel1t = *~uotlen~ C~ l:
tenlP a dll~ldenll ~'`' 1 r lF ~temP >= ,iivisor) then besln ++~quotlent);
di~ er.d = ~diel~ielld & ^'(^'O~:ti)) + ~tehlP - 41l.Jlsor) ~:'; l);
en~
enli returl1~ i,iend); /* the remalnder end /~*********************~***********~************~**************~*~**~**~***/
/* EOG.ERC. * */
/*************~** */
/* */
~* Th1s routine controls the ~OG test Protocol. It sets the tlmers */
f~ to call rst75~ e~er~ nutes. lnltlall2es the slabals to he *t ~* use~, cal!s rst75~) t'or the t'irst tlme, an.~ then ~Jalts for ~/
/* the har~are to ~o the ~llto~atic calllns of rst75~ ote *f : /* that slnce rst7~) wlll uP,~ate the eariable 'mlnutes', thls */
J* ro~tlne wlLI swltch on the bac~;sroun,~ :Llsht 15 mlnlJtes into */
.~* the test, an~ a~ter :3Q mlnut~s l,~lll Plot the con,~en~e~1 E~C */
/~t an~Pl~tulies~ ThQ h~c~srDund lisht an~ the tlmers are then */
/* t~.~rl1e~ o~F. */
/* *~
/* THIS ~nuT I NE ~ALLS: * /
/* rst75~) aon~ent) */
~ * 5 et~l t~ reset~lt~) *J
/* l~iserr~ isPla~) *~
~ GL~AL5: *~
/~* mlnutes mln_eosL7] ~f /* max_eo~2] r_err ~t /* l_err eos_fln ~/
C_Ollt3 ~J
/* ~
/* ~U'rOI`1.qTIC LOC~LS: *.' /~ nane ~'se~
/* ~/
GUMENrS~
,'* none use.~ ~t ~ *~
:`
~3 L6~7 t~ CONST~I rs: ~/
/~ C~M l c~n~ ~ /
!~ 5T~~TI 5TOP_TI *~
/ * 1~ L ~f /
!* LN1 M_~EOG ~/
~ 3 our3 ~/
/* M_DB~CK M_S~ACK ~/
/*~*~*~ ***~*~*~********II***lf*~**~****1f*~**~*1~*1~**S~***~*****~**~***~**/
eas~ ) b esl n /* Set both t1mers to 1B.C76 an~i start then)~ rh1s ~
/* cause the hardware to call rst75() e~)er~ nute. ~/
out (0~4 OxO~); /* Lower b~te o~ t1~ler count */
nut (Ox85, Ox75); /* uPper b/te o~ tlh~Qr count. an~ t1mer ~o~e ~/
/* ls set to a cor~t1nuous sqllare wa~e */
nut (OxC4. VxO~); /* Lower bYte of t1h~er count */
out (oxcs~ ~xf5~; /* UPPer t~te of t}~ner cnunt. ~ni tlmer mode */
/* l5 se~ to cantlnuous Pu1ses */
out (COM1- STA_TI~: /* Start t1mers */
out (lOM~. ST~_TI);
hl1nutes = 100; ~* In1tla11~e s10bals ~/
m1n_eosLR~ = mln_eosLL~ = 2~5;
nl~:1_eos~R~ ax_eosLL] = O;
r_err = l_err - O;
rit7~();
le ~ n~IN1) ~ ~_DEOC1) &~ !eos_fln) t~es1n f (n~lnutes b= 15~ /* Turr, on bac~;srouni 113ht ~/
setbit (~-se~cK~ &c_ollt3, OUT3);
f (m1nutes ~= ~O) /* EOG Procedure fin1she-i *t then besln conien(~;
eos_fin = 1:
end else f (r_err~ ll 1_err`~0) then iiserr();
else disPlaY (h~1nutes);
end if (1n (I~ & ~_DB~CK) resettlit (M_Se.~CK. ~c_out;~. OUT~);
aut (CO~ T~P_TIj; /* ~toF' RST 7.5 tin~er. */
out (COM2. sTop-r I);
~nd /*~ ~***~***~*********~***~****~*~******~****~**************~**~*******/
T~.ER~l ~ *~
/ ~ * * * ~ * ~ * ~ ~ * * /
! ~ */
Ih1s routlne ~11l outPIlt to the Plotter the result of 'toP' 1~/

~ 6~

/* lilul.ie~ t)~t bottom . Onl/ two disits the one to the r1sht ~/
/~ o~ the declhlal Polnt ani the orle to ~he Ift of the dec~ al ~/
/.* Polnt are ~rlnte~

/1~ ~/
/* TH I S ROUT I NE C~qLLS: ~f/
serlal( ) outPUt l ) */
/ * 'i l ~
/ ~ ~/
/* GLOBf~LS: */
none use~

/~ */
/* f~UTOM~TIC LOCf~LS: */
~1~ ullslsned short dLslt - dls1t to ~e outPI.lt */
/~ unsl~neli char b~te - ~LIr tJalue o~ ilslt to ~e out~ut */
/* */
ME~IS */
uns~slled short toP ~ en~ of the al~lslon */
~* unslslted short bottohl - al~ sor of the lill.~l5101t ~/
/* *~
/~ CONST~ITS: */
one ~.Ise: */

/ ~ */
~*~******~*tr*****~*****~*******~*~****~*****~*********~**********-~**~***/
t'r~ctn~tuP,botto~l) .lnsisnea short toP/ ~OttOhl;

besln unsl~ned short dlslt;
.lnslsned char b/te;
~Inslsned short rehlaln;
serlall Lt~ ) /* ~nehlonlc to inltl~te the Prlntlns o~ labels *~
remaln = dll.~ (toP botto~1lr ~tdl~it~;
bYte = alslt + 48 oUtP'Jt (~te); ~ L-~ut~ut unlts ~iislt *' outP~.~t ( . );
dl~ l(rehlainc~ (rehlaln~3)~ bo~tohl~ ~t~ lt) b.~te = l~lslt ~ 4~;
: o~ltPUt ~b~te); /* OUtPut ~lslt lhlhlel~latel~/ to the le~t o~ thæ ~/
outPut ~ ); /* l~eclh~al Polnt ~/
end /*~**1~**~*t~***~******~********~**~***-~****~***********:i~*~********~it*~***/
/ ~ 11\1 I T . t~RL. t * t / - ~ * ~ * ~ t ~
/* ' *~
!-* Thls routlne lnltlali2es all Pertlnent ~ar~ables at the start of */
/* the Pro3ra~1l. it~
/~ THIS ROUTrNE C~L.L!~
dCPOt~) */
~* ~ ~/
~ ~* l~ eR~
~* o_out1 c_out? ~' t_t rls t_sal 1,~0 *~

', ~
6~

:
~:

~16~7 t._,~oe~lY select 'f/
~ n_c~ b ~lash ~/
/~ error crash ~/
/~ rePe~3t s1nsie ~/
9ht_0n lonP ~/
/~ e~tPect~ ] ~ t3 ~/
J* eo3_fln r_err ~/
~ err he~
~* ~,/
~ UT~ Ti7C LOC~LS: */
/~ none used */
/* ~/
~ ltGU~ENTS: ~/
./~ none used ~/
/ ~ * /
CO~ISTANTS: */
~ EC~LL DU~ */
/* N_OFF ~UTl ~/
/* OUT2 CO~
COM2 STOP_TI . */
/~ QD_TRIG ~D_CAL~)O */
./* ~D_DOUBL~ SER_STAT */
/* ~/
r7*********~***************~**~***********~******~*~**********~**~t~******
t ~) be~ln out ~RECALL. DU~ Put ~EPR~ table lnto sha.iol.l R~M */
c_autl = c_out2 = c_out3 = N_OFF; /* rurll oft' all Cl.ltPIIt Ports ~/
out (COM1, sroP TI);
out (COM2. STOP_TI~;
out (OUTl, c_outl~;
o~lt ~OUT2. c_~ut~);
t t~UT3, c_out3):
out ~ER_ST~T- OxF~); /* ~et ~o,ie for ser~al POrt,, blts- e~.~en */
/* Parlt~ stoP b~ts ~/
out (SER_STAT~ (~xll): /~7 Set Coml,land Instruct~on t`or serlal Port */
t_trl~ = adcPot l~9_TRIrl, ~. 157); /* Set Pre-trlsser ~nter~
t_saluo = a~cPot ~D_LAL~, 37 157)~ et lensth of t`lash ~!
t_,~auble = a~cPot (AD~DO~BLE, ~ 97): /* Set ~nterual between */
/~ double ~lashes *.
/-~ Ini tl~li 7 e oarious fla~s *~
seleot = 1:
hex ~ eos_fin = r_err - l_err = ~;
ln_calib = flash = errcr = cr3sh = rePeat = s1n~le - lisht_on = looP - 0:
/~ Ini~lali~e the exPecte~i flash ~Jalues t'or all Poss~ble atten- ~/
/* uatlon sett~n~s ~/
exPecte~L~ 31 exPectedr 1 ] = '~11~;;
eNPecte~.lL;'] = ~ 57^
exPectel~c3~ - 193 ~P~t~7liC4] ~ 1~4:
æxPecte~C5:l ~ 17'~;

~?~

6l~3~7 exPecte~[6] = 172 e~Pecte~c7~ 7 e ~PectedC8] ~ ll~C);
exPeCteq[9] ~ 154;
exPeate,i[10] = 149;
e:~Pecte~iC11] ~ 142;
e~PeCte~ ] = 141~;
ei~PectedC1~] - 133;
eKPectQq[14] = 132;
e~Pecte~C1 ~ ~ 125;
e~PectedLll3~ ~ 121;
ecte~C171 a 11~
~xPectec~[l~3] = 11~);
exPecte~iC19~ = 94:
e~PecteqC21~] = 82;
e~Pecte:lr?l] = 6~;, exPecte~L22~ = 49;
e ~Pecte,~73~ = ~7;
exPecte-11.24~ = 24;
exPecteqc25] = 19:
exPectedC26~ = 16;
eXPeCte~iC27~ = 12;
exPecteqc28] = 1~;
e~PeCtedC29~ = 8;
e,~Pecteq[30~
exPeate~C~l~ = 5;
e~PeCteliC32~ = 4;
exPecteqC33] = 3;
e~ecte~C34~ = 2;
e~Peate~C35~ = 2;
exPectet~C36] = 2;
exPecte~iC~7~ = 1 exPeatedC39~
exPecteaL~9~ = 1;
P~PectedCa,O] ~ 1;
end Ur**1~*****~r~**~***~r**t~*******~* lI* ~lr~*~ *~*t~***~f*t~t~******t~*~**/
/~ MO~E~ER~l * */
/*~***~,********** */
/~ *~
lS rOU~lne Wlll OU~PIlt the HP~L cohlma~ s to ll~o~Je the Platter */
/~Pen to t~e absolute locatlon s~ en b~ ars~lmel~tts x an~ A *~
~* f/
~,1`HIS ROUTINE C~LLS: */
s er ~ *~
~*a~ltPut ~ ~ i'r/
/ * * /
~*CLI~e.QLS: */
/*none use i -~
/~ ~/
~*~TOPIf~TIC LOCQ!.S~
/~r uns1sne~ short ~CV,] - arra,~ lnto WhlCh the bcd ~ t5 re P l ac e~
6~

~L68~7 Jt~ nsL9ne~i short iteP - LnCrementer t`or looPc ~/
unslsne~ char- bYte - ~.SCII l~all.le of the lil91~ t,o ~e OUtP~1t ~/
~ ~*/
/~.41~GUMENTS~
~* unsLsne~i short ~ ahsolute locatlon t,o ~ ch the Plotter ~/
~ Pen shaul~i be mo1le~ ~/
/* */
/-t CONST~1TS: */
~ none use~ */
/* */
~**,~*t~ ****~**i~***~*~******t~**********~**.tt~*****i~t~*******************/
e ( u1ls~sned short b e g 1 n unslsnr~ short ~L4];
1nsletned short steP;
~nslsned char b~te;
serlal("P~ ); /* 5tart of con~nand sequence */
d~l] = dl~J ~1Ji-J (~ 3~2~; /* Conuert tne x ~/
for ~steP=3; steP~-O; steP--? /* co-oriilnate to BCD */
be 9 1 n b te = .itstePJ ~ 48; /* Cunoert tne ~ilslt to ~SCII ~J
outt~1lt ~b~te~;
t~
outPut ( ~
~1] = ~lU (lil-.~ O ~ .. iC2]~; /* Con~ert tne ~ */
for (ste~-~; steP`>1~; steP--) /* co-orilnar.e to B.CD */
bes~n b~te = ~steP~ ~ 4H~ /~ con~Jert the il~lt to ~SCII ~/
outPut (b~te):
en~
en.~
~***t~*t~********~ ****~ **~****************t~******t~***t~*~****i~*tt****t~****~/
/~ ~PENGA.ERG ~ ~/
/********~******* */
/* ~/
/* Thls rautLne ~Jlll trlseer the har~ are lnte~ratlon cLrcmltr~. */
/* oPen the shutter for the aPPraPrlate tin~e. close lt an-~ */
/* ~Lsahle the lntesratln~ olrc1.~ltr~. The shutter ma~ be held */
~* oPen tor anY reason h~ troun~ir1s the test Pln on the slie of *~
/t~ the hll croPro~essor hoar-i. */
* rH I S ROUTINE f~LLS: */
~ sethlt(j resetblt(~ ~/
/* ~ielaY~ ~ ~
i* */
~ L~ L~
~ ~ C~ 'C 1 9.1 1 ~
t _ga l u o ,, ~ ~i /

~?

~ Z~689~7 LIrOMf~ r ~ Lnc~Ls: ~ /
~ e ~.ls~
/* -~/
Ql?CiU~ENTS~
e us ~
~* */
~t CON!~T~NTS' ~t/
/ ~ M. G~LI.~O OlJ T 1 * /
/* OUT .r3~c lN3 */
/* M_H_Gf~iL~.~O P_OFF */
* /
/~****~**********************************~*********~*****~**************~/
o P e n_~ a l ~ o ~ ) be~ln setblt ~_Gl~L~c_outl. ~UT1~; t* Enable flash lntesration */
out (OUT_D~ a); /* ~Pen s~utter */
hl9h ) delaY (~40); /* Shutter oPerllns at h1~h trequenc1es 15 Pre- ~/
/* set to 15 ~lIliseconds */
else dela~ (t_Yal~o~; /* Other~-~lse- oPen tl~ne 1S ~eterhllne~
/~ h~ the s10hal t_saluo */
~-~n~ie ~ n (IN~ _G~LIJO~ ~* If test Pln 15 sro~n-3e~i hold */
; ~* vPen the s~lltter */
resetb1t ~M_G~L~U &a_outl OUTl): /* Dlsable t`lash Intesratlon a/
out (OUT_D~C P_~FF); /* Close shutter ~/
en.~ .
,~********************~*************~*************************************~
/* ~UTPUT.ER~l * */
/~**********~**** */
/* */
/* Thls rout1ne ~lll sen~.~ one h~te to the l~_32 lnterfa~e ~1a the */
/* 8 Sl~ c~nlmlJnlcatlnns chlP. It ~ o so onl~ 1~ the ~ */
/* bu~fer lS eh~pt~ an~ the ~eu1ce on the ather en~ of ~he ~S2r3? */
/* lin~; lS rea~Y to recel-~e ~ata. *f /* */
/* THIS ROUTINE C~LLS: */
~* nothln~ */
/* ~/
/~ GLOB~LS: */
/* none usecl ~/
/~L */
/* ~UTO~TIC LOOQLS: *~
~* nol~e used ~,. ~/
C1Ui~T~: ' ~-~ unslsned cnar ~te - c~aracter to ne ;ent to the co~ ln- L/
/* lCatlOns ChlP ~/
,/ tt ~ .' ~ T ~_E~Pr`

6q :~Lz~6E3g7 * sEr~ D~r~ ~-r.~ .,t/
/~t ~t/

t ~ * t~ ~ tt * ~t ti ~t * ~ tt * t~ tl 11 tt fl t~ It * tt lt * * It * * tt lt tt 1t It ~t tt * ~t It ~t ~t It tt * * It * it ~J~ * tt ~t ft lt ~t ~t ',t ~t 1t f t * ~t ~ tt 't ~ ~t It ~t * 1t lt ~t /
OUtPI.It I D xt~j uns~ Yd char b,~te;
bssln hlle (~!(in(SER_STQr) ~ M-E~p r~ rl(SEii_S rA r j i~ J1-REhD~))) a1t llntll B~SlA l5 emPt~,~ an~ the ~/
/* ,Jol)lce on the o~ner erla af tne RS?3Z ~/
/tt 1 ln~; 15 rea,i~ */
0~ (S~r~_r~r~t~ ~te);
en,~
/****1t',t It***~ttt*tttttt**tt*******tt****~sttt***********************~***tt******~-~***/
/* PL:~'r.~rtli * */
/*********~****** */
/* */
~* This routlne ~ tl~e the ouPut t'ro~l the a slsnal a~Jeraser */
/~ and outPut the ri~ht an~i left ERG ~aoeforh~s to the HP 7470A ~/
/tt ~raPhlcs Plotter IJla an RS~3~ l~n~;. The ~ a~Je latenc~ an~ t~/
J* ah~Pl~tu~ie are obtalne~ tro~l the lnPIt slsnal ana also ~t/
/* annotate~i on the sraPh. ~ote that the ~otter lS Prasramea */
/* ln HP GrlPhics Lansuase l~nemon~cs~ */
~* */
/~ THIS ROUTINE ÇALLS: */
/* serlal() mo~/e~) . */
~* aac() Prlnt~) */
/ ~ */
,/~t GLOB~LS: *
/* ~_trl~3 atten *
/~ t_saloo error ~t/
/* */
~ ~UTO~TIC LOE~L5:
/* unslsnel~ short steP - lncrementer ~or looPs ~/
/1~ unslsnea shart x - c~lrrent x-axls oalue *~
~* unslsneo short ~ - c~rrent ~-axis ~Jalue ~/
~* unslsne~ short X_hIln. ~-h~ln - co-oralnates o~ the A-l~aue -'tt /~t unslqne~ short x_max, ,~_hlax - co-or~lnates o~' the ~ a~e */
/* ~t/
/* Al?GUnENTS: ~/
/* nane use~i */
/* *~
/~t CONSTA~TS:
~* AD_Y
/* AD_PEN
~* ~/
/ ~lt****~**~ ~t*************** lt***************~t****7~********~*~t********<~**~* /

P l O t ~ ) besln unslsnea short steP x. ~ hlln~ _n~ax, x-hlln~ x-hlax for ~te~ ; steP~?; steP~) b e 9 l n '7D

6~3~7 ~_mln - 255 s~_n1ax = 0;
serlal(" rho~ );
serlal( \33\~ lO()'~ 5et RS232 hands~a~Lr~ to Plrl 2~
serlal("SPl S00,350 0 300 ); /i~ Define c~-or~lnate ~rea ~/
muoe (aic~D_)), a~c(~D~~));
serlal~"PD");
whlle (a~c ~AD_PEN) C lOO) /~ Pen io~n ~/
besl17 /~ Dls~tlze an~i Plot Polnts ~eePlns a ~/
x - a.ic ~AD_X); /~ loo~;-out for the A an~ P waoes ~/
- a,~c (~D_`t);
F ~ c ~ n) ~esln ~_hlln = ~:
~ _ hl 1 1 olld t (~ h~ax) be~ln ~_h~a~ = Y;
!~_h)aK = X ~
en.~
a~Je (x ~);
dela~ (800); /* 50 h~sec .iela~ tu Pre-~ent the Plotter bl(tFer */
e"~ /* from f~lllns UP ~.~lth rePeate~ ~olnts */
serlal( PU;SP2:5~* );
h~ove ~x_mln ~_~ln~; /* fl~q ~-wa~!e wlth an ~ster~s~; *~
h~o~Je (~_max ~ maN); ~* Flas ~-wa~Je wlth an asterlst; ~/
serial( PU;S~;');
hl O ~ , Y ) serial( DT ;L8Latenc~ * Print the latenc~ ~n~ Peat; */
Prlnt (x_max-(t_trls,~.`.4)+1); ~* e-wa~)e amPl~tu~e */
serlal("L~lmsec ;CP;Lef~h~ u~e: ");
,c r ~ ~ t ( t r_hlaX- ~,~_n~l n ) C
serlal("LBu~ ");
wh~le ((a~c(~D_PEN)~10')) ~ (a~c(~D_PEN).~lQ()) && steP==O) ; /* ~a~t ~or Plo~ ot the ERG wave~orm r`or th~ next e,~e ~/
en~
serial('PQS 25?DO.~5.~-0,2').0 20.5PU25 0"): /* Record scale */
ser~al~ LB20h~sec P~0.3C~LB~Ou'.' ');
n~o~e ((t_trl3~4)~1 36j;
s1rlal( PD;PRO 2l9PU;PR3 -5;LeTrl~ser '); /* ~art~ wnen llsht was -~/
serlal("CSO;SS;DT ;SC;"); /* trls3ere,~ */
serial( IPO 0,lO30C1.7650 );
serlal~ ~IO.7.l.0 );
ser~al~ SPl;P~l570.7250 );
serial( L~ELECTRORETINO~RA~ Title sraPh ~/
serlal( SP2 );
serlal~'SI()~28Ø4');
ce~ial~'P~l~C)~ 5~
serlll('LBAttenuation~ * Prlnt aut the stlh1ula~lns Parah1eters ~/
~rlnt (aTten);
~rla~ 11pl );
erlal("P~5l50.6850`);
serial~ LBOhrah1atlo LBFil~erin~ ");

~/

sl~ltch ((a_~ut2 & Ox38) ,>~ 3) besln case 7:
ser1al("LBWhite ");
brea~i;
case C:
serlal("LBRe,i "~;
breat;;
oase 5:
serlal("1BBll.1e ");
brea~;;
case 3:
serlal("L~,Green ");
brea~;, ? en,i serla1~"Pf~1"00,~55~
serla~ Le~Flash L~Lel~st~: ");
Frlnt ~(t_sal~o`S~4)*1);
s~rlal~"L~sec ");
serlal1"PQ5l50,655V");
ser~al("LBCallbratlan: ");
i~ (error .~ 3) then serial("L~Error ");
el~e serial~"LBO~K~ ");
s~rlal~"SP~;");
end /*~**********************************************************~***4~*~*~**/
f* PRI~T.~RG * */
/*******~******** */
/ nL * /
~* Th1s re~.1t1ne 1-)lll outP~t t~ree ,ilslts ot~ the 3rsun1ent 'n~ be~
/* to the Platter. 1~/
/ ~ */
,~; lHI~ U r ~ c f~LLS' ~/
- OUtPUt~
.'~ ser~al() /,~ . ~/
~-~ GLOe~L'3: ~/
none used ~f ,~ * -~ /
f~ f~UT~l~f~TIC LOCf~LS: */
~ nsl~ned shart ~C4] - arra~ that nol,is the ~.or~ lues ot` -~/
f~ the ars~lhlent ~.~
~ uns1~lle,i shart steP - lnrren~enter t'or 10aPs */
/*unslsne.i ch~r D~te - f~SClI .~lslt to ~e sent to the Platter -~f ~t *~
f-~ LlUME~TS: */
f* unslsned short num~er - ~.~aI~e ta be ~rlnteo */
f~ CO~ST~NTS: *f /~ nane uce,~ ~f f / -:t * * * ~t * * * ~ * ~ * * * * * *
~ * i~ * * ~ * * * ~ *

7~

~2~68~

Pr1nt(nu hl ber~
uns~ e~ ~hort nuhlber;
besln un~.sned short ~iC4~;
unslsned short steP;
unslsned char b~ft~;
serlal ~"L~ * ~UtPIlt mnehlonlc to start Pr1ntln~ labels ~/
I~C] = ,i~ lV (nUhlber, 1~ iC~]~, 10, X~ J);
for (steP-3; 5tQP`>~; steP~~) bes.ln /* Prlnt 3 dlgl~5 ~/
b~te = ~[5t~P] ~ 48 outPut ( b~te), en~
outPl~t ( ~n~
t**~*******~*********~*~****~*******~*********~********~*****************/
/-~ RESETB.ERCl * */
/**~***********~ */
/* */
/* thls routlne resets the bits in~lcate~ b~ the arsul.~ent 'bl~_hlas~' */
/* to hlsh. slnGe all autPut Ports use nesatllJe loqlc. The */
i* status o~ the Port lS ma1ntalned in the aPProPrlate slobal */
t~ &c_out. */
*/
~7~ rl~Is ROUTINE C~LLS */
/* nothins */
.~ ~/
LO~.~LS: *
/* none use.i /* *~
~* ~UTOM~TIC LOCALS: */
/-~ none use-i */
~* */
.'* ~RGU~ENTS: */
i* unslsned short bit_mas~ - Pos1tilJe loslc Illas~ hlch *i /* indlcates l-lhlch bits are to be */
/~ reset */
.~ unslsne,~ short *C_olJt - Polnter to the l~arlable that ~;eePs ~/
/~ trac~; of OUtPIIt Port status */
/~ unsl~ne~ short Part - outPI.lt Port */
/~ ~/
/* ~NSl~NrS:
/;t none use~
~* ~
~******~i****~**********~****~*********~**~t~f*:~**~*********~t*it~t***~*'t/
r~set~ bl t_hlaS~;r c_out r Port) uns13ne.~ snor~ ~lt_hla5~;~ *C_~Utr Port bes1n *C_OUt ~= blt mas~ * ~hanse ol.ltPut status ~31 cbal *~
OUt (POrt~ ~C_OIlt~; i* Reset ~lt5 *~
en~i ~3 -12:1GB~7 / * 1~ * * 't lf st st * 1t ~ * ~f * * * s,t ~t * ~ * lt ~f 15~ * * ~ * * ~ * * f f * If l~ * * ~t st lt If li If * ,t lt 1f ~f st If if f f ~ ~ sf ~f 'st f ~ * If * ~ S; ~
~ # I?ST65 . El?Li * */
t****~**~t-sf ***'~t sf ,~,/
.~ ~ */
/* ThlS rOUtlne lS l.~sual1~ ca11e~ h~ harc~fwara to ,~ert'arm ane t'l~h */
/lt sequence as Sieterfnlne,J b~ the ~Jalue of seaeral sloo~
~f e~rLables. first ~ chec~ is ~nalie i~ the ~'lash llsht source lS */
/* orI, an,i l~ nrt, lt lS turne,~ on an'f t~ere lS a dela~ of one */
/~f sflcon,i to allow the llsht so~Irre to I~arm uP. "~'he routlne */
/* smo~ie lS callei to ,ieterfnine the c~Irrent status af the control */
/~ P-Snel. If the rate 15 ~lof~/ or '~3asuble', then a Pre-trlqser */
~* Pulse ls sent. The sh~1tter ls oPene~ b~/ f~allins oPen_3alI)0~)~ */
/* 'Ihe enars~ of the t'lash ls ~eas~1re,i. ar"i i~ lt is IlOt as */
~st exPected~ the 'O_IT OF CALIeRQTIO~' llsht lS turnei on. ~/
/* I~' the rate lS '~iauble' then a secan, Flash lS Pert`orfne,i. */
/* */
/* THIS ROIJTINE Lf~LLS: ~/
/* setbit~) resetblt() */
/* ,lela~l) sn~a~ie~) */
/* a,ir.~) ~* */
/* GLOfB~LS: */
/* c_outl l lsht_on */
/-~t tlfne 5ingle */
/st 10!.1 hl9!1 */
/~ ~ioubl t_trls ~t/
/* b_flas~ flash ~/
./* t_flasht] f'_exPec~t */
J r exPecte~i~] atten ~/
/* b_~ac~; t_salIlo */
,J - -rallse l_ral-se ~/
f~ er-rar t_~auble ~/
~ it rrash *~
J ,1 ~ /
/~t AUTOM~TIC LOOALS: */
/-; nane use~i */
/* hR~lU11EsNTS */
~* none Ilseli */
/* ~t/
~ it t Os\lSTPsNTS
/* M_l?ST6~ OUTI *~
/ st r_LIGHT M_TRIa ~
/ -r AD_FLASH AD_BACK It /
/* M_OUT_CAL */
/* */
/*-**~**l~*~t***********l~******************~t***~t~*******~.t*****~*******~S~*;t~t/
rst6Cl ) ~esln ~etolt l~_RSTli~ c_outl, OUTl); /* Har,sware ~la3 to lr,ilcate the ~/
/~ lnser~Pt has ~een ansere~
lt` (!(113~It_o 7~

be~ln J~ Flash lisht sourre 1~ not on ~/
setblt (~_LIGHTt &c o~tl OUT1);
~ela~ (l61J~ alt t'or 1 seco)~J to allo~l ~1aSh 11~nt ~/
llsht-on ~ source to warl" UP ~/
el~o tlh~e = (:~; /* lieset tln~e slnce last Flash ~/
f ~s1nsle == 1) /~ ~ndlcate that sinsle t'lash lS helns PrDcessei ~/
slnsle = 2;
lol~ = hls~ = ~oubl = O;
shlo-~e ();
soltch ~mo~ie? /* Set lariables accordlns to the rea~ins of */
besin /* the RQTE sw1tch on the control Panel ~/
case 2:
hish = 1;
br Q a~;
casQ 1:
doubl = 1:
brea~t;
ie~ault:
lol.) = l;
brea~;;
eni f (iollt)l li low~ /* OUtPut Pre-tr1sser Pulse i~/
be~ln 5etbit (M~TRICl ~c_aut1, OlJrt);
~ol~ ( t_trls~;
resetblt ~_TRIG. ~c_outl ~UTl);

DPQn-qa1~IO ( ); ~* OPen salvanoh~eter shutter ~/
f ~!(hish ~ rePeat)) besin b_~lash = aac l~D_FL~SHI:
f'lash = t_flashlb_~lash~; /* flni callbratei ~alue of ~`lash i/
/* Flni exPeCte~ IJalue oF flash. that 1S correctea ~/
/* accoriins to ~acK~roun~ lrra~lance and lensth ot` flasn ~/
f_exPect = (e~ecteaCatten~ - ~_bac~;) * ~t_sal o ~ 4) /
/~ Fina allol.lable ranse of error *~
ranse - ((exPecte~Catten~ ~ b_bac~
/* Ma~;e sllre iower ran~e l5 not nesatlJe ~,~
l_ranse = f_e~ect - ranse;
~' (l_ranse ~ I~) l_ranse = O;
b_~lash C~ f_exPect ~ ranse) ~ (b_t'lash .~- l_ranse)) error O; /~ No errur */
else error -~ 1; /* ~ or ae~ec~eo 1, ~
t ~(e~ror '3~ ~ (!hlsh~
set~lt (~ OUT_C~L ~c_out1 OUT1~ f three errors 1n a row -i/

/* then t~lrn on OUT OF C~LLe,R~TlON llsht ~/
f!1se resetblt (~_OUT_CAL, &c_outl, b~Url~;
f (doubl) /~-i If rate lS ~ial.lble tht'n per~arh~ ane tnore flash ~/
be~ln ~ek-t, (t_do~1ble):
oPen_sal~o ();

if (crash) ~* Restore ~C buffer to ct)ntaln a ~/
~c (~D_B~C~); /* bar~ro~ln,~ rea,il11s */
resetbl~; ~M_RSTS~, &c_outl, OUTl); /* Reset har~l.)are t`las ~/
e;~a /*~*~***.~*~*****~*~*********~if`~*~i****~********~*************~*~**~**~***
~* I?Sr75.ERG * */
/***~f***~ ******* */
/~ ~
/~ Thls rautlne wlll turn on tne osclllatlns LEDs useli for the l--OG */
~* test and measure the r~sht an~ let't amPlltu,ies obtal11e,i t`or */
~* S c~fcles~ ~n attemPt lS ~ade to Fln~ 3 an:Plltudes whlch are */
~-r ciase tasether, the aaerase of whlch lS store,~ as the anlPlitllae */
/* t'or that ~lnute. I~ the attemi~t ~'alls t`or the rlsht e,e tnen */
/* r_err lS set to 3, and lf the attemPt t`al;s ~or the left e/e */
/* then l_err lS set to 3. */
/* */
./* THIS ROUTINE C~LLS: */
/* setibit~ resetblt() */
/~ an1Pllt() ~iiserr~
'* ~lsPla~( ) *
,' ~i ~ ~
f ~ bi L i~ t3 f~ L S ~
/* ~llnutes c outl */
/* eos_aC~31~ r err ~/
/* l_err *~
,/~ */
/* AU`rOMQTlC LOC~LS: */
/l~ unslsned short e,e - e~e that lS belns Processed ~/
/* unsl~ned shart steP, hill - incrementers For laaPs *~
/* unslsned shart count - number of ~ali,i a~lPlltudes foun~
.nlslsned short finishe,i - PasltllJe 1091C flas to ln,ilcate *~
/* tf 3 ~alld am~lit-n~es hal~e Deen -~
o ul-"~ * /
/* unslsne.i short total - total use~ to ~ind at~era~es *~
/* unslsne,i short deulatlon - ~e~)latlon t`rahl ot~er ahlplltul~es ~' t /* ~I~GUMENTS: */
t ~ nolle llse~ 4 /t~
/~ CONSThNTS: *t /~ M_SEOG ~_DEOG ~/
~1~ M_CEO~ OUTl *~
,~.i INl IN3 .~/

7~

~6~g~

/, )~ 1~ * * ~ t * ~ * * l~ * ~ * * ~ * * ~ * * ~ r ~t ~ * 1~ * i~ ir i~ ~i ~ ~ * * ~ ir ~ * ~f ~ ~t ~ 1r ~ * ~r 1r~ t~
rst7'c() be 9 l n nslsnel~ short e~e, stePr count, U~ flnlsne~J, total, ~eulatlnn;
~o~slsne~i short alnP[2~C6];
n)lnutes += l;
1f onlnutes`~ o~ ~lnutes ~ O; /~r Flrst tlme rst75~ LS oalle~ */
setblt~M_SEOG, ~c_outl, ~UTl); /* Turl~ on t-~0~ shts */
f'or (step-l; s~eP~6; steP~) t` (!~in~ DEO~)) besln whlle ~!(in(IN3) ~ ~_CE~G)) ; /* Walt for Paslt1ve ~OG SSU~G */
amPlit ~amPCO]CsteY}, &amPCl]CsteP~);
f ~r_err,~O 11 l_err`~O) then diserr();
else 1f (in ~IN1) & ~_~ISPLQ~'~
then disPla~ (ah)pcr~]cstep]); ~* D1sPla~ ahlpli- ~/
else iisPla~ ~an~PCl]CsteP]~; /* tu~e if no *~
~hlle (in~IN3) ~ 1~1_CEOG) ~* error *~
: /* W~lt Far EO~l s~nG to so ,iown as~ln *~
en~i rese~blt (~_SEOG, &G_outl. OUTl~ Turn off t~ )i llshts *~
f ~!~tn~IN1) & ~_DE~G)) b~in For (e~e=~; e~e':2; e~e++) /* Far eaGh e~e */ besl)-t`lnls~le~i = ~);
steP = ~i;
hlle (!finlshed) besln ~* Startlns wlth the bac~ alu.Ys, t'~nli ~.
total = amPCe~e~[steP]; ~* at least ~ a!l~Plltu~ies that *~
Gount = l; /* are close to~ether ~/
for (bill=steP-l; blll.`>O; blll--!
besln if ~amPCe~e]CsteP] ~ an)PCe~,~e]Cbill~) then ~e~ at1on = a~llPCe~e]~steP~ - amPCe~.~e~[blll];
else ~e~Jlatlon = amP[e~e~[blll] - alllP[e~elCste~1;
if ~ie-~1atlon besin count ~
total ~- arlP~e~e]cblll];
en~
en~
f (count .`~
then /~ ~t least ~ all)PIlt~ es fou)lli *~
b~ln eo~_a[e~e~Cn~1nl.ltes] = total/count: ~ Fln~i */
if (eos-~[e~e][nlLnlltes] != O! /~ aoera ie ~/
f (m~l~utes ~
then /-~ Fln~i the hlln . ~iar~; ar,lPll tu~3e */
besln t' ~eos.aL~ e]~ snut~ 9~ ~ m 1 n_eu ~ e~j ~ ln_eosCe~e~ a eO9_aCe'~e~Chl1nUteS~ r en~
/~ Fln,i th~ ma~ sht ahlPl1t~ */
el5e 1\` ~eoy-aLe~e~cm~ tes] ~ hl~ eu~Le~
hl~x_eos~e~e] = eos_a[e~el~hllnutes~;
~inlshed = 1;
end else sf (steP ~ ~) ~hen /* ~mPl~tudes not close ~/
bes1n ~* enoush */
F (e~e==0) then r_err - ~:
else l_err = 3;
~inlshed = 1, enli else besll-steP--;
f (e~e==~) then r_err - 0;
else l_err = ~;
end end en~
en~
end ~****~******~*******~t****'t*********************~t******tt*~***~*tt****t~*****//~ SERI~L,ERG * */
~tt*t~*~***********
~" */
J* Thls ro~tlne w111 sen~ the strlns '*~lessase' to the Plotter via ~/
~* the R~'32 lln~;, *~
~* *~
~t~ THIS ROUTINE C~LLS: *~
/ ~ o u t P~
/~ ~/
Jlt ~lLO~LS
/* none use~ */
/* *~
lJTO~QTIC l_OO~L~: ~tJ
~* ur,slsne~ short steP - lncrehlenter ~or looPs ~!
~-~ *~
RGUMENTS: t~/
~ nss3ne~ char *hlessase - Polnter to the strlns t,o ~e :tJ
/* sent to the Plott.er ~t/
~* ~ NT~ t J~ none use,~ t~
*~
tt~ t~ ~t~**~***~t****~-~t~t~ tt*~t~t**~4**~t~-~1t~4~ t .t ~ it*i~ t-~-t~i~
sPrl~l(messase) ' 7~

~2~L6~

.~nslqnei char *h~essase:
beqln unsl~ne~i short steP;
ctep - I);
hlLe ln~essa9eLster~ Se~ he stT'In9 to ~he rou~lne heg1n ~1~ C)l.~tPllt( ) one ch,-lr-lcter ~t a ~/
outPUt (l~ess~e~steP~ 1 tlme ~/
steP~;
e ena /***~***~**~***************~**************~**~*~*************~********/
e~ I T ~ L~ R l~ * /
* ~ ~ ~ * * * * * * /
/* ~/
/it Thl5 routlne 5ets the blts ~n~ilcated b~ tne ~rsu~l~ent 'blt_mas';' */
J* to low. s~nce all the outPut Ports use nesatl~e loslc. ihe */
status ot the ~ort lS malntalne~ ln the ~PPraPrlate slo~al */
~-~ &c_out. *~
/* */
/~ T.~IS ~OUTI~E C~LLS: * ~
/~ nothlns */
~* */
/~ GLoeQLs: */
/* none use~ */
LIIOI~rIC LOCQLS: */
~* nane use~ */
U~ENTS: ~/
~ unslsne-i short blt_~asK - ~oSltl~e lo~lc masK wnlch */
J~ ln-~lcates ~ ch bles are to be ~/
set .'~ uns~s~ed short *C_o~lt - ~olnter to the ~rla~le that ~;eePs ~/
~* trac~ of autP-.lt Port status */
/~ unslsne,i short POrt - outPU~ Port */
/~ */
/ * C O~!S T f~ N T S : ~ /
f* none use~
/1~ *~
/7~**1~*****~*****~**************~**~*~****1~*****'.~**********~*i~ ~*~`~*/
setblt ~blt_mas~, c_out, Port) u-,slsned short blt_masK. *c_outr Port;
bes~n *c_out ~= ~blt_~asK; /~ Chan~e outPut status 310bal ~/
out (Port. *c_out); ~* Set hlts */
en~i ~ -'r***~ * ~ ** *** * * ** * ** **** **** **** ******* ** ** ** *~* ** ** * ~* *~ ~* * ~ ~* ** 'q' ~ ~* ~ ~ * /
.~RIi ;~ */
*~*****~* ~**** ,~, /* ~
j1~ Thls routlne rea~s ~ost of the control Panel s~ltcnes an~ ~Lso */

7~

~2~i$~7' ~-* tahes care ot' a fet.~ houset~eePIns ltems, ~t ee~,Js th~ thlI~nb- if/
theel attenuatlo~ tch and set~ the ~tIottal '~ ct~ ~o thQ ~/
eslre shutter oPenlns. The 'sinsle' s~ tch lS rea~ to sQe ~/
~* lt a slnsle t`l3~;h sequence l~ ,ieslred~ Ihe ~tac~;sround swltch */
/* lS read and the b~c~;sro~lncl llsht set accor,iinsl~, The rate ~t/
~* swltch lS read to ~ietermlne the lIo.ie of o~er~tlon. fhe rePeat ~/
/~ sl.lltch lS chec~;e~ an,i ~lsa the cnromatlc fllter s~liteh IS re~d ~
an,~ the aPPrctPrlate t'llters dre set. rhiS rctutll~e also turns ~/
/* off the t'lash lisht source lf about ~ ~nlnl.Ites has Passe,t. */
/* */
/* THIS ROUTINE ~ALLS: */
!* resetDlt() setblt() */
/ ~ */
/ * GL oe~ * /
* tll.le llsht_on */
/~ c_outl thumb */
/* Dcl~C] atten */
/* salvo t_calC] */
/* slnqle hlode */
/* rePeat c_out2 */
/* C_ol.lt3 *
/~ */
/* ~IJTOM~lIC LO~tl_S */
/* unsLs)e~ short sherr~ - lncrehlentlns ~arlabIe ~-tr looPs */
/~ */
RrlU~ENTS: */
~-~ none use~i *
* ~/
/* CQ~I~T~l`lrS:
/~ r~_L IGHT OUTl */
/~ IN2 IN~ */
/* M-sI~lGLE ~_r~e.~ */
/1r ~_~BAOK INl */
~* M~ E ~_INTER ~/
~* M_REPE~T F_OFF *
F. ~IIGH F_LOI~I *
~* OlJT1 L~UT2 ~/
/* M_CHROM OUT3 ~/
/~ */
/*~-*************~***********~************~********i~*******************~**/
', hl O de () besln nslsned short sherr~, t~nle += 1;
f (tlme `~ ~QO(~ lish~_on) 51n /* Tlhle t'l 5Wl tch oft' flash llsht */
resetblt (M_LIGHT, ~e_outl, OUT1); /* sourca */
1 lqh~_on = 0;
en~
thum~ n ( IN~ Ct~(FF; /* Rea~ t~tunlDwneel ~ttenu3tl0r, s!-tltch -~/
hC~rl3 - thl.lhltt ~ Oxl)F;
b~ ~] = th-lhI~ 4;
~7~

~2~6 cttte~l a ~;
t'or (sherr~ = 2; sherr~ -sherr~ onlJert the ~O~ to blnclr~
3tten : (atten ~ * (atten ~ bci[snerr~J:
atter, &- V~fF;
it (atten .~ 4 tl1~n besln att~n = 40; /~ Do 110t allol.l the atten~latlun to be 3reater */
~alc~o ~ ~); /* than 4~ ~iP */
en~
else sal~.lo = t_aal~atten~: /* Get callbrated sh~.1ttnr oPenlns */
iF (!~ln(IN3) ~ M_SINGLE~) /* Chec~ ~ tront ~anel sln~le sw~tch */
besln /* lS hel~ */
f (slnsle != ?) slnsle = 1;
end else slnsle ~
f (in(IN3) ~ M_D~CK) /* Re~ bac~;sroun.~ llsht switch and set */
reset~lt ~ r~h~ ~c_out3 ~UT3); /* or reset the lisht */
else setDlt (~_SBQCK. &c_out~ OUT3); /* a~c~rdln3l~ */
niode - /in(I~ ODF) .`~ ?; /* 1~eai the rate SWl tch ar, contrl */
c_outl &~ ~M_I~TER; /~ ~anel */
if (~n (INl1 & M_REPE~T) /* ~ePeat swltch is off ~/
besln c_outl I = F_OFF, rePeat end else besln rePeat = l;
~ lode == ?) /* Find ~ieglre~i lnterUPtln9 */
c_outl I = F_HI~:iH; /* frequenc ~ */
else c_autl I = F_LQw;
en-~
out (OUTl. c_outl); /* Set h~riware lnterruPt sequence */
c_out2 ~ x38; /~ Set c~rol1~atlc ~llters */
c_out2 1= (in (INl) & ~_CHRnM) ?? l;
c-ut (OUT2 C_OIIt2~;
end ~*~#*~*~****~*****************~*******~***~**********~******~*~*~******/
/~ 'rl~P.l~:RG ~ *~
/~****~********** ~
/* ~/
/-~ rhlS 1nterllPt 15 not use~ b~ the ~RCi Pr~sra~

~/

/*
/-~*-t~.~*~****~1r**~1~***#~**~*~r*-f *1t ~ fi~sr**~*****~r'n~*~ ~1r**~i*~ *
traP ~ ~
b e g 1 r, encl /*~*****i~*#**ir#~#~i*~r~*~*~**#**ii****#~i***~ *)~ *l~*~*~i*#**~************/
/* HDF~EI?L1. G * ~/
/~r*****~*'#***'~ */
/* *J
J* Thl5 rOUtlne lS use.i bs~ the ~hltesmlt,h 'C' ramP1ler to Plare all */
/~ t,he cohiPlled 'C' PraC~rams lnto thelr aPProPrlat.e ~llacnlne ~/
/ 1,~nci-lase locatirns for the ~ltel ~OiB5 lilcroProce;;sor. It sets ~/
/* ~.IP the stac~; Pa~nter. an.i sa-.~es ,an~i restores the status oi */
/* the Processor durins ~nteruPts. rh1s rDutlne a.iso Places trie */
/~ two looi;-uP tables tor calibratln~ the bac~; roun~i 1rra~i1ance ~/
/~ an,i ~ sh e)~rs~ .ilrectlx intD l-PR~)M nie~TIorx. *~
/* *,~
~**lt*****~-~***~******~***********~*~****~-~********~********~**********/
;tar~; := Vx33iO0 Sl~, ()x3e,0xl9,0x3l:l JmP startuP
r = ~[~xle~
~rP: call Preser~e ~all ~traP
ret . := .LOx9~
rG.5: call PreSer~.~e ca!l _rst65 ret ' (i) x ~ ~
r7.~: call Preserl~e call _rst7 ret , x 1 ]
/* Loci~;-u~ table to tra~lslate ~iic~irou~ fi~6 reaciln3s *~
/* to ni~crow~tts/ch~.ch~ starts at ~} Ihe~() *~
biata: "\O\lr;0~31~ \61\160\11~ iO\143\15"
" ~ } ~\?(jO\ 1 7\26~:)\~\?~,0\~\?rio\27\7r;o ~\32\2r;~\34\2r~ \37\?6~\42\?-6~\44\~iioll \47\~60\52\_6~\55\~ \_Ei(i\63\2ri(~
\~5\26(~\7(~ it:)\73\21it~\76\~6(~ 1\-6 ~ 4\2~ \?-6(i\ll3\?-6(~ 6(:l\ l~l\?~(l'l "~124\260\127\2Eit,\133~?1iO~136~ '6Ci\14:!\26(~"
"\12\320\12~320\1~T\32(.)\13\32(~ 3'(:)"
"\14\3~ 14~'32~15\3?t~\1S~321~1S~3'?~"
; \ 3 ~ ~ 3 2 ~?~1 6 ~ 3 ?~ 7 \ 3 2 (:) \ 1 7 \ 3 _ ~
\ 2 ( i \ 3 O \ 2 ~:) \ 3 2 ( i \ _ O \ 3 2 ~ i \ 2 1 ~ _? 2 (:) ~ 3 2 (.i " ~ 2 _ \ 3 ?(~?\ 2 ?~ 3 2 ~ ) \ 2 ~ \ 3 ~ 2 C?._ 3 ~'?~ ?4~ ?~?(,i~?5 ~ 3 _ ~ 3 _ _ E i \ 3 _ ~ 7 \ 3 ~1~ \ _ 7 \ 3 ?0\3~\ 3 2 0 \ 3 () \ J ?(~
" \ '~ 1 \ 3 _ O \ 3 1 \ 3 _ O ~ 3 ~ \ 3 ~?(_?\~.? \ ;3 2 ~ i \ 3 ;3 ~ ;3 2 ~? ~
G~' ~a6~

73\~'32(~\34~32l)~3L~32~3~ 3_/)~ 32("
" ~36\3~0\31~32~?~37~3 7C)~4(?~37~~40~32V"
"~41~32~41~3'~ 2~3~20~ 3~ 43~3Z~"
" ~44~3'~3(~45~32(j~45~321)~4(~;~'32~47~3~.0"
" ~47\3'~0\50\3Z0\51 ~'320\52\3'~7~\5'~7~32~?"
" ~53~'320~54~320~55~:320~55~3~Q~5Ei~320~
" ~57\320~60~320~ 3_~?~G2~320~!~;2~320"
"\63~320~64~'320~1i5~3.'70~66~3' ~ 67~320"
" ~7~)~32~71 ~3~ 72~32~.~\ 73~.3 7~)\ 74~.'3'~
" \75~3L~0\7l3~3 70\77\3..~\1(0()\32l!~ IQ.~\3~10"
1 0 ~1 \ 3 L ( ) \ I ~.) 4 \ 3 _ ~) \ 1 ( ) ~i ~ 3 . ( ~ ; \ 3 _ () \ 1 1 () ~ ;J 2 ( ~
32~ ~ 1 1 2 \ 3~( ~ \ 1 1 3 \ 3 .~ () \ 1 1 5 \ 32(~ ~ 1 1 6 \ 32() "\120\32V~12t\320~1"3\320~124~370~ i;32i:)~
" ~127\320~36~21~iO~ lQl ~2EiO~ 320~ lG~370"
3'?~ 32(~32~320~3~3'':)~43~'772~?"
" ~50\320~55~320~62~321?~E37~320\74~3'; V"
2 ~ 3 2 (~ 3 ? () ~ 1 1 6 ~ 3 2 () ~ 1 ~ 4 ~ 3 7 ~ ~ 1 3 3 ~ 3 2 "~141~320\12\34~13~'34~)~14~340~15\34~)"
"\16\340\18~340\17\::~4~:)\2~\34~\21\340"
" ~_2~34~)~?3~340~24~ ~40~25 \~4( \ _7 \340 " ~30\340\31 ~340\32~340~34\34~)\35~34~"
" \37\340\4~\34~\42~_~74l~44~340~46~340"
" \47\340\51 ~34C)~54\340~56~340\G0\340"
3~34~6s~34l)\7~~34~73~34n~76~340~
34V\1~5\34\110~340~114~34~ )\340"
\ 1 25\34~\ 1 3Z\340\ 1 ~t7 \34()~ 1 44~340~ 1 5~34~
"~161~34~17~ 34~)~200~340~21(~34()\221~34~)"
" \233\340\24G\340\263~340\3C11 \340\320\340"
"\34?~340\366\340\15\341\50\341\11(:)\341"
"\156\341\234\341~325\341~36~34 7~17Ei~3~L2"
" ~2~343~30?~343\361~;\344~61 ~347~30Q~354"
"~303~22~76\~721~ G2~143~26~ 2\'?~"
"\153\?66\3V7\114\347~33\331\161\234~!7~"
3 ~ 7 \ 1 1 ~ ) ~ 2 7 2 ~ 3 6 1 ~ 2 1 3 ~ 1 7 5 ~ 4 2 ~ 3 6 3 \ 1 4 ~ 7 ' ~327\Z55\45~371 \ 1 16\73\341 ~ ;5~25\ ~5?
" ~344\330~25\3\ 1 11i\51 \23\ 1 1 ~ 326\ 1~i3"
"\ 364\210"
a y ~ 0 ~
~* Loo~-uP table ta translate flash ~DC rea~nss ~7 ~* ta n1lrrrJJaules~cm.cn~ starts at '45 (hex~ */
J`iata "\~\lliO\1\160\:t\160\2\160\2\1G0"
"\3\160\3\160\4\1Ei~:)\4\1ii~:)\5\1G~
"\5\160\6\160\G\160\7\160~10~150"
"\10~160\11\160\11~160~ 16~ 12 1 6Q ~ 1 3 ~ 1 5~ ) ~ 1 3 ~ 1 6~ \ \ 1 4 ~ 1 6~ ~ 1 4 "~15\150~15\1Ei0~16~1130~ 16Q~17 " \ 1 7 ~ 1 6~ ~ 2 0 ~ 20 ~ i0 ~ 20 ~ 1 6 "~21\1~ 2~6~22\1~0~2~1G~ ?3\1~
~ ?3~ 16~ 4\ 16~\24\ ll~iO\?5~ 25\ lli~"
"\25~160~21~;\160~?~\16~ 7~ Z7 "~?,7~ 3~1G)~3~16~31~16()\31\1~
"\31\1(30\32\1G0\32~1G~!~32~ 33~161)"
"\33\11.~0\33~1~0\~ \16(~\34\11~ 35~
"\ 35\1~ 3~ i0\31~ 0\31i\1~ 31i~11i(.)"

~3 ~L216~

"\37\16(~37\11i/~\37~ \40~16~
"\4~160~41~160~41\1~V~41~160~42\1G0"
"\42~160\42\16C~\43~:1GI. ~43\:160\43~16Q"
"~43~16l:)\44\16l:)\4~16(~ 4~16Q\45~1G0"
" ~ 4 5 \ 1 1i0 ~ 4S ~ 1 61~ ) \ 41~ 4~3 ~ 1 E;I.) "
"~46\L6Q~47\161:)~D.7~1130\47\16l)~50~1lJI~"
"~50\15~\5~ \5~\161~ \51\1~0"
"~51~16V\51~1GV\52\161.i\~ 160~52\1G0"
"\53\16~53~ 53~ \53\16~ 4\1~
"~$4\1G0~54~16Q~54~161:)\55\160~55~160"
"~SS~lG0\2S\L6Q\41\160\55~16C)~7Q~160"
" \ 103 \ 16 ~ ~ 117 ~ 16 (:1 \ 133 \ 160 \ 1 ? \ ? 61~ \ 13 \ 261~ "
" \ 15\250~ 16~2~0\ 17\2G0\2~:)\?~0\22\2 " \23~2~ 24~2~0~5~ 27~ \30\2~
" \31 \260\33~?6~)~3a. ~260\35\?6~\37~?60 " \4~\260\~1 \?60\43\26~\44\260\45\Z6V"
" \47\260~50\260\52\260\53\26Q\55\2G0"
\56~ _.60\57 \?60\61 \ 260 \ 62 \ ?6~ \ 64\ 26(~
\65~21~iO~1~;7\?EiO\70\~6C)\7?\26~73\26~
\75\?EiV\77\260\ 1V~\26Q~ )2\~60\ 1~3\?60' \ 105~260\ 106\260\ 1 1~\?60\ 112\26~\ 113~26 "\115~2~ 116\2~)\12~ 26~\122\2~0\123~2~
"~125~260~127~261~13~ 6~132~ 60\134~_6~"
"\135~260\137~261~\141 ~261)\143\26~\12\3_~' "\1~?~320\12~320~13~321:)~13~320~13\32C)"
~ 13~3?0~ 13~32V\ 13\3~ 14\32~ 14~3~0 "\14~20\14~3~\14\320~15~320~ 32~"
"~15\32~\15\32~\15\320\15\320\1~\320"
"\1~\320\16\32~ 320\16\32~\17\3~0"
\ 17~32~\ 17\3~/~\ 17\320\ 17\3?0\ 17\3~/~"
\ 2 /~ ~ 3 2 ~ ) \ 2 ~ ) \ 3 '? ~ \ ? ~ 2 0 ~ ? ~ 3 ;' 1~
\ .1 \32~\21 \320\?1 \32~ 32~)\21 \3_~.
\ 2~32~22~3_0\22\3?~2_\320\_2\3 \_3\32~\~3\32~\_3\3_~\23~32~:)\23\3_~
\24\320\24\32(:)\2~\32 :)\24\320\2a\320"
" \ 5\32V\~5\320\25\3~ 5\32~ \3 ~ \32~\26\3~V\2~\320\26\32Q\27\3 '; \27\320"
. :- .CI~xl]
startuP: sP - ~;tac~;
e l cal 1 _~lain h l t /~
/~ Proce~ures to sa~e & restore the uolatlle 6 e~ ronhlent /~ liurlns lnterruPt ser~ c~hese rolttll-es are reentr~nt.
/*
/ *
Prese~e: hi ~ st~ /* sa~.~e re~s ~ mo~.~e ret ad~r ~/
hi =`~ 5p de a~> SP
~ C = :' S P

.

af =:~ sP
a = 11 /* salJe PSUe~iO re~s ~/
hl = &c.r~
looP: bc aA hl hl ~ 1 bc =,7 Sp a - 1 Jl~ OOP
hl = &restare /* ~usrl addr af restare Prac ~/
hl a,- 5p t7~ el-~tered 0l~ e)~l t fro~ nt ~er~JIce ~/
hl = 30 ~ sP /~ so bact~ to 'rst' WhO call5 C fn */
hl =a~ hl J~IP *hl restore: a c 11 /* restare Psue~a-ress */
hl = ~c~r4 loaP~: sP =e bc ~ c --~Ah 1 hl -- 1 hl - 1 hl - 1 a - 1 J~~ looP:~
sP =.~ af /* restore re~s & ret~.lrn ta ~/
/* the Point of lnterruPt *~
sP =~ bc s P = ,~
s~ nl /*J~Ins~le 5p a 5 hl el ret

Claims (10)

THE EMBODIMENTS OF THE INVENTION IN WHICH AN EXCLUSIVE
PROPERTY OR PRIVILEGE IS CLAIMED ARE DEFINED AS FOLLOWS:
1. A visual stimulator, comprising:
(a) light directing means for directing light from a light source onto the entire retina of a subject's eye;
(b) attenuator means for selectably attenuating said light source;
(c) photo-detector means for producing a first output signal representative of the radiant energy directed onto the subject's eye; and (d) signal processing means for receiving and pro-cessing said first output signal to derive therefrom further output signals representa-tive of the radiometric or photometric char-acteristics of said radiant energy.
2. A visual stimulator as defined in claim 1, further comprising display means for displaying said radiometric or photometric characteristics.
3. A visual stimulator as defined in claim 1, wherein said attenuator means comprises:
(a) a first shutter leaf affixed to a first galvanometer shaft; and, (b) a second shutter leaf affixed to a second galvanometer shaft;
wherein said shutter leaves are positioned for pivotal movement with said galvanometer shafts to attenuate light from said light source passing between said shutter leaves.
4. A visual stimulator as defined in claim 3, further comprising attenuation control means for select-ably varying current signals applied to said galvanom-eters to selectably pivot said shutter leaves, thereby selectably varying said attenuation.
5. A visual stimulator as defined in claim 4, further comprising:
(a) a first notch in said first shutter leaf; and, (b) a second notch in said second shutter leaf;
wherein said shutter leaves are positioned to define a light attenuating aperture between said notches.
6. A visual stimulator as defined in claim 5, wherein said shutter leaves and notches are positioned such that pivotal movement of said shutter leaves varies the area of said aperture, thereby varying said attenua-tion.
7. A visual stimulator as defined in claim 6, wherein said notches are shaped such that the area of said aperture varies in proportion to the exponential of the distance between said leaves.
8. A visual stimulator as defined in claim 4, wherein said attentuation control means enables repeated application of selectably variable current signals to said galvanometers, thereby interrupting and selectably attenuating said light source.

- Page 2 of Claims -
9. A visual stimulator as defined in claim 1, wherein further output signals include a second output signal representative of the light flux at said photo-detector means, and wherein said signal processing means compares said second output signal with a calibration signal representative of the light flux expected from said light source and produces an alarm signal if said signals differ by move than a pre-selected amount.
10. A visual stimulator as defined in claim 9, wherein said signal processing means calibrates said attenuator means by:
(a) selecting an initial attenuation setting of said attenuator means;
(b) activating said light source;
(c) comparing said second output signal with said calibration signal;
(d) if said signals differ by no more than a pre-selected amount, storing said attenuation set-ting, selecting the next sequential attenua-tion setting of said attenuator means and returning to step (b); and, (e) if said signals differ by more than a pre-selected amount, selecting the next sequential attenuation setting of said attenuator means and returning to step (b).

- Page 3 of Claims -
CA000430383A 1982-06-24 1983-06-14 Visual stimulator Expired CA1216897A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US391,972 1982-06-24
US06/391,972 US4618230A (en) 1982-06-24 1982-06-24 Visual stimulator

Publications (1)

Publication Number Publication Date
CA1216897A true CA1216897A (en) 1987-01-20

Family

ID=23548737

Family Applications (1)

Application Number Title Priority Date Filing Date
CA000430383A Expired CA1216897A (en) 1982-06-24 1983-06-14 Visual stimulator

Country Status (4)

Country Link
US (1) US4618230A (en)
EP (1) EP0098087B1 (en)
CA (1) CA1216897A (en)
DE (1) DE3378460D1 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04319504A (en) * 1991-04-18 1992-11-10 Teac Corp Disk device
US5355895A (en) * 1993-07-20 1994-10-18 Hay S Hutson Ocular disease detection apparatus
US8744366B1 (en) * 2002-04-15 2014-06-03 Richard K. Steen Digitally programmable circuit for controlling an attenuator
US7549749B2 (en) * 2002-05-06 2009-06-23 Antti Valjakka Visual stimulator
US8684946B1 (en) 2005-12-19 2014-04-01 The Uab Research Foundation Method and apparatus for determining the sensitivity of cone photoreceptors and uses thereof
US8620059B2 (en) * 2007-12-13 2013-12-31 Fpinnovations Characterizing wood furnish by edge pixelated imaging
US8777405B2 (en) 2011-06-27 2014-07-15 David Joseph Anschel Self-adhering visual stimulator
US10758121B2 (en) 2014-02-28 2020-09-01 Board Of Regents, The University Of Texas System System for traumatic brain injury detection using oculomotor tests
US9895099B2 (en) 2014-02-28 2018-02-20 Board Of Regents, The University Of Texas System System for acceleration measurements and traumatic brain injury detection
US10820824B2 (en) 2015-05-12 2020-11-03 Diagnosys LLC Combined stimulator and bipolar electrode assembly for mouse electroretinography (ERG)
US11357442B2 (en) 2015-05-12 2022-06-14 Diagnosys LLC Combined stimulator and electrode assembly for mouse electroretinography (ERG)
JP6796642B2 (en) 2015-11-10 2020-12-09 ダイアグノーシス・エルエルシー Methods and devices for evaluating electrophysiological signals
US11497911B2 (en) 2018-07-18 2022-11-15 Diagnosys LLC Electrically evoked response (EER) stimulator/amplifier combination
US11786694B2 (en) 2019-05-24 2023-10-17 NeuroLight, Inc. Device, method, and app for facilitating sleep
EP3915461A1 (en) * 2020-05-29 2021-12-01 Universiteit Antwerpen Light shielding system for an electroretinogram and method of shielding at least one eye from incident light

Family Cites Families (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US2166947A (en) * 1937-03-04 1939-07-25 Frober Faybor Company Sector disk operating mechanism
US3242344A (en) * 1961-12-11 1966-03-22 Kollsman Instr Corp Wide field scanning mechanism with two pluralities of scanning apertures perpendicular to each other
US3303271A (en) * 1964-05-21 1967-02-07 Klaus J Hecker Rotary shutter arrangement providing a plurality of frame rates
US3409905A (en) * 1966-03-31 1968-11-05 Sinclair Research Inc Eyelid galvanometer
US3514191A (en) * 1966-11-10 1970-05-26 Thompson Optical Eng Co Light valve with automatic closure control
DE1522014A1 (en) * 1967-02-23 1969-06-26 Agfa-Gevaert Ag, 5090 Leverkusen Camera with exposure control device
US3561847A (en) * 1968-06-05 1971-02-09 Bell Telephone Labor Inc Automatic electroresponsive light regulator utilizing taut band meter movement
US3632192A (en) * 1969-07-08 1972-01-04 Philamon Inc Tuning fork light modulator
US3639041A (en) * 1970-09-21 1972-02-01 Stanford Research Inst System and method for scanning the depth of the optic fundus
US3810206A (en) * 1971-06-01 1974-05-07 Cann Kk Exposure control device
US3879113A (en) * 1973-05-07 1975-04-22 Howard C Howland Photo-refractometer and methods for ophthalmic testing of young children
DE2403315A1 (en) * 1974-01-24 1975-08-07 Agfa Gevaert Ag ELECTROMAGNETIC DRIVE DEVICE
US4135791A (en) * 1974-12-02 1979-01-23 Varian Associates, Inc. Reduced glare scanner
JPS5931046B2 (en) * 1975-03-19 1984-07-31 富士写真フイルム株式会社 Blades for optical machinery
US4131113A (en) * 1976-08-19 1978-12-26 California Institute Of Technology ERG analysis system
DE2654608C3 (en) * 1976-12-02 1979-06-21 Fa. Carl Zeiss, 7920 Heidenheim Refractometer for the automatic objective determination of the refractive state of an eye
US4109237A (en) * 1977-01-17 1978-08-22 Hill Robert B Apparatus and method for identifying individuals through their retinal vasculature patterns
JPS53126791A (en) * 1977-04-12 1978-11-06 Canon Kk Ophthalmolgic decice
US4146311A (en) * 1977-05-09 1979-03-27 Synemed, Inc. Automatic visual field mapping apparatus
JPS53144193A (en) * 1977-05-20 1978-12-15 Canon Kk Ophthalmologic machine having operating distance detector
US4265518A (en) * 1977-06-30 1981-05-05 Canon Kabushiki Kaisha Variable magnification apparatus having illumination compensating ability
US4208107A (en) * 1978-01-06 1980-06-17 The United States Of America As Represented By The Secretary Of The Navy Drugless eye examination system
DE2805084C3 (en) * 1978-02-07 1980-10-16 Optische Werke G. Rodenstock, 8000 Muenchen Photopometer
DD135994B1 (en) * 1978-02-14 1982-05-26 Alexander Walther ARRANGEMENT FOR TRIGGERING LOCAL LIGHT REPLY RESPONSES
PL125766B1 (en) * 1978-07-12 1983-06-30 Instytut Psychoneurologiczny Photostimulator
US4238142A (en) * 1978-12-18 1980-12-09 American Optical Corporation Method and apparatus for examining and photographing the ocular fundus
US4255023A (en) * 1979-02-12 1981-03-10 House Harold D Objective retinal response recorder
US4320768A (en) * 1979-07-17 1982-03-23 Georgetown University Medical Center Computerized electro-oculographic (CEOG) system
US4370033A (en) * 1979-10-15 1983-01-25 Konan Camera Research Institute Eyeball examining device
DE3031908C2 (en) * 1980-08-23 1982-05-27 Messerschmitt-Bölkow-Blohm GmbH, 8000 München Radiation switch
US4293208A (en) * 1980-10-20 1981-10-06 Polaroid Corporation Prebias for digital light integrator
US4350417A (en) * 1981-03-06 1982-09-21 Strong Electric Corporation Apparatus to control light intensity from arc lamp

Also Published As

Publication number Publication date
US4618230A (en) 1986-10-21
EP0098087B1 (en) 1988-11-17
EP0098087A3 (en) 1985-10-02
DE3378460D1 (en) 1988-12-22
EP0098087A2 (en) 1984-01-11

Similar Documents

Publication Publication Date Title
CA1216897A (en) Visual stimulator
US5506633A (en) Device for ERG spectral perimetry
US4755043A (en) Portable scanning digital pupillometer and method of use thereof
Robson Guidelines for calibration of stimulus and recording parameters used in clinical electrophysiology of vision
US4393366A (en) Rotating beam ocular identification apparatus and method
JP3239952B2 (en) Apparatus for determining blood flow
WO1993024047A9 (en) Device for erg spectral perimetry
JPS61249433A (en) Induced potential type automatic eye examination apparatus
JPS61268230A (en) Ophthalmic measuring apparatus
CN112464863A (en) Learning attention detection and prejudgment device under variable light environment
EP0225072B1 (en) Ophthalmic disease detection apparatus
DE10302849A1 (en) Measuring thickness and dispersion in tissues or bodily fluids using short-coherence interferometry, determines content of substance from its influence on optical characteristics
CN203763051U (en) Pupil measuring instrument
DE19534517A1 (en) PC controlled system for accurate colour spectrum analysis
JP2520426B2 (en) Ophthalmic measuring device
DE10357734A1 (en) Universal ophthalmological examination device and ophthalmological examination method
US3837734A (en) Method of and apparatus for measuring visual latency
CA1151865A (en) Equipment for measuring the reaction time
JPH0489027A (en) Ophthalmic measuring device
EP0296733A1 (en) Ophthalmic disease detection apparatus
RU2604938C2 (en) Contactless pupillometr for screening diagnosis of functional status of an organism and method of its use
DE2423105B2 (en) DEVICE FOR MEASURING EXTINCTION OF CORNEAL IN THE LIVE EYE
Suaste et al. Automated clinical perimeter-based TV pupillometer
DE2450095A1 (en) Direction of vision and field of vision meter - uses infra red light source with automatic measurement
Stark Stability, oscillations, and noise in the human pupil servomechanism

Legal Events

Date Code Title Description
MKEX Expiry