Service Manuals, User Guides, Schematic Diagrams or docs for : Keithley Misc 24893A(PCF-20)

<< Back | Home

Most service manuals and schematics are PDF files, so You will need Adobre Acrobat Reader to view : Acrobat Download Some of the files are DjVu format. Readers and resources available here : DjVu Resources
For the compressed files, most common are zip and rar. Please, extract files with Your favorite compression software ( WinZip, WinRAR ... ) before viewing. If a document has multiple parts, You should download all, before extracting.
Good luck. Repair on Your own risk. Make sure You know what You are doing.




Image preview - the first page of the document
24893A(PCF-20)


>> Download 24893A(PCF-20) documenatation <<

Text preview - extract from the document
PCF-20




         Keithley MetraByte   Corporation
*****
The

PCF-20
Guide to Using
PASCAL, C, & FORTRAN
Callable Driver Software
for the

DAS-20




Revision A, - 1987
Copyright   @ Kelthley MetraByte   Corp. 1987
Part Number: 24893




KEITHLEYMETRABYTECORPORATION

440 MYLES STANDISH BLVD., Taunton, MA 02780
TEL. f&8/880-3000. FAX 5W880-0179


                                            ...
                                          - 111 -
Warranty Information
  All products manufactured by Keithley MetraByte are warranted against defective materials
  and worksmanship for a period of one year from the date of delivery to the original
  purchaser, Any product that is found to be defective within the warranty period will. at the
  option of Keithley MetraByte. be repaired or replaced. This warranty does not apply to
  products damaged by improper use.



Warning

                  Keithley MetraByte assumes no liability for damages
               consequent to the use of this product. This product is not
                designed with components of a level of reliability suitable
                      for use in life support or critical applications.




Disclaimer
  Information furnished by Keithley MetraByte is believed to be accurate and reliable.
  However, the Keithley MetraByte Corporation assumes no responsibility for the use of such
  information nor for any infringements of patents or other rights of third parties that may
  result from its use. No license is granted by implication or otherwise under any patent
  rights of Keithley MetraByte Corporation.



Notes
     Keithley MetraByte/Asyst/DAC      is also referred to here-in as Keithley MefraByte.

     BasicTM a trademark of Dartmouth College.
            is

     IBM@ is a registered trademark of International Business Machines Corporation.

     PC, XT, AT, PS/2, and Micro Channel Architecture@ (MCA) are trademarks of
     International Business Machines Corporation.

     Microsoft@ is a registered trademark of Microsoft Corporation.

     Turbo C@ is a registered trademark of Borland International.




                                             - iv -
                                    Table of Contents



Section     1 INTRODUCTION                                                                                 2
     1.1   General Description:       ........................................                             2
     1.2   Using the PCF-20 ...........................................                                    2
     1.3   DAS-20Modes       ............................................                                  2
           1.3.1 Listing of Available Modes ..............................                                 2'
           1.3.2 Mode Parameter Descriptions .............................                                 4
               1.3.2.1 Mode 0: Initialize the DAS-20                                                       4
               1.3.2.2 MODE 1: Load the A/D control Queue
               1.3.2.3 MODE 2: View the current queue                                                      7"
               1.3.2.4 MODE 3: Perform a Single A/D Conversion                                             7
               1.3.2.5 MODE 4: Perform N conversions (program control)                                     9
               1.3.2.6 MODE 5: Multiple A/D conversions-- Interrupt driven                                11
               1.3.2.7 MODE 6: Multiple A/D samples with DMA data transfer.                               13
               1.3.2.8 MODE 7: Command a Single D/A conversion                                            16
               1.3.2.9 MODE 8: Load Memory Segment for D/A conversion.                                    16
               1.3.2.10 MODE 9: Multiple Interrupt D/A conversions
               1.3.2.11 MODE 10: DMA driven D/A conversions                                               :;:
               1.3.2.12 MODE 11: Cancel DMA or Interrupt                                                  19
               1.3.2.13 MODE 12: Determine Status of interrupt/DMA                                        20
               1.3.2.14 MODE 13: Transfer data from memory to array
               1.3.2.15 MODE 14: Read the Digital inputs                                                  2
               1.3.2.16 MODE 15: Write to the Digital outputs.
               1.3.2.17 MODE 16: Analog trigger                                                           ;i
               1.3.2.18 MODE 17: Initialize Timer - Reset timer.                                          25
               1.3.2.19 MODE 18: Set Timer Master Mode Register                                           25
               1.3.2.20 MODE 19: Set Counter `N' Mode Register                                            26
               1.3.2.21 MODE 20: Set Multiple Counter Control Registers                                   28
               1.3.2.22 MODE 21: Set Counter `N' Load Register                                            28
               1.3.2.23 MODE 22: Read Counter `N' Hold Register                                           29
               1.3.2.24 MODE 23: Measure Frequency
               1.3.2.25 MODE 24: Set A/D pacer clock                                                      i;
               1.3.2.26 MODE 25: SET D/A pacer clock
               1.3.2.27 MODE 26: Stop A/D and D/A pacer clocks                                            ;`:
               1.3.2.28 MODE 27: Perform "N" scans of a block of channels                                 31
               1.3.2.29 MODE 28: Using the EXP-20                                                         33
               1.3.2.30 MODE 29: Set SSH-4 Flag                                                           36
           1.3.3 SUMMARY OF ERROR CODES . .,. . . . . . . . . . . . . . . . . . . . . .                   36

