i MPO -11Bill°11" II IIII 09053471 DFO - Library C. DOEKES F. W. DEYS L!":73r.1RV ( . 7H .: 17 . - ANC:1,31, APHY MAR 2 0 1985 Mi. 10. :H;:.Q1JE INSTITU: (),:r.:ANCGAPHIQUE DE 13:DORD 0 TECHNICAL NOTE SERIES 79-1 1* Fisheries and Environment Canada HP-9825A - INTERDATA MODEL 70 DATA TRANSFER LINK RESEARCH AND OCEAN AND AQUATIC SCIENCES CENTRAL REGION CANADA CENTRE FOR INLAND WATERS BURLINGTON, ONTARIO
55
Embed
0 RESEARCH AND - Fisheries and Oceans Canada Library
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
i MPO -11Bill°11" II IIII 09053471
DFO - Library
C. DOEKES F. W. DEYS
L!":73r.1RV
( .7H .: 17.- ANC:1,31, APHY
MAR 2 0 1985 Mi.10.:H;:.Q1JE
INSTITU: (),:r.:ANCGAPHIQUE DE 13:DORD
0
TECHNICAL NOTE SERIES 79-1
1* Fisheries and Environment Canada
HP-9825A - INTERDATA MODEL 70 DATA TRANSFER LINK
RESEARCH AND
OCEAN AND AQUATIC SCIENCES CENTRAL REGION
CANADA CENTRE FOR INLAND WATERS BURLINGTON, ONTARIO
March, 1979
HP-9825A - INTERDATA MODEL 70
DATA TRANSFER LINK
by
C. Doekes
and
F. Deys
This is an internal technical report which has received only limited circulation. On citing this report the reference should be followed by the words "UNPUBLISHED MANUSCRIPT."
P.O. Box 5050 Burlington, Ontario L7R 4A6
ABSTRACT
This report describes the link between the HP-9825A
Calculator and the Interdata Model 70 Computer, which was developed
to effect the transfer of CTD (Conductivity, Temperature, Depth) profile
data from HP cartridges to 7-track magnetic tape. Included are program
documentation, listings, sample output and operating instructions.
i
ii
ACKNOWLEDGMENTS
The authors wish to thank the Ocean Instrumentation and
Survey Electronics Sections for the technical aid provided in developing
this project, J. Fiddes for typing, and E.O. Lewis for editorial assistance
and reviewing the final manuscript.
iii
iv
TABLE OF CONTENTS
ABSTRACT ...•
ACKNOWLEDGMENTS
TABLE OF CONTENTS
LIST OF FIGURES
INTRODUCTION AND GENERAL OVERVIEW
HardwarE;! ••
Software •
CONCLUSION • .
REFERENCES .
. .
APPENDIX A: FILE DOCUMENTATION
APPENDIX B : PROGRAM DOCUMENTATION AND SAMPLE OUTPUT •
APPENDIX C: OPERATING INSTRUCTIONS
APPENDIX D: PROGRAM LISTINGS
TRANSFER
RDP001
RDP002
APPENDIX E: USE OF THE HP-98036A INTERFACE
v
iii
v
vii
1
1
3
5
7
9
13
23
27
29
31
38
41
V.:(
LIST OF FIGURES
Figure 1: R&D Division Minicomputer System
Figure 2: Data Transfer System Flowchart •.
Figure 3: HP-98036A Interface Registers
vii
Page
2
4
45
viii
INTRODUCTION AND GENERAL OVERVIEW
In 1978, the Research and Development Division began CTD
(conductivity, temperature and depth) data reduction, error checking,
editing and plotting in the field using an HP-9825A programmable calcu
lator (Deys, 1978). This meant that data was returned from the field on
Hewlett-Packard (HP) cartridge tape in a form readable by only the
HP-9825A. Further analysis, plotting and archiving, of the data has
normally been carried out on the CDC 3170 computer at.CCIW. Consequently,
it was necessary to develop a system for the transfer of da~a from HP
cartridge tape to 7-track (~11 ) magnetic tape.
One approach considered was to interface a 7-track tape drive
to the calculator resulting in a compact, easy-to-use transcription facility.
However, since 7-track tape drives were already installed in the in-house
Interdata computer system, it was decided, instead, to interface the
calculator to the computer and develop the appropriate software to effect
the transfer.
Hardware
A block diagram of the R&D computer system is shown in Figure 1.
The HP-9825A is interfaced to the Interdata Model 70 via a standard EIA ·
interface and data is transferred one character (8 bits ASCII) at a time
under program control. Data is listed on the line printer and written
to magnetic tape. The function of the buffered formatter is to control
the synchronous tape drives and to facilitate double buffered I/0.
1
Graphics Display
Keyboard and
Joystick
Control Console
Norpak Micro Video Processor
Printronix Hard Copy
Unit
HP-9825A Calculator
lnterdata Model 70
Current Meter Translation
Unit
Figure 1: R&D Division Minicomputer System
2
CAT Dual
Cartridge Tape Drive
Per tee 7-Track Tape
Drive
Buffered · Formatter
Per tee 7-Track Tape
Drive
Centronics Line
Printer
Software
Three computer programs were developed for this system
These are: TRANSFER, an HP-9825A program which reads profile data from
HP cartridge tapes and transfers it to the Interdata computer one
character (byte) at a time. RDPOOl, a program to read data from the
HP-9825A (one byte at a time, using the Operating System EIA driver),
convert it to standard ASCII, list it on the line printer, and write it
to 7-track magnetic tape in BCD format. RDP002, a utility program, dumps
profile data files from magnetic tape to the line printer. TRANSFER is
written in HPL while RDPOOl and RDP002 are written in Int~rdata Assembly
Language.
Figure 2 is a flowchart ot the system. The data file doc
umentation is in Appendix A; Program documentation and sample output may
be found in Appendix B; Appendix C contains operating instructions; program
listings are in Appendix D and Appendix E describes I/0 instructions on
the HP-9825A and summarizes the information about the HP interface registers.
3
HP Cartridge
0 0
Profile Data
DATA IS !RANSFERRED FROM HP-9825A TO INTERDATA MODEL 70 VIA EIA INTERFACE
7-Track Magnetic Tape
BEGIN
TRANSFER (HP-9825A)
RDPOOl (INTERDATA MODEL 70)
RDP002 (INTERDATA MODEL 70)
END
Figure 2: Data Transfer System Flowchart
4
SYSTEM FLOWCHART TRANSFER PROFILE DATA ON liP CARTRIDGE TO 7-TRACK MAGNETIC TAPE
LISTING OF
CONCLUSION
The HP-Interdata link has been successfully used to
transfer Arctic 1978 CTD profile data from HP cartridge to 7-track
magnetic tape, thereby allowing further processing on the CDC 3170.
With relatively few modifications, the link will be used for further
CTD data transfers and also for general communication between the
calculator and the computer.
5
6
REFERENCES
Deys, F.W. 1978. Arctic CTD Data Processing System. ~Technical Report Series, Ocean and Aquatic Sciences, Central Region, Department of Fisheries and Oceans, Burl:Lngton, Ontario.
Hewlett-Packard. HP-9825A Calculator, General and Extended I/0 Programming Manuals.
Hewlett-Packard. HP-98036A Serial I/0 Interface installation and Service Manual.
7
8
APPENDIX A: FILE DOCUMENTATION
9
10
INPUT FILE:
Each file on HP cartridge contains the header information and
the CTD data of one complete profile. Since there are no formatting capabili
ties when writing to cartridge, the data was written as stored in the
calculator (i.e. one parameter array at a time).
The format of the file is as follows:
Depth (m) 50 values
Temperature (oC) 50 values
Salinity (ppt) 50 values
Raw conductivity 50 values
Sigma-t 50 values
Header information 13 values
The header array contains the following information:
1) Station number;
2) Sequence number;
3) Consecutive number;
4) Julian day;
5) Year;
6) Hour (GMT);
7) Mi:nutes past the hour;
8) Degrees - latitude;
9) Minutes (1/lOO's) - latitude;
10) Degrees - longitude;
11) Minutes (1/lOO's) - longitude;
12) Sounded depth; and
13) Ice thickness.
11
Profile Data File:
Each profile constitutes one data file on 7-track magnetic
tape and successive profiles are separated by file marks. Each file consists
of a header record and a number of data records. Each data record contains
values for temperature, salinity, and sigma-t obtained at a given depth in
0~~15AR E11~3 S'v'C L PBLK7 l.JRITE HEA[)EF~ TO 1·1AG TAPE ~~t180R
~)(t5ER D3E(t LB R:l4~PBLK7+2
0182R 0062R C5E0- CLHI R14~ X·'0000 ...
(1~)~~1(1
(U366R 42:~(1 BTC :=< ... 3: ..... E~:E~·!.4 E:f;: IF TAPE l·JF.: I TE ERF~OR
OOECR ~~u)6AR E110 NE::<TR S\··c: L PBLKi READ DATA RECORD
010ER 0~36ER D3E0 LB F.:1.4, PBLK1.+2
~311.~3R
~3072R C5E0 CLHI R14~ X,. (1000 ... ~~U~1(1(1
0076R 4230 BTC X ... 3 ... ~EREX2 BR IF READ ERROR (t(tDCR
007AR 24E0 LIS R14~ X·'0 ... ~)(t7CR 40E0 STH R14~STATS ZERO X LATE STATUS
(108AR ~~t080R 41F0 BAL R1.5, ~<LDR TRANSLATE DATA RECORD
031AR (t084R ~31EER DC A<IBUFF) 0086R ~3284R DC A<:OBUFF) ~~U388R LBADR DS 2 ~~108AR STATS DS 2 STATUS OF OPEf;:AT I ON O~~t8CR 4::::E(t LH R1.4,LBADR PICK UP LAST B'T'TE ADC•F~ESS
~:308BR
0090R 40E0 STH R14,PBLK7+6 0186R
(n394R 26E1. AIS F~1.4, X ... 1 ... 0~396R 24DD LIS R1.3,X_..D ... 0098R D2DE STB R1.3,0(R1.4) STORE C. R. AT END OF BUFFEP
0000 ~3(t9CR 40E0 STH R1.4,PBLK2+6 STORE LAST BYTE ADDRESS
~31.1.CR (h3A(tR E110 S\•'C 1.,PBLK2 PRINT THE LINE
* 00F4R 2800 PBLK0 DC ~< .... 2800" CONSOLE l.JRI TE BLK 0~3F6R 00~30 DC X"(H300" ~30FE:R 00FCR DC A<TBUF1.) ~3~~1FAR 01.0DR DC A(TBUF1.+1.7) (10FCR 434F TBUF1. r}c C .... COt·H I NUE ? ..,. OR N ...
4E54 494E 5545 203F 2020 5920 4F52 204E
~31.0ER 4806 PBLK1. DC X·' 48~~16 ·' ~:EAD PARA1·1ETER BLK 01.:i0R (H)00 DC X·'00~30"'
01.1.2R 01.EER DC A<IBUFF) 01.:14R 027:1R DC A<IBUFF+:13:1) ~31.:16R 2807 PBLK2 DC X,..2807"' l.JRITE LINE PARI•1. BLK 0:1:18R 0000 . DC X"'0000"
33
PAGE 4 0:1:1fiR 02:3.:tR DC A<OBUFF) 0:1:1CR 03:07R oc A<OBUFF+:13:1) (1:1:1ER 2:=:~~1~~1 PBLK4 DC :~~ ... 2E:~30 ··· EF':ROR 1·1ESS. PAF.:I•1. BLK. (1:120R oo~:::1~:::1 DC X,. c.:u:::u:::n3 ·' 0:122R 0:126R DC A<EF~I14)
C.:11.24F~ (1:13:6F.: DC A ( ERI•14+1.6) 01.26R 5245 ERt14 DC C ... READ HEADER ERROR .··
4:144 2048 4541. 4445 5220 4552 524F 5220
01.38R 2800 PBLK5 DC ::-~ ... 2:=:00 ,.• ERROF': t·1ESS. PAF.:I1. 8LK 01.3AR 0000 DC X ··· €1000 ,. 01.3CR 01.40R DC A(ERt·15) 01.3EF': 01.55R (JC A< ERt15+21. > ~31.40R 5245 ERt·15 DC C ... READ DATA F':ECORD ERROR ...
41.44 ~~044
4:154 4:120 5245 434F 5244 2045 5252 4F52
01.56R 480~3 PBLK6 DC X..-4800 ... CONSOLE READ BLOCK 01.58R (1(100 DC X ... 0~300 ... 01.5AR 01.5ER DC A<TBUF2> 01.5CR 01.AFR DC A<TBUF2+81.) ~Z1:15ER TBUF2 DS 82 (1:180R 2C:02 PBLK7 DC x .. ·2:=:e2"' ~·JRI TE t·1AG TAPE RECORD BLK 01.82R ~3(100 DC X,. €11:"::100·' (11.84R 0284R DC A<OBUFF> 01.86R 031.9R DC A<OBUFF+1.49) 01.88R 2:::00 PBLK8 C•C X..-2800 ... PRINT ERROR 1·1ESS. (1:18AR (1(1(1(1 DC ::-:: ·' (UZ100..-01.BCR ~Z1:1C(tR DC A<ERt·18) 0:1BER ~3:1CFR DC A ( ERt·18+1.5) 01.C0F.: 51:"::152 ERt-18 DC C ... PRINT LINE ERROR ...
494E 5420 4C49 4E45 2045 5252 4F52
01.DOR 8802 PBLK9 DC ::-:: ,. 8802 ... ~·JRITE EOF ON TAPE BLK 0:1D2R (n300 DC X..-0€100/ ~31.D4R 2800 PBLK1.0 DC X/2800/ t··1AG TAPE ERROR 1·1ESS. ~3:1D6R ~3000 DC X/0000/ 01.D8R 0:1DCR DC A<ERt11.0)
34
PAGE r:-
·-· ~::H.L•AF<: 0:1E9R I)C A< ERI·1i~3+:13:) (1 :1. L• C F~ 4D4:1. ERt1:10 DC c--l·lAG TAPE EF$:Or;;:-·
4720 544:1. 5045 2045 5252 4F52
0:1EAF<: C002 PBU<i:l DC X,...C002" REl..JIND NAG TAPE 0:1ECR 0000 C•C X..-0000"
* 0:1.EER I BUFF [>S :1.50 ~3284R OBUFF DS :1.50
* * XLDR
* * ROUTINE TO TRANSLATE A DATA RECORD.
* €13:1.AR D€15C. XLDR STt·l R5~XLDRS SAVE 03B2F<:
03:1.ER C890 LHI F<:9~ X,. 003:0,. TO ADD TO NUI·lERIC (U)3:~3
(13:22R 24AA LIS R:l.e~ x···A-· TO TEST FOR I·~UI·lER I C ~3324R C850 LHI RS~ X,. 002E ... DEC. PT. CODE
002E 0328R 24DD LIS R:1.3~X,.D" c. R. CODE 032AR 2483 LIS R8~X"3,. DEC. PT. COUNTER 032CR 246A LIS R6~X"A" L. F. CODE 032ER 48EF LH R:1.4J0(R:1.5)
(10(10 0332R C870 LHI R7~:1.32
0084 0336R 0A7E AHR R7JR:1.4 <R7>=END ADDRESS OF It·~PU1
0338R 27E:1. SIS R:1.4JX":l." <R:14)=INPUT BUFFER AD DR. 033AR 48BF LH F<::l.:ll 2 ( F<::1.5)
* 0~38AR 480:1 PBLK0 DC X"'480:1"' t•1AG TAPE READ BLK ~308CR 0000 DC X"'0000"' 008ER 00F6R DC A<INBUF) 0090R 0:179R DC A<INBUF+:13:1) 0092R 2807 PBLK:1 DC X·'2807~ PRINT LINE BLOCK 0094R 0000 DC X ... 0(H30 ... (n396R ~3~:::1F6R DC fi( INBUF) ~:::1098R 0:179R DC A<INBUF+:13:1) 0~39AR 2800 PBLK2 DC X"'2800"' t·1AG TAPE ERROR 1•1ES5 BLK 009CR 0(100 DC X''(U300"' ~:::1(19ER 00A2R DC A<ERI'12) ~3(1A0R 0~3AFR DC A<ERI'12+:13) 0~3A2R 4D4:1 ERI•12 DC c··'I1AG TAPE ERROR"
4720 544:1. 5~345
2045 5252 4F52
~30B0R 2800 PBLK3 DC X"2800"' PRINTER ERROR t1ESS BLK 0~382R 0000 DC X"'0(100"' ~3084R 0088R DC A<ERt'13) 00B6R 00C4R DC A<ERI'13+12) 00B8R 5052 ERt'13 DC C"PRINTER ERROR"
494E 5445 5220
39
PAGE 3: 4552 524F 5220
0€1C6R 2800 PBLK4 [)C x···2s0~:::1··· t1ESS TO OPERfiTOR BU( 00C8R 0000 DC X''0000 ... 00CAR '.K1CER DC A<fo1E554) 00CCR 00DFR DC A< l•1ESS4+:l7) 00CER 434F t·1E554 DC C ... CONTINUE ? y OR N ...
4E54 494E 5545 2~33F
2~320
5920 4F52 204E
€1€1E0R 4800 PBLI<5 DC X..-48~30 ... READ CONSOLE BLK 00E2R 0000 DC x-·00~3£1 ... 0€1E4R 0£1FGR DC A<INBUF) 00E6R 0:l46R DC A<INBUF+80) ~30E8R c0~3:1 F'BLK6 DC ;x; ··· C€10:1 ··· RE~o.IIHD 1·1AG TAPE BLI< 0£1EAR (1(1(10 DC :=< ... €1(1(1(1 ,. (10ECR 2807 F'BLK7 DC ;-~ .. · 2::::a.::17 .. · FO~:I•1 FEED BLI< (n3EER 0(U)0 DC >~ ... 0000 ... 0(1F0R 0€1F4R DC A<F'BUFF) ~30F2R 00F5R DC A<PBUFF+1.) 00F4R 0C0D PBUFF DC X ... 0C0D ...
* 00F6R INBUF DS 1.32
* 01.7AR END
40
APPENDIX E: USE OF THE HP-98036A INTERFACE
41
GENERAL INFORMATION CONCERNING USE OF THE HP-98036A INTERFACE
1) Instructions:
The following is a summary of the HPL instructions which
perform I/O via the HP-98036A Serial Interface (ref. Hewlett-Packard).
Refer to Figure 3 for diagrams of the registers mentioned below. In the
following instructions "sc" refers to select code that the interface has
been given and "x" is the value that the appropriate register within
that interface is set to.
wtc sc,x
wtb sc,x
rdb sc,x
rds sc,x
wti o,sc
wti r,x
rdi(r) -+ A
2) Mode Word:
- writes x to the RSOUT register;
- writes x to the R4D Control Word if bit 0 of
RSOUT is equal to 1;
writes x to the R4C Mode Word if bit 6 of R4D is
equal to 1;
- writes x to the R4A Data Register if bit 0 of
RSOUT is equal to 0;
- reads R4E Status Word if bit 0 of RSOUT is equal
to 1 and stores the value in x;
reads R4B Data Input if bit 0 of RSOUT is equal
to 0 and stores the value in x;
- reads the RSIN register and stores the value in x;
- sets select code for wti and rdi instructions;
- sets register RrOUT to x (Note that r is the number
of the register to be changed);
- reads the contents of register RriN and stores the
value in A.
To communicate with the Interdata Model 70, the following
- conditions in the transmit mode word must be set:
- one stop bit is selected
- odd parit.y
- parity enable
- 8 bit characters
- 1/16 x bit rate clock
42
To achieve this, bits 0,1,2,3,4 and 6 of the R4C Mode Word register
must be set to 1 and the others must be 0. This is done by setting
the R4C register to OlOlllllz or 951o·
The R4C Mode Word can be changed in the following 2 ways:
1) By physically changing the Mode Word register in the interface.
Since this will result in a different power up default value, using
software to change the mode word is preferable.
2) By using software to change the Mode Word as follows:
i) set bit 0 of RSOUT to enable writing to the R4D
USART Control Word;
ii) set bit 6 of the R4D USART Control to permit
modification of the R4C Mode Word;
iii) set the R4C Mode Word to a new value (Note that
x is the new value, in decimal, of the Mode
Word).
wtc sc,l
wtb sc,64
wtb sc,x
Again, the "sc" refers to the select code of the interface.
To find the decimal value to be written to a register, perform these
steps:
1) determine which bits are to be set to 1 and which will be
set to 0;
2) the values of these bits determine a unique binary number with
bit 0 being the least significant bit and bit 7 the most signif-
icant; and
3) convert the binary number which was determined in step 2 to its
decimal equivalent. This decimal number can be written to the
appropriate register to set the bits which were decided on in
step 1).
For example, suppose it is determined that bits 0, 1, 3, and 6 are to be
set to 1 in a certain register. The binary number 01001011 represents
the register contents if these bits are set. Since 010010llz = 2 6 +2 3+2 1+2° = 75, a 75 should be written to the appropriate register to
set the bits.
43
3) Bit Rate:
The bit rate can be altered by setting a switch on the
interface to the appropriate position. The bit rate must match the bit
rate of the data communications device connected to the interface. Below
is a list of bit rates and corresponding switch positions.
SWITCH POSITION BIT RATE
1 9600
2 4800
3 2400
4 1800
5 1200
6 600
7 300
8 150
9 110
0 75
If the bit rate is greater than or equal to 4800, the 1/16
bit rate factor must be used (bits 1 and 0 of the R4C Mode Word are set
to 1 and 0, respectively). Otherwise the 1/64 bit rate factor must be
used (bits 1 and 0 of the R4C Mode Word are both set to 1).
44
R5 Registers AS OUT F~egister
BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
Interrupt Interrupt R4 Control
Interface Programmed Control2 Control! 0 • Data IN/ Interrupt Interface Receiver· Transmitted OUT Enable Reset Control Control 1 • Control/
Status
AS IN Register BIT 8 BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BITt
Interface Control Control Peripheral Interrupt f1 Interface Interface
f1 ~ Status 2 Status 1
Status 1 I.D.t I.D.1 Receiver Transmitter Enable Status Mode Mode
R4 Registers
R4C Mode Word BIT 7 I BIT 6 BIT 5 BIT 4 BIT 3 I BIT 2 BIT 1 1 BITO
Number of Stop Bits Characler Length Bit Rate Fictor 00 • not valid Parity Type Parity Enable 00 • 5bits 00 a not used 01- 1 bit 0 • Odd 0 • Disable 01 • 6bits 01 • 1 X bit rate clock 10- 1.5 bits 1 • Even 1 • Enable 10•7bits 10 • 1/16 X bit rate clock 11-2 bits 11 • 8 bits 11 = 1/64 X bit rate clock
R4D USART Control Word BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0
Clear To Send Data Set Ready
USART Pin 5 (Standard) Reset Status Pin 6 (Standard)
Always 0 Bits of USAAT Send Break Enable Data Data Terminal Enable Data Reset Request To
Status Word Character Receiver Ready Pin 20 Transmitter Send Pin 4
(Option 001) (Option 001)
R4E USART Status Word BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BITO
Request To Send Pin 4 (Standard)
Framing Overrun Parity Transmitter Receiver Transmitter Data Set Ready AlwaysO Pin 6 Error Error Error Empty Ready Ready