Tektronix DIO1A Digital Input/Output Module Rev. B User manual

DlOl A
Digital Input/Output Module
The DIOlA Digital Input Output Module provides 32 digital input or output channels at TTL levels. These channels are grouped into four &bit ports which can be individually programmed for input or output by soft­ware commands. The inputs are read directly by the host computer, and the outputs are latched. A power on reset circuit automatically configures all ports as inputs when the DIOlA module is powered up.
I/O connections are made to on-card quick disconnect screw terminal blocks, which accept 16-24 gauge wire stripped 3/W. In addition to the screw terminals, a mass termination connector for ribbon cable is provided
on the forward edge of the module.
CAUTION
Always turn off the data acquisition system power supply before installing or removing modules. To avoid the possibility of EMI ra­diation, never operate the system with the top cover open or removed.
module, and is functionally compatible with the older module. The older DIOl module has hardware switches for port configuration, while this function is performed through software for the DIOlA.
User Connections
User connections can be made to either the quick discon­nect terminal blocks at the top of the module, or to the mass termination connector located at one end of the board <through the supplied ribbon cable).
Table 1. User-configured Components
Component Screw Terminals
I/O Connector
t
Designation Jl-J14
J6
Function Input/Output
connections Quick Disconnect
Mass Termination for Ribbon Cable
The DIOlA module can be installed in any available slot in any Keithley/DAC Data Acquisition System. How­ever, for best performance any analog modules should be plugged into the lowest-numbered available slots, leaving the higher slots for digital modules. To install the module in a Model 500 or Model 556, remove the top cover and insert the module in any available slot with the component side of the module facing the power supply. To install the module in a Model570 or a Model 575, open the clamshell cover and insert the module into the option slot with the component side of the module facing up. See your data acquisition system manual for details on
opening the system and installing modules.
The DIOlA module can be identified by a Model 575,
5OOA, 5OOP, or 556 mainframe through the use of a Self-ID resistor which is mounted on the module. The value of this resistor is measured by the mainframe, and an JD code is generated from the value. The DIOlA module uses the same ID code 52 (4530 ohms) as the older DIOl
Documen~umbert 501-916-01 Rev. B Copyright’ 1989 Keithky Instruments, Inc., Cleveland, OH 44139 (216)248-0400
Screw terminals for making input/output connections are located on Jl, J2, J3, and J4 across the top edge of the module board. The channelnumbers (0 to31) are marked across the top edge of the board and are also shown in Figure 1.
Two connections each for the module ground (GND) and
+5
volts (+5) are also included on the top edge of the
board. The terminals are intended to be used with 16 to
24
gauge wire stripped 3/W’, and the terminal blocks
can be pulled off of the strip to facilitate connections. A typical input/output connection for the screw terminals is shown in Figure 2.
In situations requiring rapid connection and disconnec-
tion of signal lines, J6 can be used as an alternate means of
signal connection. Figure 3 shows the pin diagram for J6,
which is designed for use with a matching optional rib-
DIOl A-l
DIOIA
.Digital Input/Output Module
Mass Termination (J6) Screw Terminals (Jl J4)
I/
/
t
:
:
:
:
:
:
:
:
:
:
1
J6
Terminal Designations
Ground : Pins 1,36
+5 Volts :
PortA : PortB : PortC : PortD :
Figure 1. DIOl AModule Configurafion
Pins 2,35 Pins3-10 Pins11 -18 Pins19-26 Pins 27 - 34
A
Strain Relief
-6 ’ \
Digital Device
p+
::
::
::
. .
::
::
::
::
::
. .
::
ir
CAUTION : Non-isolated lTL
Figure 2. Typical DIOl A Input Connecf ions
Connections only
bon cable available from Keithley. When connecting sig­nals in this manner, the screw terminals should not be used.
If FMI radiation becomes a problem, use shielded cables for input and output connections. Connect the shield of the cable to the baseboard ground ONLY (or one of the GND terminals of the screw terminal connectors), and leave the other end of the shield unconnected. Do not use the shield of the cable as a signal carrying connection.
CAUTION DIOlA inputs arid outputs are non-isoIated, meaning that the circuit ground is connected to power ground. Any circuits connected to the module must also be referenced to power ground and must not be floating, or themod­ule may be damaged.
DIOl A-2
Pin 40
G:D CZ31
Ci30 c:29
Ci26 C:27
C:26 CZ25
C:24 0 i5v
Pin 39
Digital Input/Output Module
DIOlA
Input/Output Programming The 32 digital I/O channels of the DIOlA are grouped
into four ports of 8 channels each. Port A consists of chan­nels 0 to 7, Port B of channels 8 to 15, Port C of channels 16 to 23, and Port D of channels 24 to 31. The function of each port (and thus, the 8 channels associated with that port,) can be programmed individually for input or out­put through the use of software commands discussed be­low. The data written to or read from any port can be handled as a byte of information, in which eight channels are accessed at one time.
G:D C:23
CL A21
CZO CL9
Left edge of Module
pin* I PinI
CL8 cE17
C&6
G:D
C&4 C&3
Ck2 &I
C&O
Ci6
GiiD c:7
C:6 CZ5
CZ4
Ci2 c&
0
+5v
c&
ci9
0
+5v
CZ3
Matching 3M Ribbon Connector Part No. 3417
TTL Levels and Loading Considerations When configured for input, each channel of the DIOlA
represents one LS TT’L load to the external circuitry (2Oj,tA high, 0.4mA low). Logic low should be between 0 volts and 0.5 volts, and logic high should be between 2 volts and 5 volts (standard TTL levels).
When configured as outputs, each channel is capable of driving a maximum of 60 LS TI’L loads or 15 standard TTL loads
(maximum
output is 1.2 mA high and 24 mA low). Logic low will be in the range of 0 volts to 0.5 volts, and logic high will be between 2.7 volts and 5 volts.
Commands
The DIOlA uses the slot dependent CMDA and CMDB lines for setup and read/write operations. To select a port for a read or write operation, or to configure the ports for input or output, write to CMDA of the appropri­ate slot. In order to write or read data, write to or read
from CMDB for the appropriate slot. See Table 2 for a list of the slots and memory locations corresponding to the CMDA and CMDB lines. Figure 4 includes details on the DIOlA register usage. Memory locations indicated for these commands assume that the interface card in the host PC is set for a base address of CPF80. Any other set­ting of the base address will require the appropriate off­set of the supplied command locations.
Figure 3. Connecfor 16 Terminal Configurafion
DIOlA-3
DIOZA
Channels
Digiid
input/Output Module
Select
Gonfigure
and Port
Reg
setup CMDA (Write)
1
32
Input/Output
)
ReadMite Data
CMDB -
(Read/Write)
CMDA (write) Address - Select port, configure port
Must be issued in order to read or write data to a specified port.
b7 c
CMDB (read) Address - Digital input
Read data from specifkl port provided port is contigured as an input port.
CMDB (write) Address - Digital Output
Write data to specSed port provided port is configured as an ougxn port.
D5 D4 D3 D2 Dl DO
‘L
Beleot Port: O-Port 4 Ch O-7
Configure Port A: 1 -Output, O-Input Contigure Port B : 1 -Output, 0 - Input Configure Port C : I- Cutput, 0 - Input Configure Port D: i-Output, O-Input Enable Configuration Bits : 0 - Cff , 1 -On
1 -Port B. Ch 8-15 O-Port C, Ch16-23 3-Port D, Ch 24-31
Figure 4.
DIOlA-4
DIOIA Block Diagram and Command Register
Digital Input/Output Module
DIOlA
Table2. Locations for Slot Dependent
Commands
Select/Configure
Slot
1
2
Port (CMDA)
XXX80 XXX82
xxx84 XXX85 : 5 6 7 8 9
10
xXx=1
xxx86
xxx88 XXX89
xxx8A XXX8C
XXX8E
xxx90 x>o(91
xxx92 xxx93
;t 3 digits of IEUN addn
SELECT/CONFIGURE PORT
Location: Slot dependent CMDA write
The CODA write command is used to configure the ports for input or output, and to select the port that data is to be written to or read from. Refer to Figure 4 for the follow­ing discussion of the CMDA write data byte.
Digital I/O
OADB)
XXX81 XXX83
XXX87 xxx8B
xxx8D
xxx8F
s,
e.g.
“CFF
operations
NOTE
Upon power up, a random port will be se­lected; therefore, port selection should be ac­complished prior to read or write operation with CIvlDB.
NOTE
In
some
applications, you may find it useful to read back the levels previously pro­grammed to a DIOlA port configured for out­put. The value read back will be the last byte value successfully programmed to the port. This feature can be implemented using
BASIC’s PEEK command, or the equivalent memory read function of other languages. This WAS NOT a capability of the older DIOl module, and should not be attempted using
the older module.
DIGITAL INPUT/OUTPUT operations Location: Slot-dependent CMDB read or write A CMDB read is used to access data from a selected port
when that port is configured as an input port. A CMDB write is used to write data to the selected port when that port is configured as an output port. Note that each of the four ports can be individually programmed as either an input or output port, as discussed above.
Bits D3 through D7 are used to configure the ports for in­put or output. Bit D7must be set to a logic 1 to enable bits D3 through D6 to set their appropriate port to an input or an output port. When bit D7 is set to a logic 0, bits D3 through D6 are ignored. Bits D3 through D6 are used for PORT A through PORT D, respectively. Setting the ap­propriate bit to a logic 1 sets that port and
all associated
channels, to a digital output. Setting the appropriate bit
to a
logic 0
sets that
port, and
all associated channels, to a
digital input.
NOTE
Upon power up, all ports are set to be digital inputs.
Bits DO and Dl are used to select a particular port for in­put or output. A value from 0 to 3 will select port A through port D respectively. Port selection will always occur with a CMDA write to the DIOlA module, regard­less of the logic value of bit D7.
When a port is configured as an input port, the CMDB command location is read to access the status of the chan­nels associated with the port. Reading this location will return an 8 bit binary number, with the DO thru D7 lines representing the input lines for the selected port as indi­cated in Table 3. Since the inputs are not latched, the data will reflect the condition of the input channels at the in­stant that the read operation is performed. Note that the channels being read will depend on the port selected with the CMDA write command discussed above.
If you need to know the status of a particular channel, a logical AND instruction can be used to “mask oft?’ the un­necessary bit positions. The mask should contain zeros in the irrelevant bit positions and logic ones in the bit posi­tions representing the channels in question. The result of ANDingthemaskwiththeinputdatawillthenbean8bit binary number with each bit in an irrelevant position
equal to zero. The relevant channels will contain a 1 or a 0 depending on the status of the corresponding bit in the masked byte (a 1 if the object bit is high, a 0 if the object bit is low).
DIOlA-5
DIOZA
Dig&z2 Input/Output Module
When reading a DIOlA port with the BASIC PEEK com­mand, the returned value will be a decimal number be-
tween 0 and 255, depending on the status of the input channels. The status of a particular channel can be deter­mined by ANDing the returned value with the decimal weighting for that particular channel. sult is nonkero, the channel is high (logic 1).
EXAMPLE telmlin~
100 POKE CMDA,O 110 STATUS6 = PEEK(CMDB) AND 64
If the value returned in variable STATUS6 is non-zero, then channel 6 is high.
If a DIOl A port is configured as output, the value written to CMDB should be the equivalent of an 8 bit binarynum-
ber, with the status of the 8 bits (1 or 0) representing the status of the 8 channels of the selected port (high or low). The channels affected will depend on the selected port, as outied hi ‘I’abie 3. into the outputs and will remain unchanged until the port is written to again, or the port is configured as an in­put port. the POKE command will be a decimal value in the range from 0 to 255.
To change the status of one output channel while leaving the others unchanged, you must know the status of all of the channels. To accomplish this, a variable in the con­troiiing program could be assigned to the current status of the port in question (and updated every time the port is
written to), or the output on the port could be read di-
The status of channel 6 on port A is to be de-
- ­Data wr&en to a port will be
From BASIC, the value written to the port using
If the ANDed re-
iatched
rectly from the port using the readback feature (and stored in a variable). channels on the particular port is known, the value of the variable can be changed to correspond to the desired status of the selected port, and this new value written to the CMDB location.
In assembly language, this modification can be per­formed by using logical AND and logical OR instruc­tions. When turning a single channel on (high) the vari-
able representing the current port status should should be ORed with a number equivalent to an 8 bit binary value with zeros in the bit positions to remain unchanged and ones in the bit positions to be turned on. When turn­ing a channel off, the port status variable should be ANDed with an 8 bit binary value with ones in the bit po­sitions to remain unchanged and zeros in the positions to be turned off
From BASIC, the decimal weight of the bit to be turned on or off should be added to (off to on) or subtracted from (on to off) the decimal number that represents the current
er.d- r+-k.r
y”Lr 3LaLUJ. I‘“I GvuAyAc, I.” LULLI uLcul.LLtzL tt vu, IL W”l.uU
be necessary to subtract 8 from the decimal value repre­senting the port status. To turn on channel 8, it would be necessary to add 128 to the status.
It should be noted that the DIOlA module is command compatible with the older DIOl module, with the added programmability of the port configuration versus the switch selectability of the older module. Programs writ­ten for the older module can be modified for use with the new module by simply issuing a CMDA WRlTE to con­figure the ports before any input or output is accom­plished.
Cr.” rwrm,rle Lrr Lr.... #.a.,.......-1 A -CL :r-..#...lA
When the current status of all the
DIOlA-6
Table 3.
Bit Position Weighting Port A ChanNos. 7 6
Port B Chan Nos. 15 14 Port CChanNos. 23 22 Port D Chan Nos.
Digital I/O Channels and Bit Values
1 D7 1 D6
128 64
31 30
D5 D4 32 16 5 4
13 12 21 20
29 28
I
D2
D3 8 4 3 2
11
10
19 18
27
26
Loading...
+ 11 hidden pages