Section 2 DAS-20 PASCAL INTERFACE                                                                          39
    2.1 Example Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Section 3 DAS-20 C LANGUAGE INTERFACE                                                                      42
    3.1 Example Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Section 4 DAS-20 FORTRAN INTERFACE                                                                        45
    4.1 Example Program.. . . . . . . . . . . . . . . . . . . . . . , . . . . . . . . . . . . . . . . . . 46
                                        Section 1

                                  INTRODUCTION

1 .I General Description:

          The PCF-20 software package has been developed for Pascal, C, and Fortran
programmers    wishing to write data acquisition and control software for MetraByte DAS-20,
EXP-20 and SSH-4 boards. The PCF-20 is supplied on three disks (one for each language). In
addition to the assembly level driver, each disk contains a number of example programs, and a
simple graphics package that may prove helpful in writing display routines.


1.2 Using the PCF-20

           Each of the three software drivers supplied in the PCF package are virtually identical
to the standard BASIC driver rouitines provided with the DAS-20. The only difference is in the
way data and computer control are passed back and forth between the user program and the
assembly driver. Different functions of the assembly driver are selected by selecting a Mode.
Currently there are 30 modes (numbered 0 to 29), and each performs a specific function. Rather
than write four redundant descriptions of each mode for each language, this manual refers to the
DAS-20 manual, and specifically Chapter four on programming to describe the funcion of each
of the modes. This manual simply describes the syntax and conventions required to excecute one
of the 30 modes from Pascal, C, and Fortran. However, as a quick reference guied the modes,
and a brief description of the applicable excecution parameters are listed in the next section.


1.3 DAS-20 Modes

1.3.1 Listing of Available Modes

The following   DAS-20 functions are supported      by the DAS20.BIN driver:


MODE    DESCRIPTION~OF~FUNCTION
 0      Initialize the DAS-20, (Base Address, Interrupt
        level, and DMA level).

 1      Load the Channel/Gain   queuing RAM

 2      View the current Channel/Gain   Queuing RAM


                                              -2-
3     Perform a single A/D conversion        and load the
      data into a BASICA variable

4     Perform an "N" conversion scan and store the
      data in a BASICA array, Sample rate is set by
      pacer clock or external trigger. and maximum
      sample rate is about 4000 samples per second.

5     Perform an "N" conversion scan, and store the
      data in memory under interrupt control. Maximum
      conversion rate = 4000 samples/set.

6     Perform an "N" conversion scan under DMA
      control. Conversion rate is set by on board
      pacer clock or by external trigger, Maximum
      conversion rate = 100,000 Khz

7     Command    a single D/A conversion

8    : Load memory with D/A conversion        data for Modes 9
       and 10.


9     Perform "N" D/A conversions       under interrupt
      control.

10    Perform "N" D/A conversions, DMA data transfers.
      Conversion timing from pacer clock or external
      trigger. Up to 260,000 Conversions per second.

11    Cancel DMA or interrupt driven               operations.
      Return control completely to program software.

12    Return current status of DMA or Interrupt
      driven data transfers.

13    Transfer data from memory into BASICA arrays.
      This mode is necessary since interrupt and DMA
      driven conversions write and read directly from
      memory     locations without regard            to          BASICA
      variables.

14    Read the 8 digital input Bits

15    Write to the 8 digital output bits.

16    Set Analog trigger mode. This mode can cause
      any other mode to wait until a certain specified
      input condition is met before proceeding.

17    Initialize the Counter/Timer    chip

18    Set the 95 13 counter's master mode register

