[Contents]

I/O PORTS & HANDSHAKING

I/O Ports (PRA, PRB, DDRA, DDRB)

Ports A and B each consist of an 8-bit Peripheral Data Register (PR) and an 8-bit Data Direction Register (DDR). If a bit in the DDR is set to a one, the corresponding bit in the PR is an output; if a DDR bit is set to a zero, the corresponding PR bit is defined as an input. On a READ, the PR reflects the information present on the actual port pins (PA0-PA7, PB0-PB7) for both input and output bits. Port A and Port B have passive pull-up devices as well as active pull-ups, providing both CMOS and TTL compatibility. Both ports have two TTL load drive capability. In addition to normal I/O operation, PB6 and PB7 also provide timer output functions.

REG NAME D7 D6 D5 D4 D3 D2 D1 D0
0    PRA PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0
1
   PRB PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0
2    DDRA DPA7 DPA6 DPA5 DPA4 DPA3 DPA2 DPA1 DPA0
3    DDRB DPB7 DPB6 DPB5 DPB4 DPB3 DPB2 DPB1 DPB0

Handshaking

Handshaking on data transfers can be accomplished using the output pin and the input pin. PC will go low for one cycle following a read or write of PORT B. This signal can be used to indicate "data ready" at PORT B or "data accepted" from PORT B. Handshaking on 16-bit data transfers (using both PORT A and PORT B) is possible by always reading or writing PORT A first. is a negative edge sensitive input which can be used for receiving the output from another 6526, or as a general purpose interrupt input. Any negative transition of will set the interrupt bit.


[Contents]