R6522 Versatile Interface Adapter (VIA) PORT B DATA LINES (PBO-PB7) Peripheral Data Port B is an 8-line, bidirectional bus which is controlled by an Output Register, Input Register and Data Direc- tion Register in a manner much the same as Data Port A. With raspect to Port B, the output signal on line P87 may be con- trolled by Timer 1 while Timer 2 may be programmed to count pulses on the PB6 line. Port B lines represent one standard TTL load in the input mode and will drive one TTL load in the output mode. Port B lines are also capable of sourcing 1.0 mA at 1.5 Vde in the output mode. This allows the outputs to directly drive Darlington transistor circuits. A typical output circuit for Port B is shawn in Figure 3. PORT B CONTROL LINES (C81, CB2) Control lines CB1 and CB2 serve as interrupt inputs or hand- shake outputs for Peripheral Data Port 8. Like Port A, these two control lines control an internal Interrupt Flag with a correspond- ing Interrupt Enable bit. Simitar to CA1, CB1 controls the latch- ing of input data on Port B. These lines also serve as a serial data port under contro! of the Shift Register (SR). Each control line represents one standard TTL toad in the input mode and can drive one TTL toad in the output mode. CB2 can also drive a Darlington transistor circuit; however, CB1 cannot. Table 1. R6522 Register Addressing Register RS Coding Register Reglister/Description Number [HSS] RSZ_ 7 AST | RSG | Deslg. Write (RW = L} Read (RAW = WH) 0 0 0 0 ty) ORBARS Output Register B Input Register B 4 0 Q 0 | ORAARA, Output Register A input Register A 2 0 0 f 0 DORB Data Direction Register B 3 0 0 1 1 DDRA Data Direction Register A 4 0 7 0 0 TIGL T1 Low-Order Latches | Ti Low-Order Counter 5 0 1 0 1 TIC-H Ti High-Order Counter 6 0 3 1 o TALL T1 Low-Order Latches 7 0 1 1 1 TIL-H Ti High-Order Latches 8 1 0 0 0 T2C-L T2 Low-Order Latches | 12 Low-Order Counter 9 1 0 0 1 T2C-H T2 High-Order Counter 10 1 0 1 0 SA Shift Register 11 1 0 1 7 AGR Auxillary Control Register 12 1 1 0 0 PCA Peripheral Control Register 13 1 3 0 t IFR interrupt Flag Register 14 1 1 1 0 IER Interrupt Enable Register 15 1 1 t i ORAIRA Qutput Register A* | input Register A”_ NOTE: “Same as Register 1 except no handshake. +5V re) +5V : INPUT OUTPUT OH PAO-PA7, CONTROL H 5 CA2 .. PBO-PB7, 1/0 CONTROL i . CBI, CB2 OUTPUT DATA JOH OUTPUT DATA ! INPUT DATA + INPUT DATA = a. Part A Ouiput Circuit b. Part B Output Circuit Figure 3. Port A and B Output Circuits