19    Set counter "N" mode register


                                                -3-
 20     Set Multiple counter control register

 21     Set Counter "N" load register

 22     Read counter "N" hold register

 23     Measure Frequency     with counter timer

 24     Set D/A pacer clock

 25     Set A/D pacer clock

 26     Stop A/D & D/A pacer clocks

 27     Perform "N" scans of a block of analog input
        channels

 28     Sample Data from EXP-20 board

 29     Set Flag for using SSH-4 accesory board



1.3.2 Mode Parameter Descriptions

       The following section provides a much more detailed description of the functions and uses
of each of these modes. Arguments marked with `->' are values passed to the driver. Those
marked with `<-' are return values. Any arguments which are not specified, or are marked with
the value `X' are don't care arguments.



1.3.2.1 Mode 0: Initialize the DAS-20

Mode 0 sets the DAS-20's Base Address, DMA channel, and interrupt level. Mode 0 also resets
the A/D and sample control queue, sets the input gain to 1X, Bipolar, selects input channel
0, and resets the timer (see initialize timer function). A mode 0 initialization call must be
performed before any other "calls" are made to the DAS-20 driver. Trying to execute any other
call before executing a Mode 0 call will generate FLAG% =l, Driver not initialized error. An
example of using Mode 0 is shown in example program EXO.BAS which has been included on
the DAS-20 software disk.


On entry the following parameters   should be assigned:
         MD% -> 0                                 `Mode 0

        DIO%(O) -> BASE ADDRESS                      `usually &H300

        DIO%( 1) -> Interrupt Level                  `2 through 7

        DI0%(2)   -> DMA channel                     `1 or3

        FLAG% <-      Error checking flag, the value
                      before the call does not matter



                                                   -4-
The following error codes apply to mode O:-

          FLAG% = 0             (no error, o.k.)
               =- 1             (mode number out of range, 29)
               =                (base address out of range 412 or >1008)
               =:.              (interrupt level <2 or >7)
               =3               (DMA level not 1 or 3)
               = -3             (Board not present, I/O address wrong)

Error #l will occur if you have specified an I/O address that is less than 512 (Hex 200) or
greater than 1008 (Hex 3FO). I/O addresses below Hex 200 are used internally by devices
on the IBM P.C. system board and would always cause an address conflict and I/O addresses
above     Hex 3FF are not decoded on the IBM P.C. Error #2 will occur if you have
specified a non-valid interrupt    level. The available levels on the P.C. expansion bus
correspond to 2 thru 7. Certain of these levels may be in use by other peripheral devices
(especially level 6 used by floppy disk drive). A,list of the standard IBM interrupt assignments
is:-

  Level   2    -    Reserved (but not used) by Color Graphics adapter
  Level   3    -    Serial I/O - used if COM2: installed.
  Level   4    -    Serial I/O - used if COMl: installed.
  Level   5    -    Printer - may be used by LPT2: if installed.
  Level   6    -    Always in use by disk drives
  Level   7    -    Printer - may be used by LPTl: if installed.

If you do not have a     particular device installed, it is safe to assume that that level is available
for use by DAS-20.       The lower the level number, the higher the interrupt priority. Note that
the interrupt will not    be enabled    unless    you enter a mode which requires interrupts for
operation. If you are    not going to make use of interrupts any level can be chosen e.g. DIO%( 1)
= 2.


Error #3 is obtained if you specify a DMA level other than 1 or 3. There are 4 DMA levels
available on the IBM P.C. (see Appendix E of the DAS-20 Manual), the highest priority is
internally used for dynamic memory refresh and is not accessible to the user. The other
levels 1 thru 3 are available on the expansion bus, but level 2 is always used by the floppy disk
drive(s) and cannot be shared. In hard disk (XT) computers, level 3 may be used by the hard
disk, but depending on the design of the disk controller hardware and fixed disk BIOS, may in
some cases be available. To determine whether your computer's          hard disk uses level 3, run
LEV3.EXE from DOS. In any case level 1 is usually available so if level 3 is used by the hard
disk set DI0%(2) = 1. In floppy disk only machines DI0%(2) can be 1 or 3. Also, note that
DMA requests and the 8237 controller are not enabled until you enter modes 6 or 10. If you are
not using modes 6 or 10, it is irrelevant whether you set DI0%(2) = 1 or 3.

        Mode 0 performs several other initializing   functions.   The Queing RAM sequncer is
cleared. The DAS-20 control and timer counter enable registers are cleared, disabling all
interrupt,DMA     and external trigger functions.  Mode 0 also performs a simple read/write test
as a check on the function and presence of the DAS-20 hardware. If you obtain error -2, it is
either indicative of a hardware fault in the DAS-20 or more commonly       a discrepancy between
the base address specified in DIO%(O) and the actual switch setting on the board.




                                                   -5-
1.3.2.2 MODE 1: Load the A/D control Queue
Mode 1 allows the channel/gain queue          to be loaded one step at a time. All Analog input   modes
except for Mode 3will get the channel        number and input range information from the AfD      queue.
The Queue is a 2048 Byte RAM that            is used to control the analog input multiplexor      (which
selects the input channel sampled)           and the input instrumentation    amplifier (which    selects
the input range).

The Queue is loaded using the standard DAS-20              Call in the following format:

      MD%->       1

      DIO%(O) -> Channel number (0 to 7 differential
                  or 0 to 15 single ended.

      DIO%( 1)    -7   Gain/input range

      DI0%(2)     -7   Command #

      FLAG%      c- Error codes


DIO%( 1) Instrument      Amplifier Gains and Ranges

Input Range            Gain      Urn/Bipolar               DIO%( 1)

0 to +lOV              Xl         Unipolar
+/- 1ov                x.5        Bipolar
0 to +lOV              Xl         Unipolar
+/- 5v                 Xl         Bipolar
0 to +lV               x10        Unipolar
+/- .5v                x10        Bipolar
0 to +lOOmV            Xl00       Unipolar
+/- 50mV               x100       Bipolar



DI0%(2): Command #
     Where Command # is 0, 1 or 2.                           The available
     commands are described below:

              0 = normal queue entry
              1 = last entry, add EOQ flag
              2 = first entry, initialize the counters

 FLAG%

         FLAG% = 0              (no error, o.k.)
              =- 1              (mode number out of range,  4 (mode number)

    DIO%(O)    -7   Number of conversions required (Word count).
                     Range 1 to N where N-l c= array dimension

    DIO%( 1)   -7   --array pointer
                      Conversions may be loaded starting at the
                      M'th. position in an array or at the start
                      if M = 0.

         DI0%(2)     - Trigger source. There are 3 possible:-




                                                     -9-
      DI0%(2)      = 0 : External            trigger        input.
                            Conversions          take place on
                            positive transitions on the
                            EXT TRIG input and continue
                            until      the word count              *
                            reached.        !WARNING! - ex?
                            from the routine cannot take
                            place until pulses equal
                            word       count         have      be:
                            supplied.

      DI0%(2)      = 1 : Programmable interval timer
                            with external gating:            The
                            sample rate is set via Mode
                            24.      EXT TRIG should be held
                            low until you want to         start
                            conversions. Conversions will
                            begin as soon as EXT TRIG
                            goes high and continue until
                            EXT TRIG is brought              low
                            again, or the word count is
                            reached.

      DI0%(2)      = 2 : Programmable     interval timer
                            without external gating. The
                            sampling mode is set via Mode
                            24.     Sampling begins (based
                            on Mode 24 sampling rate)
                            immediately upon excecuting
                            the Mode 4 call.


DI0%(3)     :    Data from UNIpolar or Bipolar inputs.

      DI0%(3)      = 0 : Unipolar data

      DI0%(3)      = 1 : Bipolar data

      Since unipolar (o-4095) and Bipolar (-2048
      to +2047) data is in different formats it is
      necessary to tell the transfer routine which
      type of data is being used.                For channel
      scans      which include both unipolar                and
      Bipolar either format can be selected then
      scaled to the correct form.                The scaling
      conventions are listed below:

          Subtract 4096 from Bipolar data transferred
          in Unipolar mode when Value 7 2047.

          Add 4096 to Unipolar data transferred       in
          Bipolar Mode when value < 0.




                                           - lo-
The following   error codes apply to mode 4:-

      FLAG% = 0              (no error, o.k.)
           = -2              (driver not initialized)
           = -1              (mode number out of range, 4095)




1.3.2.9 MODE 8: Load Memory Segment for D/A conversion.

       Mode    8 has been developed to allow the user to load a segment of memory in preparation
for writing   the data out to the DAS-20 D/A converters. Each conversion requires two bytes
of memory     to be stored. This allows up to 32,768 conversions         (single D/A), or 16,384
conversions    (both D/A's) to be loaded into a 64 KiloByte page of memory.
Arguments:

         MD%-7        8

         DIO%(O) ->           Number of Data words     (conversions)
                              to transfer.

         DIO%(l)      -7      Memory     Segment Address for raw data




                                                    - 16-
        DI0%(2)    -7      Starting offset for entering data
                           into the raw data buffer. DI0%(2)
                           will usually be 0, and the first
                           data word will be written into the
                           first buffer location.          However, in
                           some instances, when data is being
                           taken from more than one array, it
                           is necessary to load one array into
                           memory,        then load another array
                           immediately following the first.

        DI0%(3)    ->      Pointer to array containing
                           the data to write to the D/As.           The
                           pointer      may be found by executing
                           the following instructions:


        FLAG% <- Errors
          FLAG% = 0              (no error, o.k.)
               = 1               (driver not initialized)
               =-                (mode number out of range, ~0 or 729)
               =8;               (Word count zero or >32766)
               =81               (Segment address out of range)
                                 (Start offset out of range)
                   1;;           (Data pointer out of range)




1.3.2.10 MODE 9: Multiple Interrupt D/A conversions

      Mode 9 performs "N" D/A conversions based on interrupt control. Data is read directly
from memory (loaded by Mode 8) and written to the D/A converters. If Mode 8 was set to
load data for both D/A's than Mode 9 must also select two channel operation. However, if Mode
8 only loaded data for one D/A channel, Mode 9's channel select can select either D/A. The
update rate for D/A conversions can be set with Mode 25, or by an external signal.

The following   variables are defined by Mode 9:

         MD% -> 9

         DIO%(O)   -7    Number of conversions

         DIO%( 1) -7 Segment address of buffer




                                                 - 17-
        DI0%(2)     -> Trigger source:

            DI0%(2)      =0          External trigger.           A     D/A
                                     conversion is started on each
                                     rising edge of the DAC TRIG
                                     pin. (pin 29)

            DI0%(2)       = 1        Internal    Trigger w/ external
                                     gating.          A conversion      is
                                     initiated    based on the clock
                                     rate set    in Mode 25, and
                                     gated by    the EXT GATE pin.

            DI0%(2)       =2         Internal       Trigger       without
                                     external           gating.           A
                                     conversion is initiated based
                                     on the Mode 25 clock rate.

       DI0%(3)     -7   Recycle flag
                         0 = restart on Nth conversion
                         X = terminate on X* cycle of
                              N conversions.

       DI0%(4)     -7   Channel select
                         0 = channel 0
                         1 = channel 1
                         2 = both channels


         FLAG% <- Error Codes

                  FLAG% = 0              (no error, o.k.)
                       = 1               (driver not initialized)
                           =.            (mode number out of range,  10

       DIO%(O) -> Number of conversions

       DIO%( 1) -> Segment address of buffer

       DI0%(2)   -> Trigger source:

           DI0%(2)   =0          External trigger. A D/A
                                 conversion is started on each
                                 rising edge of the DAC TRIG
                                 pin. (pin 29)

           DI0%(2)    = 1        Internal Trigger w/ external
                                 gating. A conversion            is
                                 initiated based on the clock
                                 rate set in Mode 25, and
                                 gated by the EXT GATE pin.

           DI0%(2)    =2         Internal Trigger without
                                 external gating. A
                                 conversion is initiated based
                                 on the Mode 25 clock rate.


      DI0%(3)    -> Recycle flag
                     0 = restart on Nth conversion
                     X = terminate on P cycle of
                          N conversions.

      DI0%(4)    -> Channel select
                     0 = channel 0
                     1 = channel 1
                     2 = both channels

       FLAG% c- Error Codes
            FLAG% = 0                 (no error, o.k.)
                  = 1                 (driver not initialized)
                  =-                  (mode number out of range, 20)
                  = lb0               (Interrupt already active)
                  = 101               (Word count zero or >32767)
                  = 102               (Buffer address out of range)
                  = 103               (Trigger source not 0, 1, or 2)
                  = 104               (Recycle flag out of range)
                  = 105               (D/A channel not 0,l or 2)




                                                - 19-
1.3.2.12 MODE 11: Cancel DMA or Interrupt
        Mode 11 causes an immediate disable of any rurl.ling interrupt or D.M.A. operation
initiated by modes 5,6,9 or 10. The operation will be abandoned at the time mode 11 executes.

On entry the following parameters    should be initialized:-


        MD%->        11

        DIO%(O) -> X (where X = any value)

        FLAG% <- Errors (if any)


The following   error codes apply to mode 11:


             FLAG% = 0            (no error, o.kJ
                  =- 1            (mode number out of range, ~0 or >29)



1.3.2.13 MODE 12: Determine Status of interrupt/DMA

      Mode      12 allows you to monitor the status of a background   operation initiated by modes
5, 6,9 or 10.

Arguments:

         MD% -> 12

         DIO%(O) c- operation type in progress
                     0 - none
                     l-DMA,
                     2 - interrupt,


         DIO%( 1) <- status of operation
                      0 - Done (finished)
                      1 - Active

         DI0%(2)     <- current word count
                         Number of conversions    so far


The following. error codes apply to mode 12:-

      FLAG% = 0           (no error)
           = -2           (driver not initialized)
           =- 1           (mode number out of range, ~0 or >27)




                                                  - 20 -
1.3.2.14 MODE 13: Transfer data from memory to array

      Mode 13 transfers data from any segment of memory to integer array variables. Data in
memory derived from modes 5, 6 and 27 is in packed form consisting a word (2 bytes) of A/D
data + channel number.


Note how mode 13 functions. The number of words (or conversions) that you wish to          transfer
to the data and channel arrays is set into DIO%(O). The segment of memory that you          wish to
transfer data from is set into DIO%(l).       Data can be transferred from the beginning    of this
segment (DI0%(2) = 0) or any other point. A/D data is transferred to a dimensioned          integer
array. The transfer will start at the pointer set into DI0%(3).


A/D data is shifted and also the MSB complimented if the DAS-20 is operating in bipolar mode.
In unipolar mode data ranges from 0 to 4095, in bipolar -2048 to +2047. The channel data is
masked out and ranges from 0 - 15.

Note that you must be careful about the transfer parameters.       In particular:-

          1: Do not transfer more words than an array will hold
              or overun the end of the array. No checking is
              performed to detect this condition which will
              corrupt BASIC workspace and cause strange effects.

          2: There is nothing to prevent you transferring
              garbage from a source segment that does not
              contain A/D data or from overrunning the end of
              A/D data. No checking is performed to detect this
              condition.

          3: Due to the reformatting of data that this mode
              performs, it is not a general purpose block move
              utility.


On entry the following parameters   should be assigned:-

             MD% = 13      (mode number)

             DIO%(O) -> Number of words to transfer (1 - 32767)
                         (Number of Scans if DI0%(5) > 0)

             DIO%( 1) -> Buffer segment in memory (0 - 65536)

             DI0%(2)   -> Starting conversion number (0 - 32767)
                           (Starting Scan # if DI0%(5) > 0)

             DI0%(3)   -> Array Pointer (data)

             DI0%(4)   -> Array Pointer (channel)
                           (set = 0 if no channel data required)

             DI0%(5)   -> Unipolar/Bipolar   Flag.


                                                 -2l-
                       = 0 (transfer unipolar data)
                       = 1 (transfer Bipolar data)

                         Since unipolar (o-4095) and Bipolar (-
                         2048 to +2047) data is in different
                         formats it is necessary to tell the
                         transfer routine which type of data is
                         being used.        For channel scans which
                         include both unipolar and Bipolar either
                         format can be selected then scaled to the
                         correct form.         The scaling conventions
                         are listed below:

                         Subtract        4096    from    Bipolar       data
                         transferred in Unipolar mode for data > 2047.

                         Add 4096 to Unipolar data transferred   in
                         Bipolar Mode when value < 0.

            DI0%(6)    -> SSH-4,Flag. If the input data has been
                          acquired using the SSH-4, set DI0%(5) to
                          the number of channels in each scan.
                          This removes the Dummy first converseion
                          in each SSH-4 scan. Otherwise, DIO%(O) =
                          0.

            FLAG% = X (value does not matter)

The following   error codes apply to mode 13:-

      FLAG% = 0         (no error)
           = -2         (driver not initialized)
           =- 1         (mode number out of range, CO or >29)
           = 131      (word count, DIO%(O), zero or negative)
           = 132      (buffer Segment out of range)
           = 133      (start conversion number, DI0%(2), negative)
           = 134      (DI0%(3) out of range)
           = 135      (DIO%(4) out of range)
           = 136      (SSH-4 Flag out of range)



Once data acquisition has been set up as a constant background operation using the recycle
options of mode 5 or 6, a foreground program can be processing the data as it is acquired using
mode 13 to retrieve the data. This is excellent    for graphic and "digital oscilloscope"
applications.




                                                 - 22 -
1.X2.15 MODE 14: Read the Digital inputs

       Mode 14 allows you to read the state of digital inputs DIN0 through DIN7. Data returned
can range between 0 and 255 corresponding to all combinations of the 8 input bits.


On entry the following    parameters   should be initiaiized:-

             MD%=14

             DIO%(O thru 4) - value does not matter

             FLAG%=X               - value does not matter


On return:

                DIO%(O) contains input data (range 0 - 255)

                DIO%(l   thru 4) - unchanged

The following     error codes apply to mode 14:-

                FLAG% = 0         (no error, o.k.)
                     = -2         (driver not initialized)
                     = -1         (mode number out of range, 29)



1.3.2.16 MODE 15: Write to the Digital outputs.

      Mode 15 is used to write digital data to the 8 bit output port, DOUTO through DOUT7.
Output data is checked to be in the range 0 - 255 and if not an error exit (error # 151) occurs.

On entry the following    parameters   shouid be assigned:-

                     MD%=15

                     DIO%(O)            - output data (range O-255)

                     DIO%(l    thru 4) - value does not matter

The following     error codes apply to mode 15:-

        FLAG% = 0              (no error, o.k.)
             = -2              (driver not initialized)
             = -1              (mode number out of range, CO or >29)
             = 151             (output data ~0 or >255)




                                                    - 23 -
1.3.2.17 MODE 16: Analog trigger

       Mode 16 provides an analog trigger function similar to an oscilloscope     trigger. It is
sometimes useful to wait for a voltage to reach a certain level before starting to ga'&er data
and mode 16 provides this capability. Any of the analog input channels may be designated as a
trigger channel, and you may set the level and slope for triggering. The input range for the
analog triggering mode is always set at _+lOVolts, full scale.


The main use for mode 16 is in front of any of the other data acquisition modes as a gating or
wait loop until the specified analog trigger conditions are met. Since it is possible to get stuck
in the wait loop indefinitely if the trigger conditions are not fulfilled, you can also exit mode 16
by hitting any key which will return you to the calling program.

Parameters DIO%(O) thru DI0%(2) control the triggering and select the trigger channel number,
the trigger level and the trigger direction (slope). DIO%(O) specifies the trigger channel
number. It may be one of the scanned channels i.e. within the scan limits and carrying one of the
measured signals,     or a separate channel outside   the scanned      channels used only       for
triggering. The voltage level at which triggering occurs is set by DIO%(l)      in bits, ranges of
-2048 to +2047 bits corresponding     to bipolar input ranges. The direction of triggering or
slope is controlled by DI0%(2), for instance if DIO%(l) = 1024 on the +/-1Ov range the trigger
level will be +5.OOV and if DI0%(2) = 0 (positive slope) triggering will take place when the
signal exceeds +5.OOV, alternatively     if DI0%(2) = 1 (negative slope) triggering would take
place when the trigger signal becomes less than +5.0 Volt.

On entry the following variables should be initialized:-

           MD%=16

           DIO%(O) = Channel number (0- 15)

           DIO%( 1) = Trigger level
                      (-2048 to +2047 bits)

            DI0%(2)   = Slope (0 = positive,   1 = negative)

            DI0%(3)   thru DI0%(4)    - value irrelevant


The following   error codes apply to mode 16:

            FLAG% = 0         (no error, o.k.)
                 = -2         (driver not initialized)
                 =- 1         (mode number out of range, 24)
                 = 160        (Trigger aborted by Keyboard)
                 = 161        (trigger channel out of range)
                 = 162        (trigger data out of range
                                ~2048 or >2047
                    = 163       (slope data not 0 or 1)




                                                  - 24 -
1.3.2.18 MODE 17: Initialize Timer - Reset timer.
       Set counters 3, 4 & 5 to ADC time delays. The AMD9513 counter timer operation   are
discussed in much greater detail in chapter 7, and Appendix F of the DAS-20 manual.

Arguments:

      MD%    -> 17

      DIO%(O) -> Don't Care

      FLAG% <-       Errors (if any)

             =o     (No errors)
             = -1 (Mode # out of range)




1.3.2.19 MODE 18: Set Timer Master Mode Register

       Mode 18 sets the AMD9513 to a user specified configuration. Data bus width set to 8
bits, Data pointer    auto increment enabled, Binary division. The AMD9513 counter timer
operation are discussed in much greater detail in chapter 7, and Appendix F of the DAS-20
manual.


Arguments:

       MD% -> 18

      DIO%(O) -> Fout divider ratio (1 - 16)

      DIO%(l)   -> Fout source
                    O=Fl
                    1 = Source 1
                    2 = Source 2
                    3 = Source 3 I
                    4 = Source 4 I No Connection
                    5 = Source 5 I
                    6 = Gate 1
                    7 = Gate 2
                    8 = Gate 3 I
                    9 = Gate 4 I No Connection
                    10 = Gate 5 I
                    11 =Fl
                    12=F2
                    13=F3
                    14 = F4
                    15 =F5




                                               - 25 -
                   DI0%(2)   -> Compare 2 disable/enable       (O/l)

                   DI0%(3)   -> Compare 1 disable/enable       (O/l)

                   DI0%(4)   -> time of day mode control
                                 0 = TOD disabled
                                  1 = TOD Enabled /5 input
                                  2 = TOD Enabled /6 input
                                  3 = TOD Enabled /lO input


                   FLAG% <- Errors
                      =o      (No error)
                      = -2 (Driver not initialized)
                      = -1 (Mode out or range CO or >29)
                      = 18 1 (DIO%(O) out of range)
                      = 182 (DIO%( 1) out of range)
                      = 183 (DI0%(2) not 0 or 1)
                      = 184 (DI0%(3) not 0 or 1)
                      = 185 (DI0%(4) out of range 3)



1.3.2.20 MODE 19: Set Counter `N' Mode Register

       Mode 19 sets counter N to to user specified value. The AMD9513 counter timer operation
