Measurement Digital232 User Manual

the smart approach to instrumentation
IOtech, Inc.
25971 Cannon Road Cleveland, OH 44146
Phone: (440) 439-4091 Fax: (440) 439-4093
E-mail: sales@iotech.com Internet: http://www.iotech.com
Digital232 User’s Manual
p/n DIGITAL232-901 Rev 2.0
Printed in the United States of America

Warranty Information

Your IOtech warranty is as stated on the product warranty card. You may contact IOtech by phone, fax machine, or e-mail in regard to warranty-related issues. Phone: (440) 439-4091, fax: (440) 439-4093, e-mail: sales@iotech.com
Limitation of Liability
IOtech, Inc. cannot be held liable for any damages resulting from the use or misuse of this product.
Copyright, Trademark, and Licensing Notice
All IOtech documentation, software, and hardware are copyright with all rights reserved. No part of this product may be copied, reproduced or transmitted by any mechanical, photographic, electronic, or other method without IOtech’s prior written consent. IOtech product names are trademarked; other product names, as applicable, are trademarks of their respective holders. All suppli ed IOtech software (including miscellaneous support files, drivers, and sample programs) may only be used on one installation. You may make archival backup copies.
FCC Statement
IOtech devices emit radio frequency energy in levels compliant with Federal Communications Commission rules (Part 15) for Class A devices. If necessary, refer to the FCC booklet How To Identify and Resolve Radio-TV Interference Problems (stock # 004-000-00345-4) which is available from the U.S. Government Printing Office, Washington, D.C. 20402.
CE Notice
Many IOtech products carry the CE marker indicating they comply with the safety and emissions standards of the European Community. As applicable, we ship these products with a Declaration of Conformity stating which specifications and operating conditions apply.

Warnings, Cautions, Notes, and Tips

Refer all service to qualified personnel. This caution symbol warns of possible personal injury or equipment damage under noted conditions. Follow all safety standards of professional practice and the recommendations in this manual. Using this equipment i n ways other than described in this manual can present serious safety hazards or cause equipment damage.
This ESD caution symbol urges proper handling of equipment or components sensitive to damage from electrostatic discharge. Proper handling guidelines include the use of grounded anti-static mats and wrist straps, ESD-protective bags and cartons, and related procedures.
Specifications and Calibration
Specifications are subject to change without notice. Significant changes will be addressed in an addendum or revision to the manual. As applicable, IOtech calibrates its hardware to published specifications. Periodic hardware calibration is not covered under the warranty and must be performed by qualified personnel as specified in this manual. Improper calibration procedures may void the warranty.
Quality Notice
IOtech has maintained ISO 9001 certification since 1996. Prior to shipment, we thoroughly test our products and review our documentation to assure the highest quality in all aspects. In a spirit of continuous improvement, IOtech welcomes your suggestions.

Table of Contents

Section1 INTRODUCTION Page
1.1 General Description 1.1
1.2 Available Accessories 1.2
1.3 Specifications 1.3
Section 2 GETTING STARTED Page
2.1 Inspection 2.1
2.2 Configuration 2.2
2.2.1 Serial Baud Rate Selection 2.3
2.2.2 Xon/Xoff Serial Control 2.5
2.2.3 Serial Word Length Selection 2.5
2.2.4 Serial Stop Bit Selection 2.6
2.2.5 Serial Terminator Selection 2.6
2.2.6 Serial Echo Selection 2.7
2.2.7 Serial Parity Selection 2.7
2.3 Digital I/O Ports 2.8
2.3.1 Logic Levels 2.8
2.3.2 Digital I/O Port Pinout 2.8
2.3.3 Control Lines 2.10
2.3.3.1 Clear 2.10
2.3.3.2 Data Strobe 2.10
2.3.3.3 External Data Ready 2.11
2.3.3.4 Inhibit 2.11
2.3.3.5 Trigger 2.12
2.3.3.6 Service Input 2.13
2.4 Installation 2.13
2.5 Errors 2.14
Table of Contents
Section 3 COMMAND DESCRIPTIONS Page
@ Reset 3.2 An Bit Set 3.3 Bn Bit Clear 3.4 Cn Configure 3.5 Dn…Z Data 3.6 Fn Format 3.7 Gn Output Select 3.12 Hn Handshake 3.13 In Invert 3.14 Mn Service Request (SRQ) 3.15 Pn Port 3.16 Qn Inhibit 3.17 Rn Data ready 3.18 Tn Test 3.19 Un Status 3.20 X Execute 3.24 Yn Terminator 3.25
Section 4 SERVICE INFORMATION Page
4.1 Factory Service 4.1
4.2 Digital232 Component Layout 4.2
4.3 Digital232 Parts List 4.3
Appendix A Digital232 Command Summary Appendix B ASCII Character Codes Appendix C IBM PC Interfacing
A.1 B.1 C.1
Section 1 Introduction
Introduction

1.1 General Description

The
Digital232
unit has 40 TTL level digital I/O lines, divided into five 8-bit ports. Each port is software programmable as input or output.
The
Digital232
trigger output signal can be asserted on a Trigger command. Edge-triggered inputs can generate a Service Request to the RS-232 host. Five data formats are software programmable, including hexadecimal, ASCII, binary, high speed binary and decimal. There are also individual bit set and bit clear commands.
A status mode enables the host to interrogate the programmed status of the
Digital232
RAM and ROM operation.
When data is requested, the ports, all output ports, or from a specific 8 bit port. When being programmed, the unit will input data and programming information from the host, and output the data to the selected I/O port.
at any time. A self-test is initiated at power-on which checks for proper
is a digital input and output interface to the RS-232 standard. The
has several features which give it versatile interface capability. A
Digital232
will output from all forty bits, all input
1.1
Section 1 Introduction

1.2 Available Accessories

Additonal accessories that can be ordered for the
CN-6-50 109-0920 CA-11
50 Pin solder tab edge connector. Instruction Manual 12 ft. RS-232 cable, compatible with IBM PCs or
Digital232
include...
similar computers.
CA-8-50
6 foot, 50 conductor ribbon cable with a card edge
connector on one end, the other end unterminated.
CA-8-50
1.2
Section 1 Introduction

1.3 Specifications DIGITAL I/O:

Configuration: Five 8 bit ports, programmable as inputs or outputs.
Also included are programmable handshake lines, data
latching capability, and trigger output. Logic Levels: Outputs will drive 2 TTL loads. Connector: I/O Port: One 50 pin card-edge. Mating connector
supplied.
SERIAL INTERFACE:
EIA RS-232C: AB, BA, BB, CA, CB Duplex: Full with switch selectable echo/no-echo Data Bits: 7 or 8 (switch selectable) Stop bits: 1 or 2 (switch selectable) Parity: Switch selectable on transmit for odd, even,
mark, space or disabled. No parity test on receive Baud Rates: 110, 135, 150, 300, 600, 1200, 1800, 2400, 3600,
4800, 7200, 9600, and 19200 (switch selectable) Terminator: Switch selectable CR, LF, CR-LF, or LF-CR Control: Supports Clear To Send (CTS), Request To Send
(RTS) and switch selectable XON/XOFF Serial I/O Buffers: 3500 Characters each Serial Connectors: Mates with a 25-Pin Sub-D male: DCE configured.
GENERAL:
Indicators: LEDs for Send, Receive, Test, Error, and Power Power: 105-125V or 210-250V,50, 60 Hz; 15 VA MA X. Environment: 0 to 50 deg C; 0 to 70% RH Dimensions: 188mm deep x 140mm wide x 68mm high. (7.39" x
5.5" x 2.68") Weight: 1.55 kg (3.6 lbs) Controls: Power switch, internal dip switch for RS-232
parameters
Supplied Accessories: I/O port connector, power supply and manual.
Specifications are subject to change without notice.
1.3
Section 2 Getting Started
GETTING STARTED

2.1 INSPECTION

The
Digital232
to shipment. When you receive the interface, carefully unpack all items from the shipping carton and check for any obvious signs of physical damage which may have occurred during shipment. Immediately report any such damage found to the shipping agent. Remember to retain all shipping materials in the event that shipment back to the factory becomes necessary.
Every

2.2 CONFIGURATION

interface. NOTE: Most selectable functions are read ONLY at power-on and should only be set prior to applying power to the interface. The following figures illustrate the factory default conditions which are:
Digital232
Two DIP switches internal to the
was carefully inspected, both mechanically and electrically, prior
is shipped with the following....
Digital232 109-0920 CN-6-50 TR-2 TR-2E
Digital I/O Interface
Instruction Manual 50 pin card edge connector 115 volt Power Supply or 220 volt Power Supply
Digital232
set the configuration of the
9600 Baud 8 Data Bits 2 Stop Bits No Parity Xon/Xoff Disabled Echo Disabled Serial Terminator = CR Only
2.1
Section 2 Getting Started
S1 Factory Default Settings
S2 Factory Default Settings
2.2
Section 2 Getting Started
Switch S1 is the 8-position dip switch close to the front of the unit. Switch S2 is near the rear power switch. To modify any of these defaults, follow this simple procedure:
Disconnect the power supply from the AC line and from the interface.
Disconnect any digital I/O or serial cables prior to disassembly.
WARNING
Never open the
Digital232
case while it is connected to the AC line. Failure to observe this warning may result in equipment failure, personal injury or death.
Remove the four screws located in each corner of the rear panel. Hold the case firmly and pull the rear panel outward, noting the slot location of the main circuit board. Modify those parameters which are appropriate for your installation and reassemble the unit. Slide the main circuit board into the previously noted slot and finish reassembly by tightening the four screws into the rear panel.
2.2.1 Serial Baud Rate Selection
S1-1 through S1-4 determine the serial baud rate. The factory default is 9600 baud. The baud rate may be selected from 110 to 19200. (Switch S1 is located near the front of the interface)
2.3
Section 2 Getting Started
S1 View for Serial Baud Rate Selection
2.4
Section 2 Getting Started

2.2.2 Xon/Xoff Serial Control Selection

Switch S1-5 is used to enable
Digital232
issues
when its serial input buffer is near full. When it is able to
Xoff
accept more information, it issues
Xon/Xoff
. The
Xon
serial control. When enabled, the
Digital232
transmit from the serial device it is communicating with.
When the
Xon/Xoff
set to +5 volts, and the
Digital232
default is
should be wired to the
Xon/Xoff
disabled.
S1 View for Xon/Xoff Serial Control
mode is enabled, the
input is ignored. However, the
CTS
+Vtest
to avoid any problems. The factory
output from the
RTS
also accepts
CTS
Xon/Xoff
on
Digital232
input to the
is

2.2.3 Serial Word Length Selection

S1-6 determines the number of bits per each serial character transmitted or received. The factory default is 8 data bits.
S1 View of Serial Word Length (Data Bits)
2.5
Section 2 Getting Started

2.2.4 Serial Stop Bit Selection

Switch SW1-8 determines the number of stop bits contained in each serial character transmitted and received. The factory default is 2 stop bits.
SW1 View for Serial Stop Bit Selection

2.2.5 Serial Terminator Selection

S2-3 and S2-4 select the serial terminators for the serial input and output. The factory default is
. (switch S2 is located near the rear power switch).
CR
S2 View for Serial Terminator
2.6
Section 2 Getting Started

2.2.6 Serial Echo Selection

Serial data sent to the
Digital232
will be echoed back to the serial host if S2-5
is set to the open position. Factory default is Echo Disabled.
S2 View for Echo

2.2.7 Serial Parity Selection

Serial Parity is selected with S2-6 through S2-8. The
Digital232
generates the selected parity during serial transmissions but it does not check parity on data received. The factory default is parity disabled.
S2 View for Serial Parity Selection

2.3 Digital Input/Output Ports

The
Digital232
has 40 data lines which can be programmed in groups of 8 as
2.7
Section 2 Getting Started
either input or output. At power on, all 40 bits are in the input mode. Each 8 bit group is one port, beginning with
Port 1
as the least significant 8 bits, and
Port 5
as
the most significant 8 bits.

2.3.1 Logic Levels

The data and handshake output lines will drive two TTL loads. In addition,
ports 3, 4, and 5 outputs are 5 Volt CMOS compatible. All input lines are less than
1.5 TTL loads. All inputs are protected against damage due to high static voltages. Normal precautions should be taken to limit the input voltages to -0.3 to +7.0 volts. All I/O lines are referenced to
COMMON
(Pin 50).
2.3.2 Digital I/O Port Pinout (rear view)
The following diagram illustrates the digital I/O edge connector as view from
the rear of the
Digital232
2.8
Section 2 Getting Started
Pin Description
1 thru 8
9 thru 16
17 thru 24
25 thru 32
33 thru 40
41
DATA PORT1
(Input or Output). Pin 1 is bit 1 (LSB), Pin 8 is bit 8 (MSB). Least Significant Port
DATA PORT2
(Input or Output). Pin 9 is bit 1 (LSB), Pin 16 is bit 8 (MSB).
DATA PORT3
(Input or Output). Pin 17 is bit 1 (LSB), Pin 24 is bit 8 (MSB).
DATA PORT4
(Input or Output). Pin 25 is bit 1 (LSB), Pin 32 is bit 8 (MSB).
DATA PORT5
(Input or Output). Pin 33 is bit 1 (LSB), Pin 40 is bit 8 (MSB). Most Significant Port
CLEAR
(Output). 42 43 44 45 46
DATA STROBE TRIGGER INHIBIT SERVICE INPUT EXTERNAL DATA READY [EDR]
47,48 Not used. 49 50
+5 Volts I/O COMMON.
(Output).
(Output).
(Output).
(Input).
(
Do not exceed 50 mA load
(Input).
).
2.9
Section 2 Getting Started

2.3.3 Control Lines

Five control lines enable handshaking of digital I/O data transfer to the
Digital232
and can also be independently activated with the
. They are automatically activated with the corresponding I/O activity
Handshake (Hn)
command.
2.3.3.1 Clear
The
Clear
(Pin 41)
output is pulse for approximately 50 microseconds at power-on, or upon receipt of the active high. The
Handshake
command
Invert
operations.
2.3.3.2 Data Strobe
TIMING DIAGRAM FOR CLEAR OUTPUT
(Pin 42)
RESET (@
) command. The
Clear
line is normally
command (I8) will program it active low. The
(H0)
can pulse the
Clear
line, independent of any I/O
The
Data Strobe
new data is output on the I/O port. The
output is pulse for approximately 50 microseconds after
Data Strobe
high but may be programmed active low by the
Handshake
command
can pulse the
(H1)
Data Strobe
I/O operations.
2.10
line is normally active
Invert
command (I4). The
line, independent of an
Section 2 Getting Started
TIMING DIAGRAM FOR STROBE OUTPUT
2.3.3.3 External Data Ready [EDR]
The
External Data Ready [EDR
used to latch input data. It is used in conjunction with the command (R1). The
signal must be at least 1 microsecond wide and must
EDR
have a rise and fall time of less than one microsecond. The normally rising-edge sensitive but can be programmed with the command (
) to be falling-edge sensitive. Refer to the following diagram for
I32
(Pin 46)
] line is an edge sensitive input which is
Data Ready
EDR
line is
Invert
timing relationships.
When using the
line transitions.
EDR
2.3.3.4 Inhibit
The
Inhibit
(Pin 44)
output is asserted while data on the selected I/O port is being
EDR
line the
Digital232
will only output data when the
read into the I/O port buffer. This line is normally active high but may be programmed active low by the
Invert
programmed independent of any I/O operations with the
command (I1). The
Inhibit
Inhibit
line can be
command
(Qn). Refer to the following diagram for timing relationships.
The
Inhibit
[Fn] modes.
line is asserted once for each data read operation for all format
2.11
Section 2 Getting Started
2.3.3.5 Trigger
The
Trigger
Handshake
TIMING DIAGRAM FOR EDR AND INHIBIT
(Pin 43)
output is pulse for approximately 50 microseconds after the
command (H2) is received. The trigger pulse is normally active
high, but can be made active low with the
Invert
command (I2).
TIMING DIAGRAM FOR TRIGGER OUTPUT
2.12
Section 2 Getting Started
2.3.3.6 Service
The
Service
Service Request (SRQ).
(Pin 45)
input is an edge sensitive input capable of generating a
It is enabled with the defaults to rising-edge sensitive. The program it to be falling-edge sensitive.

2.4 INSTALLATION

To begin operating the
Digital232,
jack on the interface.
Never install the power supply into the interface while it is connected to AC line power. Failure to observe this caution may result in damage to the
The power supply provided with the interface is intended for
INDOOR USE ONLY.
this warning could result in equipment failure, personal injury or death.
command (
Invert
SRQ
command (
) can be used to
I64
M1
plug the external power supply into the rear
CAUTION
Digital232.
WARNING
Failure to observe
) and
After installing the power supply connector into the interface, turn on the
Digital232
should light for approximately one second while the
by depressing the rear panel power switch. All the front panel LEDs
Digital232
performs an internal ROM and RAM self check. At the end of this self check all indicators should turn off except
POWER
If you obtain the above response then your
.
Digital232
is alive and well. If all LEDs remain on, then a ROM error has occurred. If all LEDs continue to flash (except the power LED), then a RAM error has occurred. Try cycling the power to the
Digital232
If the LEDs do not flash and the
to determine that the error is repeatable.
POWER
indicator does not remain lit, there may not be any power supplied to the interface. In this event, check to make sure the AC power is supplied to the power supply, and that the supply is properly installed
2.13
Section 2 Getting Started
into the unit. If the problem is unresolved, refer to the
Service Information
section
of this manual.
Connect a serial cable to the DB-25 connector on the rear of the
Digital232
Connect the other end of the cable to the serial host. Running a dumb terminal
program similar to that shown in Appendix C, type the following....
@ R0
Reset the
Digital232
Request data from the The
Digital232
should respond with '
Digital232
FFFFFFFFFF'

2.5 Errors

The
Digital232
has built-in error checking, to ensure that it has received valid commands and data, and to alert the user if an inappropriate situation has occurred. The front panel
Error
remain lit until the status command
LED will illuminate when an error condition occurs, and will
is received. The
U0
Digital232
will continue to operate after an error has occurred, but in the instance of an invalid command, the command will not be executed and must be re-sent.
.
The
Service Request
command
can be used to automatically send an SRQ
M4
message to the host whenever an error occurs. This is particularly helpful when first configuring the system using a 'dumb terminal' program, as described for the IBM PC in Appendix C. Refer to the
Status
command (U0) for more information on error
codes.
2.14
Section 3 Command Descriptions
COMMAND DESCRIPTIONS
Control of the detail. Examples are given for many of the commands using an IBM PC and the "dumb terminal" program described in Appendix C. The underlined portion of the example refers to text which is typed into the PC when the program is running. It is implied that each command is terminated by the ''RETURN' key on the PC in order to execute the command.
When the or
Execute
order:
Command Code
Reset @ (executed immediately) Invert I Configure C Format F Data D Bit Set A Bit Clear B Inhibit Q Handshake H Service Request M Status U Terminator Y Test T Data Ready R (executed last)
command, the accumulated commands are executed in the following
Digital232
Digital232
is implemented with 17 commands, described here in
receives multiple commands before receiving a terminator
3.1
Section 3 Command Descriptions
RESET @
The
Reset
not require an
Reset
practice to precede it with an
Example: X@ reset the
command is not confused with the argument of a previous command it is a good
@
command returns the
Execute
Reset the
command or terminator to be executed. To be sure that the
Digital232
Digital232
Digital232
Execute (X)
to its power-on conditions
to its power-on conditions. It does
command.
3.2
Section 3 Command Descriptions
BIT SET An
The
Bit Set
argument 'n'. Setting a bit may represent either a +5 volt or 0 volt output, depending on whether an condition), command string, an command.
The bit which is being set must have been configured as an output bit by the
Configure
Error.
The sent.
An
Example:
@ C5 A22 A23XA24
command to be valid, otherwise the
Strobe
command programs a logic one output to a bit described by the
Invert
Bit Set
and
command (
outputs +5 volts. If multiple bits are to be set within the same
Execute
Inhibit
Bit n (1 thru 40) is set to logic one
reset the configure all ports as output set bit 22 to a logic one set bits 23 and 24 to a logic one
command (X) must be included after every
output lines are not pulsed when the
Digital232
has been sent. If data is active high (default
I16)
Digital232
will generate a Conflict
Bit Set
command is
Bit Set
3.3
Section 3 Command Descriptions
BIT CLEAR Bn
The
Bit Clear
argument 'n'. Clearing a bit may represent either a 0 volt or +5 volt output, depending on whether an condition), then used in the same command string, an command.
The bit which is being cleared must have been defined as an output by the
Configure
Conflict Error.
The is sent.
Bn
Example:
command in order to be valid, otherwise the
Strobe
command will clear to a logic zero an output bit described by the
Invert
Bit Clear
and
command (
Inhibit
Bit n (1 thru 40) is cleared to a logic 0
outputs 0 volts. When multiple
output lines are not pulsed when the
) has been sent. If data is active high (default
I16
commands are
will generate a
Bit Clear
command
Execute
Bit Clear
command (X) must follow each
Digital232
@ C5 A7XA8XA9 B7 B8XB9
reset the configure all ports as output set bits 7, 8, and 9 to +5 volts clear bit 7 to zero volts clear bits 8 and 9 to zero volts
Digital232
3.4
Section 3 Command Descriptions
CONFIGURE Cn
Ports 1 thru 5 are configured as inputs or outputs with the Each port is eight bits wide. At power-on, all ports are initialized as inputs. The
Configure
programmed as outputs will be set to a logic zero after receiving the command. The actual output level is dependent on the
Cn
command is usually the first command to be sent after power on. All ports
Invert
Mode n (0 thru 5) defines which ports are input and output
Port 5
in in in in in
C0
in in in in out
C1
in in in out out
C2
in in out out out
C3 C4 C5
in = programmed as an input port out = programmed as an output port
4 3 2 1
in out out out out out out out out out
Configure
command (
command.
Configure
I16).
Example:
@ C1
reset the select port 1 as output, ports 2 thru 5 as inputs
Digital232
3.5
Section 3 Command Descriptions
DATA Dn....Z
The
Data
of bits which can be sent with the programmed as outputs. For formats F0 through F3, if the amount of data sent is less than the the number of bits programmed as outputs, the least-significant bits will contain the data sent and the most-significant bits will be cleared to logic zero. If a single port is selected with the command. The new data is output on the selected ports.
For formats F0 through F3, data sent by the controller is contained within a prefix (D) and a suffix (Z). In format F4, the five bytes immediately following the prefix (D) is interpreted as data and the suffix (Z) is not used. Refer to the Fn command for additional details.
Dn...Z
(note: in the F4 mode, the Z terminator is not allowed) Example:
command outputs up to 40 bits of data to the output ports. The number
command is limited by the number of bits
Data
command, only eight bits may sent with the
Port
Data Strobe
represents the data to be output, terminated by Z.
n...
output is pulse for approximately 50 microseconds after
Data
@ C5P1 D55Z R0
P0 D1234567890Z R0
reset the configure all ports as output, select port 1 send "55" to port 1 read data from port 1, display shows 55
select all ports
send data to all 40 bits
read data from the display shows 1234567890
Digital232
Digital232
,
3.6
Section 3 Command Descriptions
FORMAT Fn
The
Format
will be described. Five data formats are available and are described in detail in the following paragraphs.
When data is requested from the from all ports, unasserts the Gn and are appended to the output. After output the subsequent reads.
each character having a value from 0 thru 9 or A thru F. Each ASCII character describes 4 bits of data.
Pn
F0 Format- ASCII Hexadecimal
In the default
command determines the method by which input and output data
ASCII Hexadecimal (4 bits per character)
F0
ASCII Character (4 bits per character )
F1
ASCII Binary (1 bit per character)
F2
ASCII Decimal (8 bits per number)
F3 F4
commands. Leading zeros are not suppressed and the serial terminators
EDR (R1
F0
Binary (each byte represents 8 bits)
Digital232 (R0
Inhibit
format, the data is described in ASCII hexadecimal, with
and outputs the number of characters determined by
Digital232
) may also be used to capture data in these formats.
) it asserts
must be requested to perform
Inhibit
, reads the data
F0 Character Decimal
00 8 8 11 9 9 22 A 10 33 B 11 44 C 12 55 D 13 66 E 14 77 F 15
Equiv F0 Character Decimal Equiv
3.7
Section 3 Command Descriptions
Data received for output to the digital ports must be contained within a prefix (D) and a suffix (Z). If the amount of data sent is less than the number of bits programmed as outputs, the least-significant bits will contain the data sent and the most-significant bits will be cleared to logic zero. If the data sent is greater than the number of bits programmed for output or selected by the command, the
Digital232
command string. The
will generate a conflict error and ignore the entire
Data Strobe
output is pulse for approximately 50
Pn
microseconds after new data is output on the selected port(s).
Example:
@ C2G2 D4E6BZ R0
reset the
Digital232
configure ports 1 & 2 as output output hexadecimal '4E6B' to ports 1 & 2 read data from the
Digital232
display shows 4E6B
F1 Format - ASCII Character
In the F1 format, the data is coded and transmitted in ASCII Characters with the four least significant bits of each ASCII character representing four bits of data.
F1 Character Decimal
Equiv F1 Character Decimal Equiv 00 8 8 11 9 9 22 : 10 33 ; 11 44 < 12 55 = 13 66 > 14 77 ? 15
3.8
Section 3 Command Descriptions
Data received for output to the digital ports must be contained within a prefix (D) and a suffix (Z). If the amount of data sent is less than the number of bits programmed as outputs, the least-significant bits will contain the data sent and the most-significant bits will be cleared to logic zero. If the data sent is greater than the number of bits programmed for output or selected by the command, the
Digital232
command string. The
will generate a conflict error and ignore the entire
Data Strobe
output is pulse for approximately 50
Pn
microseconds after new data is output on the selected port(s).
Example:
F1 R0 D1??2Z R0
select ASCII mode read data from the send 1??2 to the
Digital232
read data from the
Digital232,
Digital232,
display shows 4>6;
display shows 1??2
F2 Format - ASCII Binary
In the F2 format, the each data bit is described with an ASCII 0 or 1. Each byte is formatted in two 4-bit multiples separated by semicolons.
F2 String Decimal
Equiv F2 String Decimal Equiv 0000;0000 0 0000;1001 9 0000;0001 1 0000;1010 10 0000;0010 2 0000;1011 11 0000;0011 3 0000;1100 12 0000;0100 4 0000;1101 13 0000;0101 5 0000;1110 14 0000;0110 6 0000;1111 15 0000;0111 7 1000;0001 129 0000;1000 8 1111;1111 255
3.9
Section 3 Command Descriptions
Data received for output to the digital ports must be contained within a
prefix (D) and a suffix (Z) and each 4-bit quantity must be separated by semicolons. Leading zeros are not required. If the amount of data sent is less than the number of bits programmed as outputs, the least-significant bits will contain the data sent and the most-significant bits will be cleared to logic zero. If the data sent is greater than the number of bits programmed for output or selected by the Pn command, the
Digital232
ignore the entire command string. The
will generate a conflict error and
Data Strobe
output is pulse for
approximately 50 microseconds after new data is output on the selected port(s).
Example:
F2 R0
select ASCII/binary mode read data from the
Digital232,
display shows
0001;1111;1111;0001
D1111;0;1010;0101Z R0
read data from the
Digital232
,
display shows 1111;0000;1010;0101
F3 Format - ASCII Decimal
In the
format, the data is described in decimal 8 bit multiples and
F3
transmitted in ASCII. Each decimal number (0 to 255) to be output must be separated by semicolons.
F3 Number Decimal
Equiv F3 Number Decimal Equiv 000 0 008 8 001 1 009 9 002 2 010 10 003 3 020 20 004 4 100 100 005 5 200 200 006 6 210 210 007 7 255 255
Data received for output to the digital ports must be contained within a
3.10
Section 3 Command Descriptions
prefix (D) and a suffix (Z). If the amount of data sent is less than the number of bits programmed as outputs, the least-significant bits will contain the data sent and the most-significant bits will be cleared to logic zero. If the data sent is greater than the number of bits programmed for output or selected by the command, the
Digital232
command string. The
will generate a conflict error and ignore the entire
Data Strobe
output is pulse for approximately 50
Pn
microseconds after new data is output on the selected port(s). Example:
F3 R0 D100;200Z R0
output 100 & 200
select decimal mode read data from the
Digital232,
to the
read data from the
Digital232,
display shows 240;165
Digital232
display shows 100;200
F4 Format - Binary
In the F4 binary format the
Digital232
five bytes of data beginning with PORT5 without
expects the "D" prefix followed by
the "Z" suffix. If any digital I/O port is configured as an input, the data to that input port will be ignored and no error will be generated.
When data is requested from the
the data from all ports, unasserts
Digital232 (R0
Inhibit
and outputs 5 bytes beginning with
) it asserts
Inhibit
, reads
PORT5. Serial terminators are appended to the output. After output the
Digital232
must be requested to perform subsequent reads.
EDR (R1
) may
also be used to capture data in this format. Example:
F4 D!&Jg(Z
select the binary mode the binary representation of the characters
!&Jg(
will be output to the digital I/O port
3.11
Section 3 Command Descriptions
OUTPUT SELECT Gn
The
Output Select
transmitted when the sent is dependent on the Pn command. In any port mode other than selected by the
The default mode, mode causes only data from the ports programmed as inputs to be sent when data is requested. The G2 mode causes only data from ports programmed as outputs to be returned when data is requested.
If all ports are programmed as outputs with G1 selected and data is requested, nothing will be transmitted. Conversely, nothing will be transmitted with all ports programmed as inputs and G2 selected.
G0
G1
G2
Port
command determines the I/O port from which data will be
Digital232
command will be output from the
causes all 40 bits to be sent when data is requested. The
G0
Input and output Only input port data is output Only output port data is output
outputs data to its serial port. The amount of data
only the 8 bits
P0,
Digital232
port data is output
serial port.
G1
Example:
@ P0C1 G1 R0
G2 R0
reset the configure port 1 as input, ports 2-5 as output select only input ports when data is requested read data from the display shows 000000FF (data is dependent on what is connected to the input)
select output ports when data is requested read data from the display shows 00 (outputs default to 0)
Digital232
Digital232
Digital232
input ports
input ports
3.12
Section 3 Command Descriptions
HANDSHAKE Hn
The
Handshake
lines, independent of any other I/O operations. When the command, the respective handshake line is pulsed for approximately 50 microseconds. It returns to its steady-state condition after pulsing. The used to change the active state of any of the handshake lines.
H0
H1
H2
Example:
The
H1
The The The
control command enables software control of the handshake
receives an
command may be
Clear Strobe Trigger
Strobe
line is pulsed
line is pulsed
line is pulsed
Digital232
Invert
line is pulsed
Hn
3.13
Section 3 Command Descriptions
Invert In
The
Invert
lines. At power up all handshake and control lines are active high (logic one = + 5 volts). The handshake lines, and of the data lines. If multiple within the same string, then an each desired, and send one command with the sum of the desired commands. The commands are Ored together as received. To delete any one command, it is necessary to program the default mode I0, then re-program the desired commands.
Invert
I0
I1
I2
I4
I8
I16
I32
I64
command is used to change the polarity of the handshake and data
Invert
command. An alternative is to add the values of each
All control lines are active high, all data lines are high true. Inhibit Trigger Data Strobe Clear Data EDR Service
command can selectively change the polarity of each of the
commands are contained
Invert
output
output
output
is low
input
input
Execute
is active low
is active low
output
is active low
true
is falling-edge sensitive
is falling-edge sensitive
is active low
command (X) should be included between
Invert
command
Invert
Example:
@ I32XI64
note:
I96 performs the same function as above
reset the Digital 232 select EDR and Service falling-edge sensitive
input
as
3.14
Section 3 Command Descriptions
Service Request (SRQ) Mn
The
Service Request (SRQ
computer to one of several conditions described below. When a service request condition occurs, the string “ where “n” is a number from 1 through 7. The number “n” is determined by the conditions which have caused the service request, and is the sum of M1, M2, and M4.
Multiple commands are contained within the same command string, each should be followed by an of each commands. The
modes will remain enabled until the
SRQ
command is received.
M0
M1
M2
M4
command desired, and send one command with the sum of the desired
SRQ
default mode disables the SRQ function, preventing the Digital232 from
generating a Service Request
will generate a Service Request when the Service Input line makes a
transition. Refer to the Invert command (I64) description for programming the polarity of the Service input line. will generate a Service Request when the EDR input makes a transition. Refer to the Invert command (I32) description for programming the polarity of the EDR input line. will generate a Service Request when a programming error occurs. For example, attempting to select an ‘F6’ format when no ‘F6’ format exists will generate a Service Request when the M4 mode is selected.
conditions can be enabled simultaneously. If multiple
SRQ
Execute
commands are ORed together as received. The programmed
SRQ
) mode is used by the
SRQ n
” will automatically be sent to the host computer,
command (X). An alternative is to add the values
command is sent, or a
M0
Digital232
SRQ
to alert the host
SRQ
command
Reset (@)
Example:
@
M4 select
F7 send an invalid command.
reset the
ERROR LED
Digital232
on error
SRQ
should illuminate and “SRQ” is sent to the host
3.15
Section 3 Command Descriptions
Port Pn
The In the default mode (P0), all ports are selected. The P1 thru P5 commands select a specific eight bit port.
The Output Select (Gn) command is used to determine whether input or output port data is sent out the serial port when requested. Data in modes P1 through P5 is input or output in groups of eight bits.
P0
P1
P2
P3
P4
P5
Example:
@
P4 select port 4
command determines which port is selected for output and input data.
Port
All five ports are selected Port 1 is selected Port 2 is selected Port 3 is selected Port 4 is selected Port 5 is selected
reset the Digital 232
3.16
Section 3 Command Descriptions
INHIBIT Qn
The independent of any other I/O activities. The 'set' and 'clear' levels of the are determined by the
Q0
Q1
Example:
@ Q1
Inhibit
control command allows software control of the
Invert
Clear the Set the
reset the set the
Inhibit
Inhibit
Digital232
command.
Inhibit
line (place in the asserted state)
line
line (return to unasserted state)
Inhibit
Inhibit
line,
line
3.17
Section 3 Command Descriptions
Data Ready Rn
The transmitted out the serial port. When used in conjunction with the function, the host computer that new data is available.
In the default mode (R0) data is read and transmitted out the serial port when the Digital232 receives an R0 command. In R1 mode, data on an input port is latched on the transition of a signal applied to the same time, the latched data is transmitted out the Digital232’s serial port to the host computer. If EDR transitions again before the previous formatted for output and sent to an internal serial output queue, the Digital232 will generate an
The fall time of less than 1.0 microsecond. The but can be changed to falling-edge sensitive with the
In the R2 mode, serial data is sent to the host every time the last serial terminator is received. If, for example, the serial terminators selected are CR and LF then data is read and transmitted on receipt of the LF.
Data Ready
External Data Ready
EDR Overrun
signal must be at least 1 microsecond wide and should have a rise and
EDR
command enables digital input data to be latched and
Service Request
line can both latch the input data and signal the
External Data Ready (EDR
error and ignore the
EDR
buffered data has been
EDR
read request.
EDR
line defaults to rising-edge sensitive,
Invert
command (
) line. At that
).
I32
R0
R1
R2
Example:
@ R1
Data is read and transmitted to the serial host computer. Data is latched on an EDR transition and transmitted to the host. Data is sent to the host computer after every receipt of the last serial terminator from the host
reset the request digital I/O data to be sent to the serial host
Digital232
3.18
Section 3 Command Descriptions
Test Tn
The command will turn-off the front panel
Test LED
If the test is successful, all LEDs will flash for one-half second. If a test fails, the
Error
of the self test error.
Example:
@ T0
T1 turn-on the Test LED
LED will remain illuminated. Use the
command is used to verify hardware and LED operation. The
Test
Test LED
. The T2 command will cause the Digital232 to initiate a ROM/RAM test.
reset the turn-off the front panel Test LED
Digital232
. The T1 command will turn-on the
Status
command to determine the cause
T0
3.19
Section 3 Command Descriptions
Status Un
The
Status
the host computer. The status of the Digital232 may be read at any time without interfering with normal operation. Any error conditions are cleared after the status string is read by the host. The read any single bit from the I/O ports (U1 through U40).
U0 Send the Digital232 status and clear any error conditions
Un Send the status of bit n (1 thru 40)
The format of the status byte returned by the Digital232 after receiving a U0 command is as follows….
1.0C#E#F#G#I###M#P#R#Y#
where each “#” equals the number corresponding to that command. The leading
information “1.0” is the revision level of the Digital232 software.
Example:
command (U0) will cause the Digital232 to send its status message to
Status
command (Un) also enables the controller to
@@ reset the U0 send U0 to the Digital232
read the status byte display = *.*C0E0F0G0I000M0P0R0Y*
The status returned after receiving a U1 through U40 is an ASCII character ‘1’ or
‘0’, depending on the level of the line, and the state of the Invert command (I16).
Example:
U22 request the status of bit 22, display shows, a 0 (dependent on
the signal applied to the input)
Below is a summary of the Status (U0) information.
Digital232
3.20
Section 3 Command Descriptions
C# Configuration
C0 All ports are inputs C1 Port 1 is an output, ports 2 thru 5 are inputs C2 Ports 1 and 2 are outputs, ports 3 thru 5 are inputs C3 Ports 1 thru 3 are outputs, ports 4 and 5 are inputs C4 Ports 1 thru 4 are outputs, port 5 is an input C5 All ports are outputs
E# Error Message
E0 No error E1 Unrecognized command (ex. W3) E2 Illegal command option (ex. F8) E3 Conflict (attempt to output data to an input port) E4 EDR overrun (EDR pulses occurred faster than data should
be transmitted to the host)
E5 ROM error (a bit or bits in the ROM have changed state,
consult the factory for further action)
E6 RAM error (a bit or bits in the RAM are not working
properly, consult the factory for further action)
F# Data Format
F0 ASCII Hexadecimal F1 ASCII Character F2 ASCII Binary F3 ASCII Decimal F4 Binary
G# Output Select
G0 Input and Output port data is output G1 Only Input port data is output G2 Only Output port data is output
3.21
Section 3 Command Descriptions
I### Invert Control Lines
I0 All control and data lines are active high I1 Inhibit output is active low I2 Trigger output is active low I4 Data Strobe Output is active low I8 Clear output is active low I16 Data is active low I32 EDR input is falling edge sensitive I64 Service input is falling edge sensitive Note: the status indication reflects the sum of all received Invert commands.
P# Selected Port
P0 All five ports are selected
P1 Port 1 is selected
P2 Port 2 is selected
P3 Port 3 is selected
P4 Port 4 is selected
P5 Port 5 is selected
R# Data Ready
R0 Data is sent to the host immediately R1 Data is latched on EDR transition, and sent to the host R2 Data is sent to the host upon receipt of the serial terminator.
3.22
Section 3 Command Descriptions
Y# Serial Terminator
Y0 CR Y1 LF Y2 LF-CR Y3 CR-LF
3.23
Section 3 Command Descriptions
EXECUTE X
Commands sent to the instructed to execute these commands. This is done by sending an X command or a serial terminator, which is usually the last character of a command string. Commands sent without an X are stored in the internal buffer until an X or a serial terminator is received. Any number of string. Certain commands, such as string if more than one of that command is within the same string.
Example:
@ A1XA2
Digital232
Execute
reset the two same string, requiring an X after each command (unless separated by a terminator)
commands may be inserted into the same command
Bit Set
will result in no action until the unit is
Bit Set
Digital232
commands are within the
require an X after each command in a
3.24
Section 3 Command Descriptions
Terminator Yn
The serial terminator(s) defaults at power-on to the settings on Switch S1. It also may be programmed for any combination of Carriage Return (CR) and Line Feed (LF). The Y0 mode is the most commonly accepted terminator, CR.
Y0 CR Only
Y1 LF Only
Y2 LF-CR
Y3 CR-LF Example:
@
Y3 select line feed terminator U0 send status to the host
reset the
status byte indicates Y3 selected
Digital232
3.25
Section 4 Service Information
Service Information

4.1 FACTORY SERVICE

IOtech
encountered in using the problems can be resolved by discussing the problems with our applications department. If the problem cannot be solved by this method, you will be instructed as to the proper return procedure.
maintains a factory service center in Cleveland, Ohio. If problems are
Digital232
you should first telephone the factory. Many
4.1
Section 4 Service Information

4.2 Digital232 Component Layout (Mother Board)

D102 D103 D104 D105 D106
C104
R102
C106
C105
C108
U105
R6551AP
U103 6264
U102 2764
P102/
P103
C123
R103
C103
C102
C119
C121 C122
C101
74HCT00
Y101
U117
C120
1044
R105
U111
U113
26LS33
U114
26LS30
-+
-+
-+
C107
U104
74LS373
R106
C118
C114
U112
74LS73
U115
MC14020
C116
U110
74HCT02
U109
74LS139
R104
C117
U116 7805
AB
J103
C113
C112
C115
RED
BLK
R107
Blk - Pin #7
Brn - Pin #2
Red - Pin #4
J102
Orn - Pin #5
Blu - Pin #3
Wht - Pin #6
R101
D101
4.2
Section 4 Service Information

4.3 Digital232 Component Layout (I/O Board)

S201
C205C204
U205
74LS05
U204
MC68B21P
U203
MC68B21P
U202
MC68B21P
U201
MC68B09P
U206
74LS373
R205
C201
C202
C203
J202
J203
J201
R202
S202
R201
R204
250
4.3
Appendix A Digital232 Command Summary
Digital 232 Command Summary
Command Code Description Bit Set An
Set bit n (1 thru 40)
Bit Clear Bn Output G0
G1 G2
Configure C0
C1 C2 C3 C4 C5
Data Dn..Z
Data Ready R0
R1
R2
Clear bit n (1 thru 40) Input and Output
Only Input port data is output Only Output port data is output
All ports are inputs Port 1 is an output, ports 2 thru 5 are inputs Ports 1 and 2 are outputs, ports 3 thru 5 are inputs Ports 1 thru 3 are outputs, ports 4 and 5 are inputs Ports 1 thru 4 are outputs, port 5 is an input All ports are outputs
Data to be outputted is entered after "D" and terminated by "Z"
Data is transmitted to the host computer via the serial port upon receipt of an Data is latched on an EDR transition, and transmitted to the host via the serial port Data is transmitted to the host via the serial port after receipt of a serial terminator
port data is output
command
R0
Execute X Format F0
F1 F2 F3 F4
Execute preceding command string ASCII Hexadecimal
ASCII Charater ASCII Binary ASCII Decimal Binary
A.1
Appendix A Digital232 Command Summaary
Handshake H0
H1 H2
Inhibit Q0
Q1
Invert I0
I1 I2 I4 I8 I16 I32 I64
Port P0
P1 P2 P3 P4 P5
Pulse the Clear line Pulse the Strobe line Pulse the Trigger line
Clear Inhibit line Set Inhibit line
All control line outputs are active high Inhibit output is active low Trigger output is active low Data Strobe output is active low Clear output is active low Data is low true EDR input is falling-edge sensitive Service input is falling-edge sensitive
All ports selected Port 1 selected Port 2 selected Port 3 selected Port 4 selected Port 5 selected
Reset @ SRQ M0
M1 M2 M4
Status U0
Un
Terminator Y0
Y1 Y2 Y3
Reset the
Digital232
to power-on conditions
SRQ is disabled SRQ on Service Input transition SRQ on EDR input transition SRQ on command error
Send Status information when next addressed to talk (*.*C#E#F#G#I###M#P#R#Y#) Read state of bit n (1 thru 40)
CR LF LF CR CR only LF only
A.2
Appendix A Digital232 Command Summary
Test T0
T1 T2
Turn off the TEST LED Turn on the TEST LED Perform a RAM and ROM test
A.3
Appendix B ASCII Character Codes
ASCII Character Codes
Dec Hex CHR Dec Hex CHR Dec Hex CHR Dec Hex CHR 00 00 NUL 32 20 SPACE 64 40 @ 96 60 '
01 01 SOX 33 21 ! 65 41 A 97 61 a 02 02 STX 34 22 " 66 42 B 98 62 b 03 03 ETX 35 23 # 67 43 C 99 63 c 04 04 EOT 36 24 $ 68 44 D 100 64 d 05 05 ENQ 37 25 % 69 45 E 101 65 e 06 06 ACK 38 26 & 70 46 F 102 66 f 07 07 BEL 39 27 ' 71 47 G 103 67 g 08 08 BS 40 28 ( 72 48 H 104 68 h 09 09 HT 41 29 ) 73 49 I 105 69 i 10 0A LF 42 2A * 74 4A J 106 6A j 11 0B VT 43 2B + 75 4B K 107 6B k 12 0C FF 44 2C , 76 4C L 108 6C l 13 0D CR 45 2D - 77 4D M 109 6D m 14 0E SO 46 2E . 78 4E N 110 6E n 15 0F SI 47 2F / 79 4F O 111 6F o 16 10 DLE 48 30 0 80 50 P 112 70 p 17 11 DC1 49 31 1 81 51 Q 113 71 q 18 12 DC2 50 32 2 82 52 R 114 72 r 19 13 DC3 51 33 3 83 53 S 115 73 s 20 14 DC4 52 34 4 84 54 T 116 74 t 21 15 NAK 53 35 5 85 55 U 117 75 u 22 16 SYN 54 36 6 86 56 V 118 76 v 23 17 ETB 55 37 7 87 57 W 119 77 w 24 18 CAN 56 38 8 88 58 X 120 78 x 25 19 EM 57 39 9 89 59 Y 121 79 y 26 1A SUB 58 3A : 90 5A Z 122 7A z 27 1B ESCAPE 59 3B ; 91 5B [ 123 7B { 28 1C FS 60 3C < 92 5C \ 124 7C | 29 1D GS 61 3D = 93 5D ] 125 7D } 30 1E RS 62 3E > 94 5E ^ 126 7E ~ 31 1F US 63 3F ? 95 5F _ 127 7F DEL
Dec = decimal Hex = hexadecimal CHR = character LF = Line Feed CR = Carrage Return FF = Form Feed DEL = Rubout
B.1
Appendix C IBM PC Interfacing
IMB PC Interfacing
10 REM *** DUMB TERMINAL PROGRAM FOR THE 15 REM *** Running under IBM basica 20 REM *** This program allows direct interaction between the 25 REM *** IBM-PC and digital I/O devices through the Digital232. 30 REM *** Make sure the Digital232 is configured for its factory 35 REM *** default conditions, described in Section 2 of this manual. 40 REM *** 45 REM *** IOtech, Inc., P.O.Box 21204, 50 REM *** Cleveland, Ohio 44121 (440) 439-4091 60 CLS 70 REM *** Set communications parameters of COM1 port 80 OPEN "COM1:9600,N,8,2,cs,ds" AS 1 90 REM *** Display characters from COM1 100 IF LOC(1) THEN PRINT INPUT$(LOC(1),1); 110 REM *** Transmit any available characters from the keyboard 120 K$=INKEY$ 130 PRINT #1,K$;: PRINT K $; 140 GOTO 100
Digital232
Wiring Diagram for interfacing the Digital232 to an IBM PC
note: if the connected to +Vtest pin 9.
Xon/Xoff
mode is enabled, then CTS pin 4 of the
Digital232
must be
C.1
Loading...