l ‘ \ [ ”rum ill llHHl -—i :35 03mm llllll\llllll\lllllllllllllllllll LIB RARY 3 1293 1 8811 Michigan State THES‘W uni Cy This is to certify that the thesis entitled MICROPROCESSOR CONTROLLED DATA ACQUISITION FOR RAMAN SPECTROSCOPY presented by RI CHARD LEE BOWE RSOX has been accepted towards fulfillment of the requirements for MASTERS— degree in _PHlS_LCL pm comma Major professor Date NOVEMBER 7 1979 0-7639 OVERDUE FINES ARE 25¢ PER DAY PER ITEM Return to book drop to remove this checkout from your record. MICROPROCESSOR CONTROLLED DATA ACQUISITION FOR RAMAN SPECTROSCOPY By Richard Lee Bowersox A THESIS Submitted to Michigan State University in partial fulfilment of the requirements for the degree of MASTER OF SCIENCE Department of Physics 1979 ABSTRACT MICROPROCESSOR CONTROLLED DATA ACQUISITION FOR RAMAN SPECTROSCOPY By Richard Lee Bowersox While Raman spectrosc0py is useful in obtaining infor- mation on the bond structure of crystals with lattice damage, the collection of data during spectroscopic measure- ments is a very repetitive task. It can easily be performed by an automated controller if all collection apparatus can be remotely controlled. With a computer based system, the whole cycle from the beginning of counting to final equipment shut down can be simply achieved. A system with this capa- bility is described in this thesis. Data obtained from silicon carbide (SiC) crystals ion 21 H+/cm3 show a graphite-type implanted at a dose of 1.6XlO of bond structure which returns to the normal 6H crystal structure after annealing at 500°C. ii ACKNOWLEDGMENTS I would like to thank Dr. P. Colwell for her guidance in the preparation of this thesis, and the funds that made the new controller a reality. . Mr. T. Burt and Dr. P. Signell were very helpful in allowing me to use the Project Physnet microcomputer to edit and assemble my controller code. Finally, I would like to thank my wife for understand- ing and putting up with my many late evenings away from home at the lab. iii TABLE OF CONTENTS Chapter Page I. INTRODUCTION . . . . . . . . . . . . 1 II. EQUIPMENT DESCRIPTION . . . . . . . . . S A, Laser Modifications . . . . . . . . S B. The Spectrometer . . . . . . . . . 7 C. Multi-Mode Processor . . . . . . . . 8 D. Incremental Recorder . . . . . . . . 8 E. Hardwired Controller . . . . . . . . 9 F. Microprocessor Controller . . . . . . 11 C. Computer Choice . . . . . . . . . 13 H. Interface Card . . . . . . . . . . 14 I. Front Panel . . . . . . . . . . . 16 III. PROGRAM DESIGN . . . . . . . . . . . 18 A. Requirements . . . . . . . . . . 18 B. Data Collection . . . . . . . . . 22 C. Ending Sequence . . . . . . . . . 24 IV. EXPERIMENTAL RAMAN SET UP . . . . . . . 25 V. RESULTS OF ANNEALING ION-IMPLANTED SiC . . . 27 VI. CONCLUSION . . . . . . . . . . . . 31 APPENDIX . . . . . . . . . . . . . . . 32 LIST OF REFERENCES . . . . . . . . . . . . 41 iv Figure LIST OF FIGURES Circuits added for remote laser shut-down. Block diagram of controller interface. Initialization and front panel control flowchart. Flow Chart of data transferal between counter and recorder. Flow Chart of laser shutdown sequence. Experimental geometry. Ion Implanted SiC before annealing. Raman spectrum of ion implanted SiC after annealing at 500° C. Page 15 19 20 21 26 28 30 CHAPTER I INTRODUCTION Raman spectrosc0py is the inelastic scattering of light from atoms or molecules. In the case of solids, a photon strikes an atom of the crystal. At this point momentum is transferred between the lattice and the photon, creating (Stokes) or annihilating (anti-Stokes) an optical phonon. The light then exits the crystal with either a lower or higher energy, respectively. Previous studies showed that when silicon carbide (SiC) is implanted with H+ to doses of 2.0X1021/cm2 or 1.6x1021/cm2, the resultant spectra showed the formation of a graphite-type bond structure. This structure had much more intensity than that of the characteristic phonons of the host crystal. Upon annealing the crystals, the 'graphite' disappeared, and the pure crystal structure returned. We wanted to know if lower implantation doses would affect the SiC in a similar way, or if a different process occurs. To do these studies, we required many data collection runs, and it was felt that the control system could be improved to provide a more automated scheme. '1- .n; -:-'«-.‘."-_""="”'«* ' r“ 7" For Raman spectroscopy, we use a minimum of equipment. The essential are: 1. A monochromatic light source that can be focused to a fine spot 2. A sample holder for the crystal of interest 3. A spectrometer to resolve the wavelength of light emitted by the sample 4. A device to measure the intensity of the light after it goes through the spectrometer 5. Some sort of control to coordinate the activities of the above devices. This thesis will concentrate on the last of the above items. What I have done is to replace a hardwired control box with a microprocessor controller system. This approach has many advantages which will soon be explained. The current controller was designed and built by Dr. Philip Gaubis, a former graduate student. It was built in 1975 and used the current electronics of the time, which consisted of small and medium scale integrated circuits of transistor-transistor logic (TTL). The design was reason- able for the time and relatively inexpensive to implement. Unfortunately this method suffers a number of disadvantages. These problems are: 1. Lack of flexibility. The controller is designed for one function and can only perform that one thing (with a few variable parameters). To change it performance would require a major re-wiring of it circuit boards. 2. A large number of circuitgpackages. The great number of TTL IC's consume a good amount of cur- rent (several amperes) and generate a lot of heat. They take up six separate circuit boards (in two cases), and have a tendency, of late, to work loose from their sockets (with subsequent system failure). (/1 Complex system timing. Since about six separate tasks must be performed in sequence, a fair amount of logic is needed to keep them straight. The jobs that are to be performed are: a) Assure that the laser is running during data acquisition* b) Start and stop data collection sequence i) Start photon counter (SSR Multimode Processor) ii) Accept data from SSR after collection period iii) Transfer information to incremental recorder iv) Increment spectrometer wavelength setting v) Reset SSR and restarting counting. c) Calculate total wavelength change from start to end.* d) Shut off laser at end of run if desired.* e) Shut off cooling water to laser fifteen minutes after laster shut-down.* f) Provide various types of interface for manual con- trol of equipment. *Indicates additional function designed into new controller. Adding the new features to the existing controller would have entailed a complete rewiring. In addition, many new circuit elements would be required. This would have overloaded existing power supplies. The change to microprocessor control results in an order of magnitude reduction in the number of individual Integrated Circuits (ICs). This gives an equivalent reduc- tion in power requirements. Future expansion of the system is simply a matter of adding a new interface circuit, and/or software changes. CHAPTER II EQUIPMENT DESCRIPTION A. Laser Modifications The monochromatic light source used is a Coherent Radiation Model CR-S Argonelon Laser. This laser is capa- ble of emitting several different wavelengths of light. A prism is mounted in the optical cavity to isolate the desired wavelength. To function with the new control, a modification was made to the laser head assembly. As described in the manual(1) there is an interlock switch that shuts off all power when the cover of the head is removed. To achieve remote shut down of the laser, the circuit of Figure 2.1a was added in parallel with this switch. When the base of the transistor is pulled high, the relay closes, causing a current flow to this interlock thus shutting off the laser. The switch on the remote shut off allows the con— trol to be disabled to allow continuous operation of the laser. This circuit derives its power from the laser itself. Since the control supplies a voltage level to the interface whenever the laser is on, the computer can monitor the laser's power status. LASER HEAD AS§E;‘113LY__ __ n 2N40405 A? 9 l 0/\ .__LT l A: l T9 ‘ ’ ———.1 ‘ l ‘1' ' ZEMZ. CONTROL LINE —1‘ ‘ 5.2 K i , GROUND - —— P' a- .. -—-l v v ' W +5 VOLTS 300uF Z: . . g” 7805 120 VAC 12 VAC (a) 7805 VAC1 IT- JL +5 \‘OLTS CONTROL I -——Cr—**' .u40403 bfVN) : £L_W. . . O I LL44 0 Mg. 5 fL i \Aflv SOLENOID COLD WATER LINE (b) Figure 3.1 Circuits added for remote laser shut-down. The laser is water cooled. When it is turned off, it is desirable to allow the water to run about fifteen minutes to cool down the power supply pass elements and the laser tube. The water must be shut off though, to prevent conden- sation on the outside of the tube. Control of the water is provided by the circuit of Figure 2.1b. This is the same as the laser control, except that the extra relay is used to handle the current demands of the solenoid. The switch on this control has positions for water off, computer con— trol, and water on. B. The Spectrometer The spectrometer is a Spex 1406, 0.85 metre Czerny- Turner Double Monochromator. It is calibrated so that the wavelength of the transmitted light can be read in angstroms.(2) The wavelength can be resolved to 0.02 angstrom steps. The control for the spectrometer is provided by a Compu—drive (stepper-motor driven wavelength drive). This unit is capable of directly driving the spectrometer at several incremental rates. It can be controlled by an external source, in this case by the interface board. There are three control signals that must be provided, and two that are returned by the controller as status. The primary control line is the one to indicate that an external device is taking charge of the controller. The second sig— nal needed is one to control the direction of the drive motor. The third is a line to provide the drive pulses. The output line indicates if the motor has reached either its high or low travel limit switches. C. Multi—Mode Processor To measure the light exiting from the spectrometer, there is a photomultiplier tube used in a photon counting mode. The photon counting is done by an SSR model 1108 multi-mode counter. This counter can be set to count pulses (photons) for a certain period of time, or to time for a set amount of pulses. All controls for the counter can be operated remotely. In this case only those affecting the transfer of data out of the counter are used. All other settings are made on the front panel of the counter. The signals needed for data transfer from the counter are:(3) l) Thirty-two (32) lines for the parallel transmission of eight Binary Coded Decimal (BCD) digits. 2) Two (2) handshake lines for request to transmit and data accepted. 3) A reset/start line to start the counter for the next cycle. D. Incremental Recorder The device used for logging data is a Kennedy Model 1600 Incremental recorder. The recorder writes data on a 7-track magnetic computer tape. This unit Operates almost totally under remote control. The lines required for its (4) functioning are: 1) Six (6) lines for parallel loading of Extended BCD data 2) A ready out line to indicate that recorder is ready to accept data 3) End of record (EOR) and End of File (EOF) gap inputs 4) A gap in progress output line to indicate that the recorder is currently busy inserting an EOR or EOF 83p 5) A Write/Step line to initiate a tape write of data. The last device needed is the controller which governs the functioning of all the other units. It must sequence the flow of data from spectrometer, to counter, to recorder. It should also allow a convenient access to start and stOp data acquisition. It provides a means of stopping the data collection and resetting the apparatus in cases of error in a run. E. Microprocessor Controller As was previously described, the current controller was fabricated in 1975 out of low and medium scale integra- tion devices. It takes up one-half of an Ortec 'nim' bin. In addition to sequencing data collection activities, it provides the following manual controls. 1) Start or Stop data collection. (On stop, equipment finishes current cycle and stops.) are: 2) 3) 4) 5) 6) 7) 8) 10 Set wavelength stepsize for use in stepping the spectrometer. Set direction of spectrometer travel. Run the spectrometer, at a low speed, in the direction of travel as previously set. Step the spectrometer one 'interval' in the direction previously set. Increment (change position by 0.02 A) or drive spectrometer at adjustable speed in set direction. (The latter is used to quickly reset spectrometer position for a data run.) These two controls are located in a control box attached, by cable, to main controller. Generate an EOF gap on recorder. Provide a visual indication of Data Collection in progress. A few specific drawbacks of these device controls 1) When, during data collection, a transfer of data from counter to recorder is needed, there is no buffer storage. This results in the halting of counting until ten digits are recorded on tape. The amount of time taken for each transfer is about 0.7 seconds (out of a usual collection interaval of twenty seconds). Over a span of several thou- sand data points, the additional time is considerable. ll 2) To set the stepsize for the spectrometer, two sepa- rate switches must be used. The first of these sets a basic stepsize of an integral multiple (from 1-10) of the spectrometer increment size of 0.02 A. The second switch multiples this stepsize by 1, 10, or 100 to give the final stepsize. Read- ing the spectrometer stepsize from these switches requires the knowledge of the increment size and cannot be accomplished without a close look at their position. 5) If the EOF pushbutton is continuously depressed, the logic can 'latch up' causing the recorder to generate an unending string of EOF's. This con- dition requires manual intervention at the recorder controls. 4) There is no means to automatically terminate a data run at its conclusion. This requires that an otherwise automated process must be manually stop- ped (which may be at the end of an eight hour period). F. Microprocessor Controller The new computerized controller remedies the drawbacks of the previous one, and adds many refinements. First to correct the specific problems noted before: 1) The interface panel has it own onboard, 'scratch- pad' memory. Within a millisecond after sensing 12 that the counter has data ready, the controller transfers that data to memory and resets/starts the counter. After the counter has been restarted, the controller formats and sends data to the recorder. 2) The stepsize isset on front panel thumbwhell switches with direct decimal read out. The soft- ware takes care of rounding the set size to a multiple of 0.02 K. 3) Instead of the EOF button directly generating a file gap pulse, the EOF button status is sensed by the software which then generates a single EOF pulse. 4) The front panel has two banks of thumbwhell switches which control the total wavelength interval. The first is set to indicate the starting wavelength of the spectrum. The second is set to the desired ending wavelength. Upon starting the run, these switch banks are read and the former subtracted from the latter. The difference is stored, and decremented after each step until the run is com- pleted. At this time (if desired) the laser and water are shut down in an orderly sequence for reasons stated before. The new controller consists of four main components. The first is the computer card holding the microprocessor support, and software memory. The second is an interface card to buffer all data and signals from the computer. It 13 consists of the front panel switches and also circuitry to multiplex these switches into a format easily and quickly read by the computer. Finally there are the remote laser and water controls, previously described. C. Computer Choice The computer card is an SD Sales Z—80 Starter Kit. It consists of a Z-80 central processor unit, a CTC counter timer chip, a PIO peripheral input/output chip, 2048 byte (8—bit word) random access memory (RAM), two 8100 bus con- nectors (for expansion), and various support circuits. There were two main reasons for choosing this particular computer. The first and foremost reason in that it uses the Z-80 8-bit parallel processor chip by Zilog Corporation. This chip has many unique features which made it ideal for this application. 1) It has the ability to test, set, or reset any single bit, anywhere in memory. This facility is ideal for checking and setting control lines. 2) It has decimal arthmetic capabilities which allow simple handling of data from BCD switches. 3) It has block move instructions which automatically move a block of data from one part of the memory to another. This permits quick transfer of informa- tion from peripheral device to the main system memory. 4) It has many memory addressing modes which shortens and simplifies programming. 14 The second reason for this board choice is its well planned auxiliary circuitry. The board contains a keypad and hexidecimal Light Emitting Diode(lEID readouts. These allow programming and verification of data. Another block allows programming of Eraseable Programmable Read Only Memories (EPROM's). This allows a software system to be put into permanent storage. This memory can be set to be accessed, on power-up or system reset,to immediately begin execution of the stored program. The PIO contains two latched 8—bit Input/Output (IO) ports. These are for exter— nal device control and data transfer. The CTC has three internal timers. These can be used, along with software delay routines, to provide long time intervals between activation of external devices. Finally, the 8100 connector allow separate circuit boards to be simply plugged into the main board. Through this connection they derive power, address, status, and control signals. H. Interface Card The interface card plugs into the 8100 connector on the computer board. This card has circuits to buffer (see Figure 2.2) and to transmit information to and from the peripheral device. These devices appear to the computer as a combination of memory and/or input/output devices. The front panel is addressed as eight consecutive memory locationsand.the SSR data as four. This addressing allows quick block-move instructions in the 2-80 to move data into 15 .oomupoocw EoH_oau:oo go Eseucwo xoofiz m.m 0L:u_; mmDm ceazw \/ > zmmmzm mwmzna< xm4m~P432 ozw30mmu 000m OOON 000. O jfi__d444__d__j___—_.1._d_4_‘____fi_q_4____dq__d~d_d_d_a__d____4u~44d .. - M I .. 1 nil!!! i 3 I 1 N ,. .. S r 3.6038: :53 _..~o_xm_ m M 3.3:: .: I. .: ::_ ..._. :3. o . ._. 3: _.._ _... 3 2.. .. ._ J r 1 m.. e .l. .1... T L m I .. K - . .. m 62c2a§ ”80A: _~o_xm_ .1. m... r .354. 02 9m 1m 1 ( b____PL_______bb___b_b___b___bb_bpp_P—thPbL____p__Fbp____..____—_ 29 (9) 1600 cm-1 were the only ones in the spectra. In our studies, the samples with the 1.6x1021/cm3 implant dose showed a dominance of this type of bond (as compared to the tetrahedral bond, evidenced by the relative intensities of L0; T0 peaks and the 'graphite' peaks). We then looked at a lower dose (1.3x1021/cm3) and found that the 'graphite' was still there, but that the lattice did not appear to have as much damage. After annealing the spectra show the phonons of the 6H crystal again (Figure 5.2). The graphite type bonds appear to have almost annealed away. The lower implant sample seems to anneal at the same rate as the higher one. .0 032m um uc-noccc pouum U_J moucafiasa con mo Escguoen :zasz anov FEIm >ozm30mmm ooom 008 009 N.m oe::_; O 4—4aq__a Add—dd.— _ _..—_d_.a—._dd_d_d_ nmanE. nEO\I .~o_xm._ I .853 o ooom 2m 1m I_b_b—_PbP—b—___—g_b__b__b__b____._bpbkbrb_bb__b 33‘ 1 32295 nEoAIEQxQ .. .. .853. o. :o.om .o._m 10:“ ______: _:: _—: :P_ : :_ : __ p___b___b_____ J_.___ _:: ._. :___ :_ — _..dd__d_____4 _b_______—_——_ (suun Momqm) AllSNBlNl CHAPTER VI CONCLUSION Previous studies showed that at ion implant doses of 21 3 2.0x10 /cm the resultant SiC crystal showed a graphite type structure that annealed away at temperatures of 600°C.(9) Our data indicates that at doses of 1.6x1021/cm3 3 and even down to 1.3x1021/cm the lattice is damaged in a process that is the same as at the higher dose. Low doses (10) All three dosage show no graphite type structure. levels seem to anneal to the host crystal structure in a similar manner. APPENDIX START: LOOK: LOOKl: LOOKZ: LOOK3: LO0K4: PIOSET: 32 RAMN: A PROGRAM TO CONTROL RAMAN DATA COLLECTION WRITTEN BY R.L. BOWERSOX FOR A MASTERS THESIS LD SP,STACK ;SET UP STACK POINTER CALL RIOSET ;INITIALIZE RAMrI/O CHIP CALL PIOSET ;INITIALIZE PIO CHIP EI LD A,(SWITCH) ;GRAB SWITCH SETTINGS BIT 3,A ;CHECK FOR THE DIRECTION PUSH AF LD A,(MASKA) ;GET PIO A MASK RES 1,A OUT (PIOA),A ;SET FORWARD JR NZ,LOOK1 ;IF THAT IS WANTED BRANCH SET 1,A ;IF NOT CHANGE TO REVERSE OUT (PIOA),A LD (MASKA),A ;SAVE NEW DIRECTION POP AF ;RETRIEVE STATUS BIT 6,A ;CHECK FOR REMOTE SETTING PUSH AF LD A,(MASKA) ;GET MASK AGAIN SET 3,A OUT (PIOA),A ;SET REMOTE JR NZ,LOOK2 ;BRANCH IF CORRECT RES 3,A OUT (PIOA),A ;SET LOCAL LD (MASKA),A ;SAVE NEW SETTING POP AF BIT 3,A ;CHECK FOR RUN JR NZ,LOOK3 ;BRANCH UP IF NOT LD HL,MASKA ;POINT TO SWITCH STATUS BIT 3,(HL) ;CHECK FOR REMOTE JP Z,RUNIT ;IF NOT EXECUTE RUN BIT O,A ;CHECK FOR STEP JR NZ,LOOK4 ;NO, GO ON CALL STEP ;STEP SPEX JR LOOK ;START OVER BIT 7,A ;CHECK FOR CONTINUEOUS STEP JR NZ,LOOK ;NOPE, START OVER CALL STEP ;STEP SPEX LD A,(SWITCH) ;GET NEW SWITCH SETTINGS JR LOOK4 ;KEEP IT UP TILL NO MORE RUN LD A,BITMOD ;PIO BIT MODE WORD OUT (ACON),A ;SET PORT A TO BIT MODE LD A,PAMASK ;BIT MASK OUT (ACON),A LD A,PAINT ;INITIAL CONDITIONS LD (MASKA),A ;SAVE FOR FUTURE USE OUT (PIOA),A LD A,BITMOD ;SET UP B BITMOD ACON BCON PIOA PIOB PAMASK PBMASK PBMSKZ PAINT PBINT PBINTZ RIOSET: AMASK BMASK ODRA ODRB RIOA RIOB AINT BINT BITAO TOGGLE: 33 RAMN: A PROGRAM TO CONTROL RAMAN DATA COLLECTION WRITTEN BY OUT (BCON),A LD A,PBMASK OUT (BCON),A LD A,PBINT OUT (PIOB),A LD A,PBINT2 OUT (PIOB),A LD A,BITMOD OUT (BCON),A LD A,PBMSKZ OUT (BCON),A RET EQU OCFH EQU 82H EQU 83H EQU 80H EQU 81H EQU 80H EQU 80H EQU 88H EQU ocpa EQU OFDH EQU OFBH LD A,AMASK LD (ODRA),A LD A,AINT LD (RIOA),A LD HL,BITAO CALL TOGGLE INC L INC L CALL TOGGLE LD A,BMASK LD (ODRB),A LD A,BINT LD (RIOB),A RET EQU OFFH EQU OFIH EQU 3022a EQU 3023a EQU 3020a EQU 3021a EQU OSDH EQU 067a EQU 3000H LD A,(HL) AND A PUSH HL R.L. BOWERSOX FOR A MASTERS THESIS ;B INITIAL CONTITIONS ; (STOP - BIT 3 OUT) ;TOGGLE BIT 3 ;NEW MASK, BIT 3 INPUT ;RAM/IO PORT A MASK ;PORT A ALL OUTPUT ;INITIALIZE A ;TOGGLE BIT 0 OF A ;TOGGLE BIT 2 OF A ;RAM/IO PORT B MASK ;INITIALIZE PORT B ;READ BIT ;SET FLAGS ON: OFF: DL25US: DOZMS: LUPE: STEP: SUBT: 34 RAMN: A PROGRAM TO CONTROL RAMAN DATA COLLECTION WRITTEN BY R.L. BOWERSOX FOR A MASTERS THESIS POP IX ;GET BIT ADDRESS IN IX JR Z,OFF ;JUMP IF BIT WAS ZERO LD (HL),A ;RESET BIT CALL DL25US ;25 MICROSECOND TIMEOUT LD (IX+10H),A ;SET BIT AGAIN RET LD (IX+10H),A ;SET BIT CALL DL25US LD (HL),A ;RESET BIT AGAIN RET PUSH HL 311 T CYCLES (5.5 US) NOP ;04 T CYCLES (2.0 US) POP HL ;10 T CYCLES (5.0 US) RET ;10 T CYCLES (5.0 US) ;AND CALLING (8.5 US) ' = (26.0 US) ’ PUSH BC ;SAVE REGISTER LD C,02H ;THIS ROUTINE TIMES OUT FOR 2 LD B,45R ; MILLISECONDS AND RETURNS DJNZ LUPE DEC C JR NZ,LUPE RET LD BC,(STPMSD) ;MOVE STEP SIZE TO BC LD A,C ;LOAD MSD TO A AND OFH ;MASK OUT BITS LD C,A ;SAVE THEM AGAIN LD A,B ;MOVE LSD TO A SUB 2 ;SUBTRACT STEP SIZE (0.02 A) DAA ;ADJUST DECIMAL LD B,A ;SAVE IT LD A,C ;MOVE MSD TO A SBC A,0 ;BORROW IF NECESSARY DAA ;ADJUST ACC RET M ;RETURN IF UNDERFLOW (NOTE, THIS STEP ; ROUNDs DOWN ODD STEP SIZE CHOICES LD C,A ;SAVE MSD IF NO RETURN LD HL,SPXSTP ;GET ADDRESS OF SPEx STEP BIT CALL TOGGLE ;TOGGLE BIT (STEP SPEX 0.02 A) CALL DOZMS ;DELAY 20 MILLISECONDS JR SUBT ;DO IT AGAIN RUNIT THIS ROUTINE IS THE ONE CONTINUALLY EXECUTING WHILE DATA COLLECTION IS GOING ON. IT CYCLES AND CHECKS FOR THE STOP SWITCH BEING SET, OVER RANGE OF THE SPECTROMETER STEPPING MECHANISM, ANDISSR READY TO PRINT. (THIS OCCURS IN LOOP DOIT) THIS ROUTINE ALSO TAKES IN THE FRONT PANEL SWITCHES \O. \O. v. v. we ‘00 U. ”I V. ’ RUNIT: DOIT: 35 RAMN: A PROGRAM TO CONTROL RAMAN DATA COLLECTION WRITTEN BY ROUTINE R.L. BOWERSOX FOR A MASTERS THESIS AND UNPACKS THE WAVELENGTH INTERVAL PARAMETERS. IT THEN CALCULATES THE WAVELENGTH DIFFERENCE BETWEEN START AND STOP AND STORES IT IN 'STOPWL'. WE ALSO TURN ON THE RUN LIGHT AND DISABLE THE EXTERNAL SPECTROMETER DRIVE INPUT CALLS: DESTROYS: CHANGES: LD HL,STORFP LD DE,STOPWL LDI LDI LD A,(HL) AND OFOH LD (DE),A INC DE LD A, (HL) AND OFH LD (DE),A INC DE INC HL LDI LDI LDI LD A,(HL) AND OFOH LD (DE),A CALL INTRVL LD HL,RESTAR CALL TOGGLE LD (LITEON),A LD (EXTOFF),A LD A,(SWITCH) AND 08H JR Z,DOIT LD A,(RIOB) AND OCH JP NZ,ENDUP LD A,(PIOB) AND 02H CALL NZ,TOTAPE LD A,(ENDFLG) AND A JR Z,DOIT INTRVL, TOGGLE, TOTOPE, ENDUP AF, DE, EL, BC STOPWL, STARTL, STPMSD ;LOAD ADDRESS OF FRONT ;PANEL SWITCH STORAGE ;LOAD ADDRESS OF ENDING WAVELENGTH ;MOVE 2 BYTES ;GET LS-DIGIT IN A ;PUT ZEROS IN LOWER 4 BITS ;STORE REST OF STOP ;GET BACK BYTE ;KEEP LS-DIGIT ;STORE IN 'STPMSD’ ;REST OF STEP SIZE ;STORE NEXT BYTE IN 'STARTL' ;CALCULATE WAVELENGTH INTERVAL ;RESET/START SSR ;TURN ON RUN LIGHT ;TURN OFF EXTERNAL DRIVE ENABLE ;CHECK FOR STOP ;IF STOPPED, BURN UP TIME ;CHECK TO SEE IF WE ARE ; AT SPEX HI OR LOW LIMIT. ;IF SO, END ;CHECK FOR SSR DATA READY ;IF 80 GET TO TAPE WRITE ROUTINE ;ARE WE DONE? ;IF NOT, LOOP AGAIN. ALSO IF WE ; NEVER WENT ANYWHERE ON THIS LOOP , ) 9 a MOVSPX: SUBTR: SETEND: DECSUB: 36 RAMN: A PROGRAM TO CONTROL RAMAN DATA COLLECTION WRITTEN BY R.L. BOWERSOX FOR A MASTERS THESIS MOVSPX ROUTINE JP ENDUP ;IF SO,GO TO END THIS ROUTINE IS USED DURING THE EXECUTION OF PROGRAMED CONTROL OF THE SPECTROMETER. IT STEPS THE SPEX THROUGH THE SELECTED STEP-SIZE AND UPDATES THE CURRENT POSITION HELD IN LOCATION STPMSD CALLS: DECSUB, STEP DESTROYS: HL, DE, AF CHANGES: ENDFLG LD HL,STPMSD+2 ;ADDRESS OF STEPSIZE LSD LD DE,STOPWL+2 ;ADDRESS OF WAVELENGTH INTERVAL LD B,3 ;NUMBER OF 'DECIMAL’ BYTES AND A ;CLEAR CARRY CALL DECSUB ;CALL DECIMAL SUBTRACTION ROUTINE DJNZ SUBTR JR C,SETEND ;IF WE GO NEGATIVE, WE WILL ; STOP STEPPING AND SET THE ; END OF JOB FLAG CALL STEP ;ELSE STEP SPEX RET LD A,CFFH ‘ LD (ENDFLG),A ;SET END FLAG DECSUB ROUTINE INTRVL ROUTINE RET THIS ROUTINE PERFORMS DECIMAL SUBTRACTION ON TWO NUMBERS POINTED TO BY HL AND DE. AFTER SUBTRACTION DE AND HL ARE DECREMENTED (SUBTRACTION MOVES FROM HIGHER ADDRESS TO LOWER ADDRESS) DESTROYS: HL, DE, AF CHANGES: (DE) THE RESULT IS STORED HERE LD A,(DE) ;GET WORD FROM STRING 1 SEC A,(HL) ;SUBTRACT WORD FROM STRING 2 DAA LD (DE),A ;STORE RESULT IN STRING 1 DEC DE DEC HL RET CALCULATES THE INTERVAL OF TRAVEL FOR THE SPECTROMETER. CALLS: DECSUB o 3 9 INTRVL: SUBTRl: 37 RAMN: A PROGRAM TO CONTROL RAMAN DATA COLLECTION WRITTEN BY R.L. BOWERSOX FOR A MASTERS THESIS TOTAPE ROUTINE DESTROYS: HL, DE, AF, B CHANGES: STOPWL (RESULT IS STORED HERE) LD HL,STARTL+2 ;ADDRESS OF STARTING WAVELENGTH LD DE,STOPWL+2 ;STOP WAVELENGTN (RESULT STORED HERE) LD B,3 ;3 BYTES OF NUMBERS AND A ;CLEAR CARRY CALL DECSUB ;SUBTRACT (DECIMAL) DJNZ SUBTRl RET THIS ROUTINE TAKES THE DATA FROM THE SSR AND WRITES IT TO THE KENNEDY RECORDER. AT THIS TIME WE CHECK TO SEE IF AN INTER-RECORD GAP IS NEEDED (AFTER EVERY 100 DATA ITEMS), AND IF SO GENERATE ONE. IF KENNEDY IS TURNED OFF THE PROGRAM CAN HANG WHEN WE CALL READY OR ANY OTHER ROUTINE THAT CALLS READY. CALLS: TOGGLE, PRINT, PRINT2 (PART OF PRINT), READY DESTROYS: DE, BC, AF CHANGES: EORCNT LD (STBUSY),A ;SET PR BUSY ON SSR LD DE,(LOSSR) ;LOWER 4 DIGITS FROM SSR LD BC,(HISSR) ;HIGH 4 DIGITS LD (UNBUSY),A ;RESET PRBUSY LD HL,RESTAR ;SSR RESET/START ADDRESS CALL TOGGLE ;RESET IT AND START IT AGAIN LD A,450 ;TAPE WORD DELIMITER CALL PRINT2 ;TRANSFER TO KENNEDY LD A,D ;GET DIGITS OUT OF CALL PRINT ; STORAGE AND CALL UNPACKING LD A,E ; AND PRINT ROUTINE CALL PRINT LD A,B CALL PRINT LD A,C CALL PRINT LD A,450 ;DELIMITER CALL PRINT2 LD HL,EORCNT ;ADDRESS OF TAPE WORD COUNT LD A,99 ;HAS IT BEEN 100 WORDS CP (HL) ; SINCE LAST EOR? INC (HL) ;UPDATE wORD COUNT RET C ;RETURN IF