R6522 Versatile Interface Adapter (VIA) 2 SLL Lg PS TT DATA READY IMAI z (CAt) YELLE LLL IAG ouTPpuT eer rn 2 READ IRA OPERATION 2 co “DATA TAKEN” . 3 HANDSHAKE MODE — (CA2) g Figure 9. Read Handshake Timing (Port A Only) Write Handshake The sequence of operations which allows handshaking data from the system processor to a peripheral device is very similar to that described for Read Handshaking. However. for Write Hand- shaking, the R6522 generates the ‘Data Ready” signal and the peripheral device must respond with the “Data Taken”’ signal. This can be accomplished on both the PA port and the PB port on the R6522. CA2 or CB2 act as a “Data Ready” output in either the handshake mode or pulse mode and CAt or CB1 accept the ‘Data Taken” signal from the peripheral device, setting the interrupt flag and clearing the ‘‘Data Ready" output. This sequence is shown in Figure 10. Latching The PA port and the PB port on the R6522 can be enabled in the Auxiliary Control Register (Figure 14) to be tatched by their individual port control lines (CA1, CB1). Latching is selectable to be on the rising or falling edge of the signal at each individ- ual port control line. Selection of operating modes for CA1, CA2, CBi and CB2 is accomplished by the Peripheral Control Register (Figure 11). REG 12—PERIPHERAL CONTROL REGISTER pononpeaso ecto C982 CONTROL CAt LATCHINTERRUPT CONTROL 7:6 S! OPERATION UB NEGATIVE ACTIVE EDGE ©, O[OTINPUT NEGATIVE ACTIVE EDGE| 1. POSITIVE ACTIVE FOGE 0:0] 3 | WOEPENDENT INTERRUPT INPUT NEG EDGES Tm EAZEONTROL 01216 ]INPUT POSITIVE ACTIVE EDGE 212] 1) oPeAation By T}3 NOEFENOENT WTERRUFT O10 [0; INPUT NEGATIVE ACTIVE EDGE INFUT POS EDGE snes 4 O1O11; OEPENDENT INTER AIP 110 [OL HANDSHAKE OUTPUT ) input NEG EoGE® TO; T [PULSE OUTPUT G1 6: INPUT POSITIVE ACTIVE EOGT si. i0'Low ovteuT OPT TEINGEPENDENT mn tE RAPT T]11) HIGH OUTAUT ; INPUT POS EOGE® _—— C@) LATCHANTERRUPT CONTROL 11010) HANDSHAKE OUTPUT Tipit i Pulse OUTPUT | @- NEGATIVE ACTIVE EOGE UST FO: L Ome OUTPUT ™ [B+ POstTIVE ACTIVE EDGE TTT iG ou > “SEE NOTE WN FIGURE 20 Figure 11. Peripheral Control Register (PCR) $2 SITS SNP LT I , a | WRITE ORA, ORB OPERATION R " | “DATA READY” 7 HANDSHAKE MODE z J . — (cA2, DATA READY t a PULSE MODE | — (Caz. CB2) » » “DATA TAKEN * \ SLLLSSSLA SSSA (CA1, CBI) > | Litt liyettss iRG ouTPUT l » a M Figure 10. Write Handshake Timing