4
Operational modes of 8255 There are two basic operational modes of 8255: Bit set/reset Mode (BSR Mode). Input/output Mode (I/O Mode). The two modes are selected on the basis of the value present at the D 7 bit of the Control Word Register. When D 7 = 1, 8255 operates in I/O mode and when D 7 = 0, it operates in the BSR mode. INPUT/OUTPUT MODE This mode is selected when D 7 bit of the Control Word Register is 1. There are three I/O modes: 1. Mode 0 - Simple I/O 2. Mode 1 – Hand Shaking I/O 3. Mode 2 - Hand Shaking Bi-directional I/O

Operational Modes of 8255

Embed Size (px)

DESCRIPTION

control word of 8255

Citation preview

Page 1: Operational Modes of 8255

Operational modes of 8255

There are two basic operational modes of 8255:

Bit set/reset Mode (BSR Mode).

Input/output Mode (I/O Mode).

The two modes are selected on the basis of the value present at the D 7 bit of the Control Word Register. When D7 = 1, 8255 operates in I/O mode and when D7 = 0, it operates in the BSR mode.

INPUT/OUTPUT MODE

This mode is selected when D7 bit of the Control Word Register is 1. There are three I/O modes:

1. Mode 0 - Simple I/O

2. Mode 1 – Hand Shaking I/O3. Mode 2 - Hand Shaking Bi-directional I/O

Control Word Format

Page 2: Operational Modes of 8255

The ports of the 8255 can be programmed in any of the following modesMode 0, simple I/O

Any of the ports A, B, CL, and CU can be programmed as input out output All bits are outputs or all are inputs There is no signal-bit control as in P0-P3 of 8051

Mode 1, Hand Shaking I/O Port A and B can be used as input or output ports with handshaking capabilities Handshaking signals are provided by the port C

Mode 2, Hand Shaking Bi-directional I/O Port A can be used as a bidirectional I/O port with handshaking capabilities provided by

port C Port B can be used either in mode 0 or mode1

BSR (bit set/reset) mode

Only the individual bits of port C can be programmed

D7 bit is always 0 for BSR mode.

Bits D6, D5 and D4 are don't care bits. Bits D3, D2 and D1 are used to select the pin of Port C. Bit D0 is used to set/reset the selected pin of Port C.

Page 3: Operational Modes of 8255

Selection of port C pin is determined as follows:

B2 B1 B0 Bit/pin of port C selected

0 0 0 PC0

0 0 1 PC1

0 1 0 PC2

0 1 1 PC3

1 0 0 PC4

1 0 1 PC5

1 1 0 PC6

1 1 1 PC7