are discussed in much greater detail in chapter 7, and Appendix F of the DAS-20 manual.

Arguments:

             MD% -> 19

        DIO%(O) -> Counter Number (1 - 5)


        DIO%(l)    -> Gating Control (0 - 7)
                       0 = No gating
                       1 = Active high level TCN-1
                       2 = Active high level Gate N+l
                       3 = Active high level Gate N-l
                       4 = Active high level Gate N
                       5 = Active low level Gate N
                       6 = Active high edge Gate N
                       7 = Active low edge Gate N


        DIO%(2) -> Count Edge positive/negative        (O/l)




                                              - 26 -
DI0%(3)   -> Count Source Selection (0 - 15)
              O=TCN-1
              1 = Source 1
              2 = Source 2
              3 = Source 3 I
              4 = Source 4 I No Connection
              5=Source51
              6 = Gate 1
              7 = Gate 2
              8 = Gate 3 I
              9 = Gate 4 I No Connection
              10 = Gate 5 I
              11 =Fl
              12=F2
              13=F3
              14=F4
              15=F5


DI0%(4)   -> Disable/Enable   special gate (O/l)

DI0%(5)   -> Reload from Load/ReIoad         from Load
              or Hold (O/l)

DI0%(6)   -> Count once/Count    repetitively    (O/l)

