Adcon A720 User Manual

Page 47

Advertising
background image

CHAPTER 4

Using terminal commands

47

APPLIES

TO

A720B and A723, but see also the comments in “Remote” on
page 49.

D

ESCRIPTION

A complex command acting upon the I/O ports of a device.

P

ARAMETERS

A control byte specifying the command, the bit of the port the
command is acting on, and two 16-bit parameters, depending on
the control byte; for some commands, one or both of them may be
missing. However, if they are needed for a certain command but
not given, null values are implied.

The control byte’s significance is shown in Figure 14.

Figure 14. Control Byte Layout

The Port Number selects a the port that will be affected by
the command. For the A720/A723, only 0000 and 0001 are
accepted.

The Command Code specifies the operation that will be
applied to the selected port.

Table 5 shows the command codes definitions.

Command Code

Port Number

Table 5. Command Code Definitions

Code

Description

Parameters

Returns

0000

RDP – Read Data Port. This command reads the
whole 16-bit port and returns its value; the Port
Number has no significance for this command.

None

A 16-bit integer and the
result (OK or ERROR).

0001

RDDR – Read Data Direction Register. This com-
mand reads the whole 16-bit Data Direction
Register and returns its value; the Port Number
has no significance for this command.

None

A 16-bit integer and the
result (OK or ERROR).

0010

CAI – Configure the port specified by Port Num-
ber as input (acts upon the Data Direction Regis-
ter).

The port number.

Result (OK or ERROR).

0011

CAO – Configure the port specified by Port
Number as output (acts upon the Data Direction
Register).

The port number.

Result (OK or ERROR).

Advertising
This manual is related to the following products: