<s>
A	O
Peripheral	B-General_Concept
Interface	I-General_Concept
Adapter	I-General_Concept
(	O
PIA	O
)	O
is	O
a	O
peripheral	O
integrated	O
circuit	O
providing	O
parallel	O
I/O	O
interfacing	O
for	O
microprocessor	B-Architecture
systems	O
.	O
</s>
<s>
Common	O
PIAs	O
include	O
the	O
Motorola	O
MC6820	O
and	O
MC6821	O
,	O
and	O
the	O
MOS	B-Architecture
Technology	I-Architecture
MCS6520	O
,	O
all	O
of	O
which	O
are	O
functionally	O
identical	O
but	O
have	O
slightly	O
different	O
electrical	O
characteristics	O
.	O
</s>
<s>
The	O
PIA	O
is	O
most	O
commonly	O
packaged	O
in	O
a	O
40	O
pin	O
DIP	B-Algorithm
package	I-Algorithm
.	O
</s>
<s>
The	O
PIA	O
is	O
designed	O
for	O
glueless	O
connection	O
to	O
the	O
Motorola	B-Device
6800	I-Device
style	O
bus	B-General_Concept
,	O
and	O
provides	O
20	O
I/O	O
lines	O
,	O
which	O
are	O
organised	O
into	O
two	O
8-bit	O
bidirectional	O
ports	O
(	O
or	O
16	O
general-purpose	O
I/O	O
lines	O
)	O
and	O
4	O
control	O
lines	O
(	O
for	O
handshaking	B-Protocol
and	O
interrupt	B-Application
generation	O
)	O
.	O
</s>
<s>
The	O
control	O
lines	O
can	O
be	O
programmed	O
to	O
generate	O
interrupts	B-Application
,	O
automatically	O
generate	O
handshaking	B-Protocol
signals	O
for	O
devices	O
on	O
the	O
I/O	O
ports	O
,	O
or	O
output	O
a	O
plain	O
high	O
or	O
low	O
signal	O
.	O
</s>
<s>
In	O
1976	O
Motorola	O
switched	O
the	O
MC6800	B-Device
family	O
to	O
a	O
depletion-mode	O
technology	O
to	O
improve	O
the	O
manufacturing	O
yield	O
and	O
to	O
operate	O
at	O
a	O
faster	O
speed	O
.	O
</s>
<s>
The	O
Peripheral	B-General_Concept
Interface	I-General_Concept
Adapter	I-General_Concept
had	O
a	O
slight	O
change	O
in	O
the	O
electrical	O
characteristics	O
of	O
the	O
I/O	O
pins	O
so	O
the	O
MC6820	O
became	O
the	O
MC6821	O
.	O
</s>
<s>
The	O
MC6820	O
was	O
used	O
in	O
the	O
Apple	B-Device
I	I-Device
to	O
interface	O
the	O
ASCII	B-Protocol
keyboard	O
and	O
the	O
display	O
.	O
</s>
<s>
The	O
MCS6520	O
was	O
used	O
in	O
the	O
Atari	B-Device
400	I-Device
and	I-Device
800	I-Device
and	O
Commodore	B-Device
PET	I-Device
family	O
of	O
computers	O
(	O
for	O
example	O
,	O
to	O
provide	O
four	O
joystick	O
ports	O
to	O
the	O
machine	O
)	O
.	O
</s>
<s>
The	O
Tandy	B-Device
Color	I-Device
Computer	I-Device
uses	O
two	O
MC6821s	O
to	O
provide	O
I/O	O
access	O
to	O
the	O
video	O
,	O
audio	O
and	O
peripherals	O
.	O
</s>
