MC6821 peripheral interface adapter pinout

DIP-40. Two 8-bit parallel ports with handshake lines.

Two 6821s on HERO Jr. U214 ($D820-$D83F) scans the hex keypad on port A (pins 2-9), drives the motor and steering lines on port B, takes the wheel encoder on CB1 and sends sonar INIT on CB2 (pin 19). U215 ($D840-$D85F) carries the speech code on port A, speech power, sense enable, sound/light select and the serial ADC lines on port B, the sonar echo on CB1 (pin 18), speech strobe on CA2 (pin 39) and speech request on CA1 (pin 40). HERO 1 has no 6821 on its parts list.

Open the interactive 6821 PIA pinout

Pins

PinNameTypeSignal
1VSSgroundGround.
2PA0ioPort A bit 0.
3PA1ioPort A bit 1.
4PA2ioPort A bit 2.
5PA3ioPort A bit 3.
6PA4ioPort A bit 4.
7PA5ioPort A bit 5.
8PA6ioPort A bit 6.
9PA7ioPort A bit 7.
10PB0ioPort B bit 0.
11PB1ioPort B bit 1.
12PB2ioPort B bit 2.
13PB3ioPort B bit 3.
14PB4ioPort B bit 4.
15PB5ioPort B bit 5.
16PB6ioPort B bit 6.
17PB7ioPort B bit 7.
18CB1ctrlInterrupt input B1, edge-sensitive.
19CB2ctrlControl B2: interrupt input or handshake/control output, set by the B control register.
20VCCpower+5 V supply.
21R/WctrlRead/write from the CPU.
22CS0ctrlChip select 0, active high.
23/CS2ctrlChip select 2, active low.
24CS1ctrlChip select 1, active high.
25EclockEnable clock from the CPU.
26D7dataData bus bit 7.
27D6dataData bus bit 6.
28D5dataData bus bit 5.
29D4dataData bus bit 4.
30D3dataData bus bit 3.
31D2dataData bus bit 2.
32D1dataData bus bit 1.
33D0dataData bus bit 0.
34/RESETctrlReset. Clears the control registers.
35RS1ctrlRegister select 1.
36RS0ctrlRegister select 0.
37/IRQBctrlInterrupt request B. Open drain.
38/IRQActrlInterrupt request A. Open drain.
39CA2ctrlControl A2: interrupt input or handshake/control output.
40CA1ctrlInterrupt input A1, edge-sensitive.

Fitted in

Sources