DI0%(7)   -> Binary counVI3.C.D. count (O/l)

DI0%(8)   -> Count down/Count     up (O/l)

DI0%(9)   -> Output control (0 - 5, except 3)
             0 = Inactive
              1 = Active high terminal count pulse
              2 = Terminal count toggled
              3 = *** Illegal ***
             4 = Inactive, output high impedence
              5 = Active low terminal count pulse

FLAG% c- Errors


           FLAG% <- Errors
              =0     (No error)
              = -2 (Driver not initialized)
              = -1 (Mode out or range CO or >29)
              = 181 (DIO%(O) out of range cl or >5)
              = 182 (DIO%(l) out of range CO or >7)
              = 183 (DI0%(2) not 0,or 1)
              = 184 (DI0%(3) out of range 15)
              = 185 (DI0%(4) not 0 or 1)
              = 186 (DI0%(5) not 0 or 1)
              = 187 (DIO%(6) not 0 or 1)
              = 188 (DI0%(7) not 0 or 1)
              = 189 (DI0%(8) not 0 or 1)
              = 180 (DI0%(9) not 0, 1,2,4 or 5)


                                        - 27 -
1.3.2.21 MODE 20: Set Multiple Counter Control Registers

        - To user specified value. The AMD9513 counter timer operation are discussed in much
greater detail in chapter 7, and Appendix F of the DAS-20 manual.


Arguments:

             MD% -> 20

        DIO%(O) -> Command (1 - 6)
                    1 = Arm selected counter
                    2 = Load source to counter
                    3 = Load and arm counter
                    4 = Disarm and save counter
                    5 = Latch counter to hold register
                    6 = Disarm counter


        DIO%(l)    -> Select Counter 1 (O/l)

        DI0%(2)    -> Select Counter 2 (O/l)

        DI0%(3)    -> Select Counter 3 (O/l)

        DI0%(4)    -> Select Counter 4 (O/l)

        DI0%(5)    -> Select Counter 5 (O/l)

        FLAG% <- Errors (if any)
           =o     



◦ Jabse Service Manual Search 2024 ◦ Jabse PravopisonTap.bg ◦ Other service manual resources online : FixyaeServiceinfo