PINSTECH-168
DESIGN OF MULTICHANNEL COUNTING SYSTEM-2 FOR IBM PC AND COMPATIBLES
ZAHEER AHMAD RASH ID QAMER lit NAVEED MUSHTAQ
^^ftrt'
Computer Dftisioi Pakistan Institute of Nuclear Science & Technology P 0. Nilcre, Islamabad April, 2001 ABSTRACT
A multichannel, Counting System 2 (MCCS-2) data acquisition plug-in card for the IBM ISA, MCA and EISA bus architecture has been designed and developed for acquisition of pulsed signal. The card features large dynamic range is achieved with the help of 16-bit pulse counters, fast signal acquisition and a self-testing capability in a single slot card. The MCCS-2 (designed by R & D group, CD) is an upgraded version of MCCS-1 [6]. The MCCS-2 consists of a plug-in interface card (MCCS-PC) for fBM PC and compatibles and a BNC- terminal module (MCCS-BNC). The MCCS-PC is address selectable and can simultaneous monitoring ten independent SCA inputs. An on board programmable timer provides elapsed time measurement. A menu-driven software program is developed for data acquisition and timer control.
i TABLE OF CONTENTS
DESCRIPTION PAGE
Abstract i
Table of contents ii
List of drawings iv
Introduction 1
Specifications 2
Hardware Design Description 3
3.1 Signal Isolation and Conditioning 3
3.2 Timer 3
3.3 Counter 4
3,4 Address Selectable Logic 4
3,5 Base Address Switch 5
3,6 Bus Interface 6
3.7 Status Monitoring 6
Table-1 Switch Setting 6
Tabfe-2 Addresses Table 7
PCB Fabrication 8 Installation 8
Data Acquisition Software 9
6,1 Data Acquisition 10
6.2 Data Files 11 3 Self Test
4 Analysis
Conclusion & suggestions
Components List
References
Appendix-A, The program listing LIST OF DRAWINGS
No. DescfjpiLQn Page
Block diagram of MCCS-2 16
Components of MCCS-2 17
MCCS-2 BNC Interface Module 18
Block diagram of the MCCS-PC interface board 19
LC. layout of the MCCS-PC interface board 20
Circuit diagram of the MCCS-PC interface board 21
PCB Artwork of MCCS-2 Component Side 22
PCB Artwork of MCCS-2 Solder Side 23
IV 1, INTRODUCTION
In nuclear experiments, the signals from a detector are fed to a linear amplifier in a NIM-BIH The output of the amplifier is connected to the input of a Single Channel Analyzer (SCA). The SCA output is a loyic pulse for each event. These logic pulses are used by the counting circuitry for count rate measurement or counting events over specified period of time. For each experimental setup the data is collected and then interpreted using computer or calculator. Further, in order to determine the spatial distribution of events (for example a radiation source), similar measurements from different locations are made simultaneously. In order to ease the installation of such experiments and to improve the turn-around time, it is desired to automate the system. The Multichannel Counting System (MCCS-1) was designed by Research & Development (R & D) group of Computer Division and supplied to various division in Pakistan Institute of Nuclear Science St Technology (P1NSTECH), Institute of Nuclear Power (INUP) and Kundian Chemical Plant-I[ (KNCP-II), The Radiation & Isotopes Application Division (R1AD) and Neutron Diffraction Group ofNPD are requested for upgradation and modification of MCCS-1 system. MCCS-2 is a new designed system described in this report provides a direct interface between SCA outputs and an IBM-PC compatible compuler, capability to interface ten SCA outputs channels instead of seven and address selectable logic allows the user to interface multiple modules simultaneously connected to the computer. The interface card is designed and developed for IBM-PC/XT/AT bus. The data for multiple counting channels is stored on the computer disk along with necessary information such as elapsed time, date, number of channels etc.
1 2. SPECIFICATIONS
The specifications of the MCCS-BNC module and MCCS-PC interface board;
Number of input channels 10
Timer resolution 0,5nS 10 32.7 mS
Max. Counts per channel 65535 (16-Bits)
Time for acquisition 5 mS to 35 Minutes and 47 Sec.
ISA, MCA & EISA Bus Architecture Single- I/O, Slot
Interface between MCCS-PC 25 pins D-type connector and MCCS-BNC module with 26-way twisted pair ribbon cable
Interface between SCA and 50 Ohm BNC connectors MCCS-PC module with Cables.
2 3- HARDWARE DESIGN DESCRIPTION
MCCS-2 system consists of multichannel counting system plug-in interface card (MCCS- PC), to be installed in an IBM-PC compatibles I/O channel and BNC interface module called MCCS-BNC. The SCA oulpui pulses are terminated on MCCS-BNC interface module through a twisted pair ribbon cable are connected to the interface card within the PC. The block diagram of the overall counting system is shown in Fig 1.
The SCA output is a logic pulse of 0.5u5 duration [ 1 ] for each event. These logic pulses are used by the MCCS-PC interface as input to one of its ten counting channels. A timer enables these counters for a specific period of time.
The heart of the MCCS-PC card is the Intel 3253-5 programmable counter/timer I.C [2]. It contains four registers of sixteen bits each. One of which is reserved for control and remaining three registers can be used either as counters or timers independently. Four £253-5 LCs are used on a card at location U I, U2, U3 and U4, giving a total of 12 user - available registers, out of which one is used as timer and one frequency divider. The remaining ten registers perform pulse counting of the ten independent input signals. Fig. 5 shows the block diagram of the MCCS-PC board.
The LC. layout of the board and the circuit diagram is shown in Fig, 5 & 6 respectively. The various sections of the design are discussed below.
3.1 SIGNAL ISOLATION* CONDITIONING
The pulse width of SCA output signal is 0.5us and its range is from 0 to 6 volts. The incoming signals [6] from MCCS-BNC interface box are isolated electrically from the interface card MCCS-PC using bus isolators (RS 20B-355) to avoid probable damage to the computer from the counting system and vice versa.
The output of a bus isolator is not TTL compatible as required by the computer. Hence these signals are converted to 0-5 volt using two resistor packs of Ik & 330 ohms. The output of potential dividers is fed to line receiver/driver buffers, 74LS244 (U6 & U12) for further use,
32 TIMER
Not relying on the PC system clock that varies from 4.77 MHz to more than 433 MHz depending upon the make and model being used, a 2 MHZ {as basic requirement of 8253-5) crystal is used to generate basic clock for the counter/timers. A 2 MHz clock is divided by 2000 to obtain a square wave of 1 kHz, This square wave output is obtained from counter 2 of U2 that is programmed to function as divider for the incoming clock. The gate 2 of U2 is enabled permanently by pulling it up to 5 volts supply. The counter 1
3 acts as a timer in mode 0. It is loaded with an initial value in milii seconds. The gate I is enabled by software. The OUT 1 is active low until counter 1 contents are made not equal to zero. The OUT 1 signal is inverted and used to enable the gates of various counting channels. When the counter-1 is decrement to zero, the OUT 1 changes its state and disables all the counting channels. The 2 MHz clock can be divided any suitable number by software to obtain a timer resolution from 0.5 us to 32.7 mS.
3.3 COUNTER
The interface has 10 counting channels. All the counters are loaded with FFFF hex initially and each counter starts in count down mode when its gate is enabled. After the specified elapsed time as discussed above, the respective gates are disabled. The counts from various channels are read by software. The present leading is subtracted from the initial value FFFF hex to find the actual events recorded by each channel
3.4 ADDRESS SELECTABLE LOGIC
In MCCS-1 module has limited design features of fixed address. We faced two main problems. The first thing is that the module can be used only for seven channels with no multiple modules and secondly only one device of same address of 300Hex can be used The address selectable logic is introduced in MCCS-2 module to overcome these problems. The 3-£o-8 line decoder 74LS138 on the board serve as address decoders. One function of an address decoder is to produce a signal, which enables the peripherals for a particular address. A second related function of an address decoder is to make sure that only one device is enabled at a time to put data on bus lines. To enable address decoder, G2 signal an address selectable logic is used. Figure (3.4) shows that 8-bit Magnitude Comparators 74LS682, perform comparisons of two eight-bit binary or BCD words and provide P=Q output. In our case Qs inputs, from data switch and other inputs Px, (Address bit 5 to address bit 9 ) is from Octal Buffers/Receivers non-inverted 3-state outputs 74LS244 are feeding to 74LSG82 the P=Q output of this chip is used to enable decoders.
4 IBM PC/XT DI-D5 I/O CHANNELS DATA SWITCH > 3-8 L!NE S S-81T DECODE MAGNrrUDE P=Q COMPARATO R RS 74LS138 ADD 4-ADD9 OCTAL ADD5-ADD9 BUFFER G2 A2 74LS 682 S/LINE S- o DRIVER P A2 2 74LS244
Fig. 3.4 ADDRESS SELECTABLE LOGIC
3.5 BASE ADDRESS SWITCH
The MCCS-2 is configured for a base address of 300 Hex (768 decimal). If this base address is already occupied, we can change the Base Address switch setting as shown Figure 3.5. It is essential that each peripheral device, such as MCCS-2, be assigned a unique Base Address (Table-1) with in the range of 300 to 360 I lex (768 to 864 Decimal) and the address is on a 16-byte boundary.
A*> A8 A7 A6 A5
ON 1 1 1 t. 1 5 4 3 2 1
Figure 3.5: Base Address Switch
s TABLE-1
SWITCH SETTING OF I/O DECODE FOR MCCS-2 MODULE
ADDRESS A9 AS A7 A6 A5 A4 A3 A2 Al A0 300 Hex 0 0 1 1 1 1 1 1 1 1 (768 Decimal) 320 Hex 0 0 1 1 0 ] 1 1 1 ] (800 Decimal) 340 Hex 0 0 1 0 1 ] 1 1 \ [ (832 Decimal) 360 Hex 0 0 1 0 0 1 1 1 1 1 (864 Decimal)
0S=> ON, 1 ^> OFF
3.6 BUS INTERFACE
The interface with the PCs I/O channel is through buffers/drivers 74LS244 ( U21 and U22) for address and control signals. The data transfer to/from computer is through transceiver 74LS245 (U23). The interface is configured as I/O mapped registers. The address map is shown in Table 2,
3.7 STATUS MONITORING
Data acquisition is done on polling basis by monitoring zero bit of status register at I/O port address of (Base Address+28) hex. When the status bit is raised to logic 1 the data is available from all the ten channels. The 10R signal and porl address (Base Addrcss+28) hex selection line Is logically ORed to enable one half of tristate buffer 74LS244 (U5),
6 TABLE-2
ADDRESSES TABLE
Address in hex Description
Base Addrcss+Q Channel 0 Base Adress-H Initialize the timer BaseAddress+2 Initialize the divider Base Address+3 Control word for 8253 # 1 AtU2 Base Address +4 Channel 1 Base Address +5 Channel 2 Base Address +6 Channel 3 Base Address +7 Control word for 8253 # 2 AtU3 Base Address +8 Channel 4 Base Address +9 Channel 5 Base Address +A Channel 6 Base Address +B Control word for 8253 #3 AtU4 Base Address +C Channel 7 Base Address +D Channel 8 Base Address +E Channel 9 Base Address +F Control word for 8253 #4 AtUl
Base Address + 1C Enable timer Base Address+13 Disable timer Base Address + 14 Status monitoring Bit 0 - 0 MCCS busy Bit 0= 1 Data available
7 4. PCB FABRICATION
After debugging, testing and analysis of design criteria of Hardware/Software of MCCS-2 prototype module, the Artwork of the PCB is completed in CAD group of CD for PCB. The PCB is fabricated in Optics Laboratories at PINSTECH complex. [Fig-7]
5. INSTALLATION
The interface card (MCCS-PC) may be installed in any IBM ISA, MCA, and EISA bus architecture 1/0 slot available on the IBM-PC motherboard. The interface box (MCCS-BNC) contains ten 50 ohms BNC connectors for getting inputs from ten SCA channels. The (MCCS-BNC) module and (MCCS-PC) are connected using twisted pair ribbon cable and D-type connectors as shown in Fig. 5. The interface card {MCCS-PC) can be assigned a unique base address with in range of 300 Hex to 360 Hex (768 to 864 decimal). At the time of installation, the address of multiple modules can be found as shown in Table-1.
s 6. DATA ACQUISITION SOFTWARE
A software package for &.\IA acquisition has been developed i" HAS1C. It is user friendly and menu driven. The daia ncciuisiuon is done on polling basis. The iistingoflhc program is included in iJic Appcndi\-A. The package is exemued jusl by typing MC'CSP mid pressing rclimi. The ins!ructions Inr user will display.
- This program will run in DOS M title. - Reset your system in DOS Mode - Data wilt be stored in files. - Each file wilt contain data records equal to the number of samples given later - New data files be opened and closed in onto mode onee the name of the file is specified. - Press any key to continue
Then a menu will be displayed on ilio terminal ;i:> below.
MKNU
Press FSfor data acquisition
Press F6for data analysis
Press Flfor read data file
Press FSfor exit.
Press FVfor return to main menu.
') 6.1 DATA ACQUISITION
Press F5 for data acquisition and ihc program will ;tsk information regarding the system configuration.
1). Give the board address.
Hoard address No. I (DECIMAL 768tR0018tt,M-l)
The package will check [lie board address, il' correct j[ will give next message lor board address 2, in case if the address is nor correct an error message wilt display:
INCORRECT INPUT. TRYAGAIN.
11). Channel Information
After the correct addresses of Ihe modules are given then the status of Channel from I to 20 is entered by the user, (Default is YES)
The next query will be about the acquisition lime ;tiul the number of tunes the data has to be collected (i.e. no. of samples to be taken). The ^cioui dump is as follows: -
DEFINE SYSTEM CONFIGURATION
Detector channel 1 Y/N |V] ? Detector channel 2 Y/N |Yj ? Detector channel 3 Y/N [V| ? Detector channel 4 Y/N JV| ? Detector channel 5 Y/N [Y| ? Detector channel 6 Y/N [Y| ? Detector channel 7 Y/N \\\ ? Detector channel 3 Y/N |V| ? Detector channel 9 Y/N | Y | ? Detector channel 10 Y/N |Y| ?
Detector Channel 20 Y/N [Y|7
Data acquisition time in sees = Number of readings/ File = Number of Files -
10 After receiving the above information, [he package will execute a Self-Test explained later. If self-test fails, the package will give error message and the system will return back to main NENU. However if self-test is successful, the package will ask the file name in which the data will be stored. If no file name is entered, "MCCS. 000" is taken as the default file name. The screen display will be
Self test in progress
Test Successful Give file name [MCCS.O0O|= File Already Exist Overwrite! Y/N| If no than Give file name |MCCS.000|=
During data acquisition, the information about events in the configured channels, the number of times the data has been collected and file name are displayed on the screen. Alter completion of the data collection, a musical tunc is played along with the necessary information displayed on the terminal. The program will return to (he mam menu after some delay.
6.2 DATA FILE
The data is stored on the hard disk in a sequential ASCII data file. The format of the file is as follows:
Record Name Description Number L CHN The number of acquisition channels. 2, NREAD Number of times the data is collected 3, DTM1E Data acquisition lime in sec 4. DATE Date of the day 5. TIME Si ailing lime 6. STATUS OF " 1 " means the channel is configured. CHANNELS. " 0 " means the channel is not configured. 7. DATA NREAD " records, each record contains counts from all the seven channels.
The data is stored on the disk in file name given by the user however the default data file is MCCS.000,
II 6.3 SELF TEST
Since the counting channels are 16 bit registers, ihey can record only up to 65535 counts. If the events arriving in specified time are more than the above figure, die registers are re-initialized to the maximum value and start counting down. This would give erroneous information. In order to overcome this problem, a self-test routine has been added in the package to record the events for 500ms. The events recorded are scaled up to the time given in seconds in order to determine the probable expected events in the given time.
The test will give a fatal error message if any counting channel is expected to receive more than 65535 events in the specified time and die user is requested to change the data acquisition time before proceeding further.
The self lest may not give accurate indication of number of counts because the nuclear disintegration per second are random in nature. However it gives an estimate of the number of events expected,
6.4 ANALYSIS
This part of the package is left for the users To perform analysis according to their requirements. However graphic routine is included for NPD. This routine displays graph of count versus detector position.
a 7-0 CONCLUSIONS AND SUGGESTIONS
The interface MCCS-PC module is designed keeping in view the requirements of Radiation & Isotopes Application Division and Neutron Counting Channel in Reactor Experiments of NPD. It is a genera I-purpose module and can be used anywhere for counting the events provided the output of counting system is in the form of logic pulses.
The Interface card may be considered funcliouully equivalent lo Counter/Timer (ORTLC 771 with buffered memory option) and NIM-RIN primer. The ndded ;idv;iuiage of more precise control of a resolution of 0.5 uS is achievable.
It has one limitation of using 16 hil counter registers and can record up to 65535 events. However this limitation can be overcome, if required, by cascading various counters in hardware.
The computer technology is improving very rapidly and I/O slots or lius are also changing. The DAQ boards designed iov ISA, MCA OR EISA bus cannot use with the PC having slots PCI or PCMCIA Same problem is faced using a Lap Top computer. To overcome this problem the study of different solutions i.e. a Parallel Port and Serial port (RS 232 Standard) Data Acquisition Systems is carrying on. The new dedicated system will be expected to be useful for field experiments in remote areas.
11 s. COMPONENT LIST The list of components used is as follows:
. No. T.C. Qtv, Locution
1 74LS245 1 LJ2.1
2 74LS244 5 U5, U6, UI2, U21.U22
3 74LS08 1 UI6
4 8253-5 4 UMJ2, U3, U4
5 74LS74 1 UI5
6 74LS04 2 UI6, U20
7 74LS32 3 UI4
8 74LS682 1 U19
9 74LS02 1 UI7
10 74LS138 1 U13
11 Bus Isolators 3 U9, 1110,1111 RS20S-355
12 330 ohms pack 1 US
13 Ik ohms pack 2 U7
14 25 way D Female Connector 1 MCCS-PC Module
15 25 way D female Connector I MCCS-I1NC Module
16 2 MHz crystal 1
17 50 ohms BNC Connectors 10 MCCS-BNC Module
IB Data Switch 1
14 REFERENCES
1. SCA manual ORTEC Inc, USA, 1984.
2. Intel Microprocessor and Peripheral Handbook Vol, JJ, USA, 1987r
3. IBM Personal Computer XT System Technical Reference Manual. 1995.
4. TTL Data book Volume L Texas Instruments USA, 1984.
5. Microprocessors And Interfacing Programming and Hardware By Douglas V. Hall, 1986.
6. Design of Multichannel Counting System for IBM PC and Compatibles, PINSTEC-150, July 1995. Bakhtyar Majeed, Zaheer Ahmad, Asif Osman, Dr. M. M. Yasin
7. IBM BASIC Reference ,1997.
L5 NiM-BIN IBM-PC/XT/AT COMPATIBLE
RIBfeON CA^tLE (WCCS-CA) MCCS-2 PC INTERFACE BNC INTERFACE: U3 BOX
i*MP SCA
1 BLOCK DIAGRAM OF MCCS-2 MCCS-2
v
V V V MCCS-BNC MCCS-CA MCCS-PC MCCS-SP BNC CABLE INTERFACE SOFTWARE INTERFACE MODULE PACKAGE BOX
Fig.2 COMPONENTS OF MCCS-2 CH-1 CDH-2 CH-3 CH-4 CH-5 © © © © ©
CH-6 CH-7 CH-8 CH-9 CH-10 © © © to
\
Fig.3 MCCS-BNC INTERFACE MODULE BUFFERS 8253-5 3-TO-S DECODER COUNT! HG CHANNEL • B AD+1C H '0 AD+14 1.0 BASE j^_ ADDRE^I C5 SCA LOGIC B AO+C A4-A2 +C H PULSE B AD+B INPUTS B AD+4 EN B AD+O A1 8253-5 AOc CQUMT1HG BASE i-i. ADDRESS BUFFERS 3 CHANNEL +14 H i-5- BASE =2> ADDRESS A9-AQ ADDSESFI c3 TOR A9.A0 SELECTION A1.AO „ +a H * + EN 5*~* S253-5 | A*. STATUS D5 AOc MONITORING BUFFER CCIATT^ \2 CHANNEL SASE J^ ADDRESS !cs 1^ -4 H '
Lr S253-5L A:. JBW-PC/XT/AT (BASE ACU,+:C H} AG C0UNT1HG | c CHANNEL ENABLE t/0 SLOT BASE OUT! ADDRESS +£l H ^SQUARE 3 WAVE O GENERATOR TIMER BTTO
Hg-4 BLDCKJD1GRAM OF MCCS-2 PC INTERFACE BOARD 1 OE 1M LB U7 U« HI LP a^""aoB-3sir ffl? DB253 QBE53
> aoa-353 fflij iK Oha 330 ohm 330 IK fr 3JS-35S NAVEHJ/flfiD 5L 74244 BO COMPUTES DIVISION IX Ftl PINSTECH.
U13 U13 Ui7 UJ* U-3 UU o Cl nlm I si ISIJ9I 1" I §' 5] G Si [rvi 3 2&74LS244 74LS344 j§ S&7415345 ii d ffiTj "' GE FEEftTtH R3 >C2 arrtT*L n CZZJC3 SHE u FU 10 GMftWEL COWING SVS7EX HODULH -* o
Fig.5 IC LAYOUT MCCS-PC INTERFACE BOARD ta-wi >—a H- am vr * pD-KbBI
Fig.6 CiRCUIT DIAGRAM OF MCCS-PC INTERFACE BOARD 10 rmunn rmnfTTHn nvnTFM unntfl r
Fiq.7a ARTWORK OF MCCS-2 COMPONENT SIOU Q Fig.7b ARTWORK OF MCC.S-2 SOLDER SIDE APPENDIX-A
24 REM REM HEM MOCS HAS REM REM COUNT KATE-] TV?: r IN< •u-hrn REM [tafi.lclteSfcdfih. - lui.ll rl -7(1S REM REM So|l"",'10 l^'llllll^ I1 IV :\ 1- 13 LI> ia ti14i i REM 11 IL! c3ji|'--cfL 1 JIIII.- REM REM DIMDCOUOO0},DC]O(l(K)()>.n'/l U LOIHIU H'!^ HJCHIKDI "jOMftXU
D)WDCM(lMOXDC32HOOflj.]>(:31(l(^Jil>i7!f]0()0}JX",.,i5{lflOO) i , , , DlMDC3*(iooo),ix 37HOW))ix ^NirtL]>ni vjnort[))nc .io[tnon]1njN(2n) GOSUB3000 GOSUBI770 ONKEY^GOSUU^ KEV(5)ON ONKI:Vro)^OSUIJ]"[itt KEV(6) ON ON K.u\ry)CiOKLm :!«:•» KEY(7)ON ONKI-YflOGOJiUftMO KEYtf)ON Z*0
lFADDR.1=7 OUT* u-:i.-|SirimLii cn»ftM,t£i'rbCJJKki) CH*>5-LEFTC(CH«$;,1) CHdOSH.HPTJff'HlDS.I) CHG^LEFTVCHIIS,!) CHfES^LEFT&CHmj) {mti = LlsFrSftTllft,l) CMu-Wi-IJ-PTSfniMSJ] CHtf^LEFTSfCimSJ* ClU^-UiFWHlTSJ) CH(»KS*U;FrwnilKiJ) CHtt *% =LE FTSi C h I *5,1) n i70i =LRFFSI C:H?OIJ » FORi-lTONL^CHN(l) 0. NF.XTI lFCCH5JS=,|WORrH5IS^n")TKr\ND-NrKl 1. L.S[{fHSli "V.CIJNUWI il'(CH^^"N"OltC.H52^"n,')TiLI[N\i:^Nrvn: I.SF CII ^fr-"Y"*7TINfi)==l IF(rJl^^="N_OR(H53S="ii")THI';N.>Jl>-Nn-L F! I.KF. c'MStt "ViCHNCVH IF (CH54$^"N" OR CH£1$=V)THEN NT>N1 M F LSI-C| [MS 'v.CHNM>-I ,r LF IF NIVtmiFN PRINT'\^1VFPI^WR CONFIX" k'Vl'ON "Fl KFtffjI'OS'iO FOR! I TO 1000 NRATI GOSUR1770 GOTO U70 PRINT INPUT"KxptfimaiLNanu: ".KXTRRlMKN PRINT INPUT" Data acquisilmn lime in «cs = \UY (Ml JNPUT" Number oi'TCfldiiics / Fite - ",NRE AD INPUT " Number orriata fiU — "jiiJt IF nlile-0 ihun iifile-l IFTEST-OT!lFNGOSUR22oO IFTESTH) GOTO 780 IKPUT*CSvefilenwH.j[Ma,N[JKi| m'S\ ]FJf*^"THEN Xfc-HMC 'CS CH)Oh FQRK&MTOnfifc KFFILE=0 ON V.R.ROR < Mh • \:."M OPENXS FORJNJ'tlTA^t OK ERROR GOTO 0 IF SFFILE-1 THEN GOl O «?n CJ.OSi-:^: INPUT "L-ilL-.i]|iM(h <:*II m'rmiii-|Y,N| \I-M\V* IFFOWJ^'iToi FO\VS-"N"iJion f^^w OPI-N xs FOR oiri I'u r AS a i PRINT tfl,ND PRINTtfKNREAI) PRINT* I.DTI ME PRINT NL"DATF- '\DATE$ PRlNTtfJ/TlMt^'JIVIES PRENTtfirHNnVl^^r^CMfJO'^'HriMn'li^i^XCMN^yrHNro^HN^KrifN^J.CltNtiO) PRINT ai.CFlNOJbillNH'kniMt ^[•|JMilljX']lNrn^MLllMflolJ,HNn7U:HM(l8).CJ-]N(]^ RKM - — DllMMV^INIKDnMl^loani?^.) -1'ivi r iiYlhluKtTI l^nMl^-lTHMh-KHKMJnMM^.'J «> 'U AVI lUtVII- !;Ok i"TI TRJNT-DTIML-MJTIML^, 'PRIKT "DTIMM-MJTJMM0^ 'FORMTOlOOQ.NEJn J GOSUBmO hCAI.IJNl,HAI,l7l; HMllLlKF ELS LOCATE 15,25 PRJNTTuiTcritE^ihLl-L^Ls - VO, LOCATE Hi,2^ ,, , PRlNT TolJilNimilmrofnltLil- iL>^tL^voi^]-i.k-iL "jifilo REM _ REM DATA COLLI*'liott JPCH^S^T'THFNAA^ All] U< =. ,1)1 HO ttuM;H?W • DAH^DELSE PAC12-0 IFCH55^--NYH']]FNAA-R:^l)]Mi^l'IHn-iiOKUIl?7on:[)Af,l(M3El„SJW>AC20=0 lFCR56fr'"Y"TllFNAA-')'Al)hU ;ihJUU i.fWUn ?-£)(» DAC21 "D ELSE DAC21=0 LPCRWY'TIJEN AAialO- Al>1 >\l Aid H:l * li WIJI127U0. PAC22 T) ELKE l")AC22=0 iFCH58^-"YltTHFNAA--12:Ai:nHl AiillKI uO^lnnW: DAC23-D ELSE DAC23-0 IFCHW-'Y'THENAA-IIADIHI AODkl CK»SUI*27«0: DAC2.1=D fcL&r;DAC24- 0 JFCHGOS^VTHENAA-M ADIHi AiH)K I GOSLIU2700 DAC25-D ELSE DAO25=0 iKrHniVV'TEIHN' A.-WVADDF-APnr.? Ctw P rot): DA( 31-H FLSF. I1A01==0 IF CHti2Ji-"Y" THHN AA=A: ADDK^ ADDR? uOST "[J 2"'fiO:1 >AO?=[) GLSL; DAC'32-0 JPCH63S=,'Y,,TllE;NAA=^ADDR=Al"f])R2,^nM.[^:i)0'l")AC^^DHLSI:DAr?3-0 lFCMo4^"V",[LH[':KAA--o:ADD!:--ADnk? tV'SI ;U2700 • I5AC34--OELSF T)AOJ-=0 1 p <3J Irt^S^"V "L'» LS-tv AA-& AfiDI^ APhU"M;^M-P. I^OO : l~>AO.Wl L-iL.Sl- DAC35"*! U-CTJr,ftS "VTIfS^'AA---^ A|1]?P.- Al"H "ll? OiM !|* ?"|10 \'i \Oo~r) HLSFM'W 3r> 0 ircH^S^'V'nil'iN AA-K^AllDk-AlllW? t;nMi|l?:nn DAO'' L11'[M:IVU^V-ft irCE] FOR i-1 folOCKJ:riivii GOSUB 1850 GOSUB1770 GOTO t2?0 NRKAD-NRLADD (Tf)TO^i(i PRINTKl-'Yt'MON t'JXJSi: N I NKTUHN RF.M INril^U/irFHKHOARD * RLM '•v,,i":","',,,",,'"""""*»"""*"-,,--*"',,",v-i-->,"t*"iTi*ix>«*" 'ADDR- 8(H) 'HASH; AHJIRFSS (*\- <'(J] iNY! RJTIMKK CHIP FORM TO 2 iijMnip:NAnDK-AnnKj n.M--unm -'\nnit? OUT ADDR-i 28,0 OUT ADDR I ~UK2 V'P ANSI 'l I MM WA\T \\\ NLRATOR cjUTAnf)Ri?.?rjfi -IN MODI" i r:m ITW-Q hivim D OUT ADDRi2,~ 'iiV 2'-^ ]n.,i | | n KH/.CM tf'K GOSUI3 1120 NKXT 1 RTIHUN J M Rt?Tf "—""- ""-- "'-—" - ""*• REM iNrn^j/KTiiEimi.N'ii^ REM «U4»i««V>>r:)|it<'t<'fXi<«'<><><">"U""">>">¥"">>>" OUTADDR'1-IK 1 CONTltOl. W( >RD FOR CT(1 MODI: 0 OUTADDR,2>5 'LOAnrMWl I'll LSI* OUTADHR.:^ 'LOADCTOWiriiMsi* 0UTADDRH7.1S ' CONTROL WORD FOKt HO MODEO.ICI OUTADDR-KUtf 'LOAlKTOWiTHL^li JCl OlJTAI3DRR CTG. MODlj 0 IC2 1 OUTAD0RhKh2^ UJAD CTO WIT! I Lsn.ic: GUT ADDR-i 8,255 'LOAlH.TrtWriH MSH ic? OUT ADDR+11.112 CONTROL WORD FOR CTl MODF 0 - IC2 GUTADDR4Q,255 'LOA11C1 I Wll"H ISIS 1C2 OUT ADL)R+9,2f» M/]A|)I%J"1 WITH MSR K'2 OUTADUR-HlJ-'o ' CONTROI. Wi )kl> FOR C"T2. MODFU IC2 Om'AUURi 10 ^:. ' Li • ADC'I? Wil'il LSI1 It n OLTADDRIIO.:!V» 1 f,(»\IH'l? WHil MS11 II1.' OIII1 ADI3R+-I S..JW '( ,uSrLl.l>l U- i]<|) |-( JR^'JU MODliO L<"3 OUTADDRH2:!.v» 'LUAh'TOWJTII LSH ]C"\ OUTADDRi-12.25.'i '[OAl'U'CO WITH MSL1 K ^ OUTADDK.-H5J]:: 'CONTROL WORD FORCH MODI: o. IC3 OUTADDR+13.2^ 'I.OADCTl WITHLKH ]C3 OUT ADDR+ 13,2tf 'LOAD CTl W1TIIMSB IC3 0UTADDft+IM7u ' CONIUOL WORD R ]R [T2 MODK 0 IC1 C)ljTAI3TJRHhU5S ' LOAD CT2 WITH LSI! |C3 OUTADDRHO^ 'UJALlCr: WlTli MMi. it'3 OlJTA[)DR+3hM2 •CONTKOLWOKD^Rrn MOTirn AS TIMER ObTADDRH.nTlMI^ ' LuALif "I? WITH I.Sfi OUTAHDRi-LDTIMM*'* ' LOAD ( T2 WITH UMl RliTURM AN-\LYsfs I''1)0 ''I M "iriLltt HH)0 r^X'A'll- |0„ 10 PINN"! " A T •: -^ t \ SIS" Gf)si;B JSX) HJItl • LTO 10(J(). NL-XI 1 * "I s GO.SU13 J-770 RETURN MLNU 1-770 CLS-cosiib WOO LOCATE 7JQ PRINT" MENU" LOCATE s.io-PRINT* -:-- --" LOCATE ]flJ0?RI"T" Pr.^ J;M"n, .l.u . .•.-<|UH;MH " PR]NT:LOCATi; \2Ml I'RIKI " PJ^ l-'c, [i>r ^kn :ihsis " PR] NT. t,Of ATI- 14.10 PRffVl " I'EC^ J r !•.»• h'.i.'d.iU tiL " PRINT: UA'ATH I^IOJ'RIM " Pro.* I'.-f Ibi rtii " PKJNT:J.Ot',VL>: UUfl-PRlM " Pie**. I*> U<( Minn loiTi.mi nunn' RICTUKN MUSIC 'PLAY "williain tell overture "IN THE DACKGItc H \li 'GOTO J 9^0 PLAY rnibt230nis" PL A Y "o2lR«e1cw JeeUi lvi3S" PLAYF1toee4ceelii3Hn3Bl!l>g!te'' 'conlinue"williiim Id! overture" 'PLAytl.eKikdefpS'' PLAY*e218do2hi READ DAL A NLE ?0?G CLS iNPLT-^vcfilertirnelklAnOOOl - ",XS. IF x^"" THEN XS^ItlAIMJOO" OPEN XSPOR INPUT AS*] INPUT «LNn lNPITwLNKKAl") iNPirrfltayi-jM]-: c--o KJR1=L~102 INPUT ULXS PRIMT:PRTVrXS NEXT! , , , INPUftfl>ClIN(L),(:KN(^,CHMn).r|iri( tKi'IIN^),(."IIN((^.( H>r(~j.< IIN(iiKCUN(iii.(. ]lWIO) CHN(30) PRIWriPIUNT'NuTiibwot'dwniiftH ".Nil PRINT:PHWNiimt.tirorrtMddiss ".NlikAt) PRINT: PRINT" Data acqiiLsiMpii irnKin vir -• ".D11MI PRimpRThrrcHNrt)m\T R\C:!fl.LVAi:2U>AC32tf)A('23.DAC2-tfMC25 PR[NTlU^tJlAr^^nAC3>JJAC'O.UAr3S.rjA(.,^IMC:37;nAC?K:DAC3^;DAC40 C-CUIl-'O^-IGOTOJ^Oa OO. INPUT" ]"V|JH iiny kev Ijn^iflmu.' " a\\1» GOT01200 22« PRiNT* "'"""*"**'KmlolMiiu hi. ""•"•-•* — "' PRINT: input " Typt: ;iny key ).i r'lmii llv a MKNU " KNXH GOSUI1 ITTtH'E.OSl'J^KEmjnN HI-[HUN 2200 ' — 1 COUNTER T1:S'NT J IT i CLS-PRtN'nPUlNr1"- •• PRlNTPKfNT" $drteil iJi phii^iL'v' PRJNT:PUINT" " DTIMM%--L:DTIML%=2'M NRHADL>=NRKAD:NKI':AI) I DTIMEE-DTJME: DTIME"2 GOSUI11320 RETURN 2370 ' — TFSTCOUNTKA'EL'IHL^Iif.r '„„.,.,., - —— .-- nriMii-m'jMF-ii D0-UACfl"2'DTM[[ Dl=ilAC]0*2*r)TIMK m*Dto:]\*2"\TYMh DMAC12*2*r)'NMh" D4=OAC2fl*:*l)TiMli m=DAr2P2*l>TlMl: D6=DAts22*2*l)TIMI: D^DAC23"2~nTIMI[ lJ^nAC2J-2'tn'lMfi D*=lMC2Ji*2,tiyi,lMF'. DI0=DAr31-2"DTIMt OIl=DAC32*2'miMi; Dll«DAC33*2*tJTJME D13«DAC34*2'DT!ME IJJ4=CA(.:35":"DTIM1- I) 1tH> AC 17* 3* DTI MI DI 7=DAC3R*2*DTIMF ])llM")A™*2*nTIMT: D19=41AC40*2*17,,!MH ll: CIT53£-"Y" AND DO > MAXCl THHN GOSUfcJ 2..10 II"Ctn2S-"Y"ANDni > MAXCl T1IKN GOSfc.V ?vi(i iFcn^s "Y"Afcljf)2^fA\t"n,i!F.Nt:nsim..i(ri(> lFCH5dV-"Y"ANnD3 * MAXCl TIIkN COSUH 2M0 iKniM3S=-lfY"ANDD'l>fcfAXf:rni]'>itjn' MtfSSAGK FOR CR EXClUiDFD 2610 Cl.y LOCATE! G,2XttMnS.r.ri.n7 DS I NMliUJl 1,1 HMHtl •I'UJJSJMUJ)] Mil^E'l'J PRINTDAC.UDACIO^ACII DACl2jW:n I1AC2U W 122.1 W2\DAC2.1 UAC^ PR]OTDA(3]JlA(^ZDACMJJACKlJAC,l>,[)ACV>DAC,3?.[JA(J.UDAt,3^,iJAC40 FORM TO'TOO. NRXTI TliST-2 RETURN 2 700 '- Reading I'Q dtfimd& COUNTL-IN Pi A \ )I")ft+ A A1 COUNrFM-JNP(ADDRi-AAl. COUNT^.So'COIINTMiCOIIN'n, D-MAXC-COl.'NT RETURN FILF. tXTF,NS10N UPDATED 2M10 KXT*/i=VAl.CM]DSfXS.6.2)l INCR EXT%,1 n-lX>l£FrSfXVl) LD2S="WT TF EXTtt < 10 THEN GOTO 2K501-USE GOTO 2S60 #50 Y£=CHX£+LD2S+FN nXfcTR*{E\T%}: GOTO 2870 2860 YS*CHXS+LDlSfrFN FIXSTTOEXT"'.) 2870 X$^n RETURN FUNCTION nxsiROTki DEI'' FN FIXSTR£(NV LOCAL NS Nt=STRS(N^) DO WHILE LEHOTSJK" N^MIDJ(NS,2'i LOOP FNFIXSTRS-NS ENDDEF INFORMATION' 3Q0Q CLS:nostil> 'lOOOIocau 2J pnnl pnnf PRINT" DATA ACQUISITION " PRINT" " PfclNTPRINT" - Tliis pnrcnmi will nm HI DOS Mark " PRINT: PRINT" Rescl voursystem m DOS Mode " PRINT;. PRINT" - DatawiHbujii^tilmn]^ " PRINT: PRINT" - l-:ach file wtlkonljm tfolaitwrnN" PRINT: PRINT" equal to (he TiLitLib^r <^F^:nnL>1 ^^ J''^i"i'^1" PRINT: PRINT" - Now data files lu uyvwA :md clonal in auto" PRINT: PRINT" mode win: ihr name <>f llic Jito JN ^pocilwd" PRINT: INPUT " Press a\w *ey \o .onlmrv '\ rrS RETURN 4000 screen 0,0.0»?lOr ] I.l^Ioenlc i.^ PRINT" Multiple Channel foimlmi! Svsl^n" UNGATE 2 3,5 . PRlNT-RfelJ Gioup CmnjuH^L Hiv^.m P'NS'IY.CU " COLOR RO RETURN 4500 '* fErrur Irapc SFWLE-I RESUME NEXT