beautypg.com

Programming, The 8255 parallel input/output chip, The special keys – BECKHOFF C1230S User Manual

Page 8

background image

Eiserstraße 5 / D-33415 Verl / Phone 05246/963-0 / Fax 05246/963-149

8

ISA Bus interface card C1230S

C1230S

Programming

The 8255 Parallel Input/Output Chip

There are three 8255 parallel input/output chips, PIOs for short, on the
C1230S ISA bus card. One of these components interrogates the special
keys on the front panel and controls the LEDs. If your PC does not have
special keys, the chip can be used for other purposes. The connections to
the chip are brought to the C1230S card’s front panel interface in TTL
compatible form. The second PIO controls an uninterruptible power supply.
You need the C2000BAT UPS control board in order to connect the UPS.
The third chip is not used on the C1230S card.

Each component has three 8-bit ports that can be configured as inputs or
outputs. The configuration is made through the control register. Each port
and each control register is located at a memory address.

The addresses of the three
PIO chips on the C1230S

Front panel

Address

UPS
control

Address

not used

Address

Port A

220H

Port A

230H

Port A

240H

Port B

221H

Port B

231H

Port B

241H

Port C

222H

Port C

232H

Port C

242H

Control
register

223H

Control
register

233H

Control
register

243H

In the control register of an 8255 parallel input/output component you
specify which port will function as input or output.

Configuration:
After power-up, write 91H
into address 223H and 93H
into address 233H.

After a reset, or after the computer has been switched on, all the ports are
configured as inputs. In order to configure the chip appropriately for its
tasks in the industry PC, write the value 91H into the control register at
address 223H, and 93H into address 233H. The configuration is retained
until these addresses are over-written, or until the computer is re-booted.

The Special Keys

The industry PC has up to 10 special keys on the front panel, each of
which contains an LED.

Each of the 10 special keys
contains an LED

The special keys on the front panel are not connected via the keyboard
interface, but are interrogated by means of port A and the lower part of port
C of the parallel input/output chip, whose address range lies between 220H
and 223H.