Using the pioc as i/o – B&B Electronics Parallel Printer Card PIOC User Manual

Page 6

Advertising
background image

Documentation Number PIOC2595 Manual

5

B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350

PH (815) 433-5100 -- FAX (815) 433-5105

Using the PIOC as I/O


The PIOC may also be used as a general I/O device. The Base

Register has eight bi-directional lines. The direction of these lines is
based on bit 5 of the Control Register. If bit 5 of the Control Register
is a “1”, then the lines of the Base Register are defined as inputs. If
bit 5 of the Control Register is a “0”, then these lines are defined as
outputs (this is default state after “boot up”). If the Base Register is
being used as outputs, the states of the lines can be changed by
writing (outputting) to the Base Register. The states of these lines
can be determined by reading (inputting) the Base Register. Writing
(outputting) to the Base Register when the lines are defined as
inputs will have no affect on the port. Table 5 shows the functions of
the registers and their pinouts.

The five lines of the Status Register can only be used as inputs.

The four lines of the Control Register can be used as inputs or
outputs. The Control Register can be used as inputs by writing
(outputting) a byte with the following bit pattern “xxxx0100” (4h) to
the Control Register where “x” is a don’t care. Caution should be
taken to insure bits 4 and 5 remain in the desired state (See Notes 2
and 3). The states of these lines can be determined by reading
(inputting) the Control Register. The lines of the Control Register
can be used as outputs by writing (outputting) to the Control
Register.

Advertising