Download Model 10 Recorder USER MANUAL
Transcript
DATA RETRIEVAL
Although the software program supplied with the recorder is sufficient for most
applications, the User may wish to write their own software. The following Pascal procedure
will read the data stored in the recorder and write it to a disk file. Figure 12 illustrates the printer
port pin assignments. Note: the Analog Read line is not used with digital event recorders.
Parallel (Printer)
25 Pin D-Connector
Port
$378 (Bit 1) -------------------------------> Pin 3 ------->
(Bit ) --------------------------------> Pin 4 ------->
(Bit 3) -------------------------------> Pin 5 ------>
(Bit 4) -------------------------------> Pin 6 ------>
(Bit 5) -------------------------------> Pin 7 ------>
(Bit 7) -------------------------------> Pin 9 ------>
$379 (Bit 3) < ------------------------------ Pin 15 <---- GND
Pins 12,17,19-25
Recorder
Interface
Pull-up Resistor (Pos level)
Reset
(Pos level)
Serial Clock 2
(Pos edge)
Byte Load
(Pos level)
External Clock 1 (Pos edge)
Analog Read
(Pos level)
Serial Data out
GND
procedure READ_DATA_FROM_RECORDER;
var BYTE_COUNT, BINARY_COUNT: integer;
ADD: integer;
DATA, HOLD_DATA, BIT: byte;
DATA_FILE: text;
MAX_BYTES_TO_READ_FROM_RECORDER: integer;
begin
assign (DATA_FILE, 'DATA.IES'); { Open disk file }
rewrite (DATA_FILE);
ADD:= $378; { IBM printer port address }
port [ADD]:= -90; { 10100110 } { Initializes control line, and turns on the
Analog read line. }
delay (500);
{ Delays 500 ms to be sure the A/D is turned on. }
{ Reads the recorder and stores the data on a disk file. }
for BYTE_COUNT:= 0 to MAX_BYTES_TO_READ_FROM_RECORDER do
{ This loop reads the 8-bit words }
begin
{ of serial data.
}
port [ADD]:= -122; {10000110} { Enables memory }
port [ADD]:= -106; {10010110} { Loads data byte into }
port [ADD]:= -122; {10000110} { shift register. }
{ Disables memory - low current mode }
port [ADD]:= -90; {10100110}
DATA:= 0;
for BINARY_COUNT:= 1 to 8 do { Read the 8 bits of data }
{ This loop reads in 8 bits of data }