MC6821 PERIPHERAL INTERFACE ADAPTER (PIA) The MC6821 Peripheral Interface Adapter provides the universal means of interfacing peripheral equipment to the M6800 family of microprocessors. This device is capable of interfacing the MPU to peripherals through two 8-bit bidirectional peripheral data buses and four control lines. No external logic is required for interfacing to most peripheral devices. The functional configuration of the PIA is programmed by the MPU during system initialization. Each of the peripheral data lines can be pro- grammed to act as an input or output, and each of the four con- trol/interrupt lines may be programmed for one of several control modes. This allows a high degree of flexibility in the overall operation of the interface. • 8-Bit Bidirectional Data Bus for Communication with the MPU • Two Bidirectional 8-Bit Buses for Interface to Peripherals • Two Programmable Control Registers • Two Programmable Data Direction Registers • Four Individually-Controlled Interrupt Input Lines; Two Usable as Peripheral Control Outputs • Handshake Control Logic for Input and Output Peripheral Operation • High-Impedance Three-State and Direct Transistor Drive Peripheral Lines • Program Controlled Interrupt and Interrupt Disable Capability • CMOS Drive Capability on Side A Peripheral Lines • Two TTL Drive Capability on All A and B Side Buffers • TTL-Compatible • Static Operation NMOS (N-CHANNEL, SILICON-GATE, DEPLETION LOAD) PERIPHERAL HMTERFACE ADAPTER L SUFFIX CERAMIC PACKAGE CASE 715 S SUFFIX CERDIP PACKAGE CASE 734 P SUFFIX PLASTIC PACKAGE CASE 711 ORDERING INFORMATION Package Type Frequency (MHz) Temperature Order Number Ceramic L Suffix 1.0 1.0 1.5 1.5 2.0 0°C to 70°C -40°C to85°C 0°C to 70°C -40 C C to85°C 0°C to 70°C MC6821L MC6821CL MC68A21L MC68A21CL MC68B21L Cerdip S Suffix 1.0 1.0 1.5 1.5 2.0 0°C to 70°C -40°Cto85°C 0°C to 70°C -40°C to85°C 0°C to 70°C MC6821S MC6821CS MC68A21S MC68A21CS MC68B21S Plastic P Suffix 1.0 1.0 1.5 1.5 2.0 0°C to 70°C -40°C to85°C 0°C to 70°C -40°C to85°C 0°C to 70°C MC6821P MC6821CP MC68A21P MC68A21CP MC68B21P PIN ASSIGNMENT vssl 1 • ^y 40 ]CA1 PA0[ 2 39 ]CA2 PA1[ 3 38 ]1RQA PA2[ 4 37 3IRQB PA3[ 5 36 ]RS0 PA4[ 6 35 ]RS1 PA5[ 7 34 ] RESET PA6[ 8 33 ]D0 PA7[ 9 32 ]D1 PB0[ 10 31 ]D2 PB1[ 11 30 ]D3 PB2[ 12 29 ]D4 PB3[ 13 28 ]D5 PB4[ 14 27 ]D6 PB5[ 15 26 ]D7 PB6I 16 25 3E PB7[ 17 24 ]csi CBlI 18 23 ]CS2 CB2[ 19 22 ]CS0 vccl 20 21 ]R/W ©MOTOROLA INC., 1985 DS9435R5 MAXIMUM RATINGS Characteristics Symbol Value Unit Supply Voltage vcc -0.3 to +7.0 V Input Voltage V in -0.3 to +7.0 V Operating Temperature Range MC6821, MC68A21, MC68B21 MC6821C, MC68A21C T A T L to T H to 70 -40 to +85 °C Storage Temperature Range T stg -55 to +150 °C THERMAL CHARACTERISTICS Characteristic Symbol Value Unit Thermal Resistance Ceramic Plastic Cerdip *JA 50 100 60 °C/W This device contains circuitry to protect the inputs against damage due to high static voltages or electric fields; however, it is ad- vised that normal precautions be taken to avoid applications of any voltage higher than maximum rated voltages to this high- impedance circuit. For proper operation it is recommended that Vj n and V out be con- strained to the range Vss£(Vj n or Vout'^Vcc- Unused inputs must always be tied to an appropriate logic voltage level (e.g., either VSS or Vcc). POWER CONSIDERATIONS The average chip-junction temperature, Tj, in °C can be obtained from: Tj = T A +(Pd»0JA> (1) Where: Ta = Ambient Temperature, °C 0jA s Package Thermal Resistance, Junction-to-Ambient, °C/W PD S P|NT+PP0RT p INT s ICC x V CC< Watts - Chip Internal Power PpORT s Port Power Dissipation, Watts — User Determined For most applications PpORT"^P|NT and can be neglected. PpoRT mav become significant if the device is configured to drive Darlington bases or sink LED loads. An approximate relationship between Pq and Tj (if PpoRT is neglected) is: P D = K+(Tj + 273°C) (2) Solving equations 1 and 2 for K gives: K = P D «(Ta + 273°C) + 0JA»PD 2 (3) Where K is a constant pertaining to the particular part. K can be determined from equation (3) by measuring Pq (at equilibrium) for a known Ta. Using this value of K the values of Pp and Tj can be obtained by solving equations (1) and (2) iteratively for any value of Ta. DC ELECTRICAL CHARACTERISTICS (V C c = 5.0 Vdc ±5%, Vss = 0, Ta = T[_ to Th unless otherwise noted). Characteristic Symbol Min Typ Max Unit BUS CONTROL INPUTS (R/W, Enable, RESET, RS0, RS1, CS0, CS1, CS2) Input High Voltage V|H Vss + 2.0 - vcc V Input Low Voltage V|L Vss-0.3^ - Vss + 0.8 V Input Leakage Current (Vj n = to 5.25 V) "in - 1.0 2.5 MA Capacitance (Vj n = 0, Ta = 25°C, f=1.0 MHz) Qn - - 7.5 PF INTERRUPT OUTPUTS (IRQA, IRQB) Output Low Voltage 0Load = 3 - 2 mA) vol - - VsS + 0.4 V Hi-Z Output Leakage Current 'oz - 1.0 10 ma Capacitance (V in = 0, T A = 25°C f= 1.0 MHz) Cout - - 5.0 PF DATA BUS (D0-D7) Input High Voltage V|H Vss + 2.0 - vcc V Input Low Voltage V|L Vss-0.3 - Vss + 0.8 V Hi-Z Input Leakage Current (Vj n = 0.4 to 2.4 V) iiz - 2.0 10 *A Output High Voltage (l|_oad = ~ 205 *«A) VOH Vss + 2.4 - - V Output Low Voltage (l|_ oac |= 1.6 mA) vol - - VSS + 0.4 V Capacitance (Vj n = 0, Ta = 25°C, f = 1.0 MHz) Cin - - 12.5 PF ® MOTOROLA Semiconductor Products Inc. DC ELECTRICAL CHARACTERISTICS (Continued) Characteristic Symbol Min Typ Max Unit PERIPHERAL BUS (PA0-PA7, PB0-PB7, CA1, CA2, CB1, CB2) Input Leakage Current R/W, RESET, RSO, RS1, CSO, CS1, CS2, CA1, (V jn = to 5.25 V) CB1, Enable 'in - 1.0 2.5 ^A Hi-Z Input Leakage Current (V in = 0.4 to 2.4 V) " PB0-PB7, CB2 iiz - 2.0 10 *A Input High Current (V|h = 2.4 V) PA0-PA7, CA2 llH -200 -400 - . /* A Darlington Drive Current (Vo = 1 .5 V) PB0-PB7, CB2 'OH -1.0 - -10 mA Input Low Current (V| L =0.4 V) PA0-PA7, CA2 'IL - -1.3 -2.4 mA Output High Voltage (l Load = -200/tA) PA0-PA7, PB0-PB7, CA2, CB2 ( | Load= -10/iA) PA0-PA7.CA2 VOH Vss + 2.4 Vcc-1-0 : V Output Low Voltage (l|_ oac j = 3.2 mA) vol — — Vss + 0.4 V Capacitance (Vj n = 0, T"a = 25°C, f = 1 .0 MHz) Cjn - - 10 pF POWER REQUIREMENTS Internal Power Dissipation (Measured at T|_=0°C) pint - - 550 mW BUS TIMING CHARACTERISTICS (See Notes 1 and 2) Idem. Number Characteristic Symbol MC6821 MC68A21 MC68B21 Unit Min Max Min Max Min Max 1 Cycle Time tcyc 1.0 10 0.67 10 0.5 10 l* 2 Pulse Width, E Low PW EL 430 - 280 - 210 — ns 3 Pulse Width, E High PW EH 450 - 280 - 220 - ns 4 Clock Rise and Fall Time tr.tf - 25 - 25 - 20 ns 9 Address Hold Time tAH 10 - 10 - 10 - ns 13 Address Setup Time Before E *AS 80 - 60 - 40 - ns 14 Chip Select Setup Time Before E tcs 80 - 60 - 40 - ns 15 Chip Select Hold Time *CH 10 - 10 - 10 - ns 18 Read Data Hold Time tDHR 20 50* 20 50* 20 50* ns 21 Write Data Hold Time *DHW 10 - 10 - 10 - ns 30 Output Data Delay Time *DDR - 290 - 180 - 150 ns 31 Input Data Setup Time *DSW 165 - 80 - 60 — ns 'The data bus output buffers are no longer sourcing or sinking current by tQHRmax (High Impedance). FIGURE 1 - BUS TIMING — o- R/W, Address ' (Non-Muxed) Read Data Non-Muxed Write Data Non-Muxed ;^^ * < X (§ \ -©- © MPU Read Data Non-Muxed s: MPU Write Data Non-Muxed Q; -©-* ©r^ Notes: 1. Voltage levels shown are V|_<0.4 V, Vh^2.4 V, unless otherwise specified. 2. Measurement points shown are 0.8 V and 2.0 V, unless otherwise specified. AA) MOTOROLA Semiconductor Products Inc. PERIPHERAL TIMING CHARACTERISTICS (V cc = 5.0 V ±5%, V S s = OV, Ta = T|_ to Th unless otherwise specified) Characteristic Symbol MC6821 MC68A21 MC68B21 Unit Reference Fig. No. Min Max Min Max Min Max Data Setup Time tPDS 200 - 135 - 100 - ns 6 Data Hold Time tPDH - - - ns 6 Delay Time, Enable Negative Transition to CA2 Negative Transition *CA2 - 1.0 - 0.670 - 0.500 MS 3,7,8 Delay Time, Enable Negative Transition to CA2 Positive Transition TRS1 - 1.0 - 0.670 - 0.500 MS 3, 7 Rise and Fall Times for CA1 and CA2 Input Signals *r. tf - 1.0 - 1.0 - 1.0 MS 8 Delay Time from CA1 Active Transition to CA2 Positive Transition *RS2 - 2.0 - 1.35 - 1.0 MS 3,8 Delay Time, Enable Negative Transition to Data Valid tPDW - 1.0 - 0.670 - 0.5 " /lS 3, 9, 10 Delay Time, Enable Negative Transition to CMOS Data Valid PA0-PA7, CA2 tCMOS - 2.0 - 1.35 - 1.0 MS 4,9 Delay Time, Enable Positive Transition to CB2 Negative Transition tCB2 - 1.0 - 0.670 - 0.5 MS 3, 11, 12 Delay Time, Data Valid to CB2 Negative Transition *DC 20 - 20 - 20 - ns 3, 10 Delay Time, Enable Positive Transition to CB2 Positive Transition tRSI - 1.0 - 0.670 - 0.5 MS 3, 11 Control Output Pulse Width, CA2/CB2 PW CT 500 - 375 - 250 - ns 3, 11 Rise and Fall Time for CB1 and CB2 Input Signals V. tf - 1.0 - 1.0 - 1.0 M 12 Delay Time, CB1 Active Transition to CB2 Positive Transition tRS2 - 2.0 - 1.35 - 1.0 JUS 3, 12 Interrupt Release Time, IRQA and IRQB t|R - 1.60 - 1.10 - 0.85 MS 5, 14 Interrupt Response Time tRS3 - 1.0 - 1.0 - 1.0 MS 5, 13 Interrupt Input Pulse Time PW| 500 - 500 - 500 - ns 13 RESET Low Time* *RL 1.0 - 0.66 - 0.5 - MS 15 "The RESET line must be high a minimum of 1.0 /is before addressing the PIA. FIGURE 2 - BUS TIMING TEST LOADS (D0-D7) O 5.0 V ;R 11.7 kO % MMD7000 w or Equiv. FIGURE 3 - TTL EQUIVALENT TEST LOAD (PA0-PA7, PB0-PB7, CA2.CB2) o5.0V Test Point O f Vi R L =1.25kG MMD6150 or Equiv. -- MMD7000 or Equiv. C = 30pF, R = 12k FIGURE 4 - CMOS EQUIVALENT TEST LOAD (PA0-PA7, CA2) FIGURE 5 - NMOS EQUIVALENT TEST LOAD (fRQOnly) 5.0 V Test Point O- 1.5 kQ Pr"30 pF Test Point o- 100 pF AA) MOTOROLA Semiconductor Products Inc. . vC8821 ;^i— iit-^*— ?Hfc:r.:..?st.;». i fl 'AT; mm&M FIGURE 6 - PERIPHERAL DATA SETUP AND HOLD TIMES (Read Mode) FIGURE 7 - CA2 DELAY TIME (Read Mode; CRA-5=CRA3=1, CRA-4=0) PAO-PA7 PB0-PB7 X -H t PDS Enable r t x "tpDH Enable CA2 V^ tcAa— «-l h— t BSl' \ PW CT ft ' Assumes part was deselected during the previous E pulse. FIGURE 8 - CA2 DELAY TIME (Read Mode; CRA-5=1, CRA-3=CRA-4=0) FIGURE 9 - PERIPHERAL CMOS DATA DELAY TIMES (Write Mode; CRA-5=CRA-3=1, CRA-4=0) Enable CAT ~/f- :zzt r— V-tf — T CA2 -— I *RS2 —I h— CA2 \_ r Enable 'CMOS— 4 tPDW \-L PA0-PA7, CA2 X -V cc -30% V CC FIGURE 10 - PERIPHERAL DATA AND CB2 DELAY TIMES (Write Mode; CRB-5=CRB-3=1, CRB-4=0) FIGURE 11 - CB2 DELAY TIME (Write Mode; CRB-5=CRB-3=1, CRB-4=0) Enable \ / PB0-PB7 X tpDW — t DC- CB2* CB2 goes low as a result of the positive transition of Enable. Enable CB2 yrv^' H T CB2 — 'RSI \ ™CT 7' "Assumes part was deselected during the previous E pulse. FIGURE 12 - CB2 DELAY TIME (Write Mode; CRB-5=1, CRB-3=CRB-4=0) Enable r~\ CB1 r—t r ,t f //_ — t CB2— CB2 Y -7/ _//_ 'RS2'-*- -^ / "Assumes part was deselected during any previous E pulse. FIGURE 13 - INTERRUPT PULSE WIDTH AND IRQ RESPONSE PW| CA1.2 CB1. 2 & X IRQA/a Y *RS3"- • Assumes Interrupt Enable Bits are set. Note: Timing measurements are referenced to and from a low voltage of 0.8 volts and a high voltage of 2.0 volts, unless otherwise noted. AAj MOTOROLA Semiconductor Products Inc. ill .hit •' ; „..'••;.":; *•; FIGURE 14 - IRQ RELEASE TIME Enable FIGURE 15 - RESET LOW TIME t RL RESET \ - t jR IRQ / / "The RESET line must be a Vm for a minimum of 1.0 /is before addressing the PIA. Note: Timing measurements are referenced to and from a low voltage of 0.8 volts and a high voltage of 2.0 volts, unless otherwise noted. FIGURE 16 - EXPANDED BLOCK DIAGRAM 'CC Pin 20 CSO 22 CS1 24 CS2 23 RSO 36 RS1 35 R/W 21 Enable 25 RESET 34 — •" Chip Select and R/W Control Control Register B (CRB) Interrupt Status Control A IRQB 37 Data Direction Register A (DDRA) xz Peripheral Interface A Peripheral Interface B zx Data Direction Register B (DDRB) Interrupt Status Control B 40 CA1 39 CA2 PAO PA1 PA2 PA3 PA4 PAS PA6 9 PA7 -*-10 PB0 -»-11 PB1 -»- 12 PB2 -*► 13 PB3 -»- 14 PB4 -*- 15 PB5 -•-16 PB6 -»- 17 PB7 18 CB1 •19 CB2 ® MOTOROLA Semiconductor Products Inc. -*.*^>^*mbs^^^ jjjjjp jgg- .xmamtS^a^ PIA INTERFACE SIGNALS FOR MPU The PIA interfaces to the M6800 bus with an 8-bit bidirec- tional data bus, three chip select lines, two register select lines, two interrupt request lines, a read/write line, an enable line and a reset line. To ensure proper operation with the MC6800, MC6802, or MC6808 microprocessors, VMA should be used as an active part of the address decoding. Bidirectional Data (D0-D7) — The bidirectional data lines (D0-D7) allow the transfer of data between the MPU and the PIA. The data bus output drivers are three-state devices that remain in the high-impedance (off) state except when the MPU performs a PIA read operation. The read/write line is in the read (high) state when the PIA is selected for a read operation. Enable (E) — The enable pulse, E, is the only timing signal that is supplied to the PIA. Timing of all other signals is referenced to the leading and trailing edges of the E pulse. Read/Write (R/W) - This signal is generated by the MPU to control the direction of data transfers on the data bus. A low state on the PIA read/write line enables the input buffers and data is transferred from the MPU to the PIA on the E signal if the device has been selected. A high on the read/write line sets up the PIA for a transfer of data to the bus. The PIA output buffers are enabled when the proper ad- dress and the enable pulse E are present. for the duration of the E pulse. The device is deselected when any of the chip selects are in the inactive state. Register Selects (RSO and RS1) - The two register select lines are used to select the various registers inside the PIA. These two lines are used in conjunction with internal Control Registers to select a particular register that is to be written or read. The register and chip select lines should be stable for the duration of the E pulse while in the read or write cycle. RESET — The active low RESET line is used to reset all register bits in the PIA to a logical zero (low). This line can be used as a power-on reset and as a master reset during system operation. Chip Selects (CSO, CS1, and CS2) - These three input signals ar e use d to select the PIA. CSO and CS1 must be high and CS2 must be low for selection of the device. Data transfers are then performed under the control of the enable and read/write signals. The chip select lines must be stable Interrupt Request (I RQA a nd I RQB) — The active low In- terrupt Request lines (IRQA and IRQB) act to interrupt the MPU either directly or through interrupt priority circuitry. These lines are "open drain" (no load device on the chip). This permits all interrupt request lines to be tied together in a wire-OR configuration. Each Interrupt Request line has two internal interrupt flag bits that can cause the Interrupt Request line to go low. Each flag bit is associated with a particular peripheral interrupt line. Also, four interrupt enable bits are' provided in the PIA which may be used to inhibit a particular interrupt from a peripheral device. Servicing an interrupt by the MPU may be accomplished by a software routine that, on a prioritized basis, sequentially reads and tests the two control registers in each PIA for in- terrupt flag bits that are set. The interrupt flags are cleared (zeroed) as a result of an MPU Read Peripheral Data Operation of the corresponding data register. After being cleared, the interrupt flag bit can- not be enabled to be set until the PIA is deselected during an E pulse. The E pulse is used to condition the interrupt control lines (CA1, CA2, CB1, CB2). When these lines are used as interrupt inputs, at least one E pulse must occur from the in- active edge to the active edge of the interrupt input signal to condition the edge sense network. If the interrupt flag has been enabled and the edge sense circuit has been properly conditioned, the interrupt flag will be set on the next active transition of the interrupt input pin. PIA PERIPHERAL INTERFACE LINES The PIA provides two 8-bit bidirectional data buses and four interrupt/ control lines for interfacing to peripheral devices. Section A Peripheral Data (PA0-PA7) - Each of the peripheral data lines can be programmed to act as an input or output. This is accomplished by setting a "1" in the cor- responding Data Direction Register bit for those lines which are to be outputs. A "0" in a bit of the Data Direction Register causes the corresponding peripheral data line to act as an input. During an MPU Read Peripheral Data Operation, the data on peripheral lines programmed to act as inputs ap- pears directly on the corresponding MPU Data Bus lines. In the input mode, the internal pullup resistor on these lines represents a maximum of 1 .5 standard TTL loads. The data in Output Register A will appear on the data lines that are programmed to be outputs. A logical "1" written in- to the register will cause a "high" on the corresponding data line while a "0" results in a "low." Data in Output Register A may be read by an MPU "Read Peripheral Data A" operation when the corresponding lines are programmed as outputs. This data will be read properly if the voltage on the peripheral data lines is greater than 2.0 volts for a logic "1" output and less than 0.8 volt for a logic "0" output. Loading the output lines such that the voltage on these lines does not reach full voltage causes the data transferred into the MPU on a Read operation to differ from that contained in the respective bit of Output Register A. Section B Peripheral Data (PB0-PB7) - The peripheral data lines in the B Section of the PIA can be programmed to act as either inputs or outputs in a similar manner to PA0- PA7. They have three-state capabiity, allowing them to enter a high-impedance state when the peripheral data line is used as an input. In addition, data on the peripheral data lines AA) MOTOROLA Semiconductor Products Inc. *..< ■■ • . = -:.■• •■ :.;. ? ' -:■- :■>?>-" ■»••-:■:'■■■•••■• -N -/■■■■■ • V* l ••' ' bS?"'"" - ' PB0-PB7 will be read properly from those lines programmed as outputs even if the voltages are below 2.0 volts for a "high" or above 0.8 V for a "low". As outputs, these lines are compatible with standard TTL and may also be used as a source of at least 1 milliampere at 1.5 volts to directly drive the base of a transistor switch. Interrupt Input (CA1 and CB1) — Peripheral input lines CA1 and CB1 are input only lines that set the interrupt flags of the control registers. The active transition for these signals is also programmed by the two control registers. Peripheral Control (CA2) - The peripheral control line CA2 can be programmed to act as an interrupt input or as a peripheral control output. As an output, this line is compati- ble with standard TTL; as an input the internal pullup resistor on this line represents 1.5 standard TTL loads. The function of this signal line is programmed with Control Register A. Peripheral Control (CB2) - Peripheral Control line CB2 may also be programmed to act as an interrupt input or peripheral control output. As an input, this line has high in- put impedance and is compatible with standard TTL. As an output it is compatible with standard TTL and may also be used as a source of up to 1 milliampere at 1 .5 volts to directly drive the base of a transistor switch. This line is programmed by Control Register B. INTERNAL CONTROLS INITIALIZATION A RESET has the effect of zeroing all PIA registers. This will set PA0-PA7, PB0-PB7, CA2 and CB2 as inputs, and all interrupts disabled. The PIA must be configured during the restart program which follows the reset. There are six locations within the PIA accessible to the MPU data bus: two Peripheral Registers, two Data Direction Registers, and two Control Registers. Selection of these locations is controlled by the RSO and RS1 inputs together with bit 2 in the Control Register, as shown in Table 1. Details of possible configurations of the Data Direction and Control Register are as follows: TABLE 1 - - INTERNAL ADDRESSING RS1 RSO Control Register Bit Location Selected CRA-2 CRB-2 1 X Peripheral Register A X Data Direction Register A 1 X X Control Register A 1 X 1 Peripheral Register B 1 X Data Direction Register B 1 1 X X Control Register B X = Don't Care PORT A-B HARDWARE CHARACTERISTICS As shown in Figure 17, the MC6821 has a pair of I/O ports whose characteristics differ greatly. The A side is designed to drive CMOS logic to normal 30% to 70% levels, and incor- porates an internal pullup device that remains connected even in the input mode. Because of this, the A side requires more drive current in the input mode than Port B. In con- trast, the B side uses a normal three-state NMOS buffer which cannot pullup to CMOS levels without external resistors. The B side can drive extra loads such as Darl- ingtons without problem. When the PIA comes out of reset, the A port represents inputs with pullup resistors, whereas the B side (input mode also) will float high or low, depending upon the load connected to it. Notice the differences between a Port A and Port B read operation when in the output mode. When reading Port A, the actual pin is read, whereas the B side read comes from an output latch, ahead of the actual pin. CONTROL REGISTERS (CRA and CRB) The two Control Registers (CRA and CRB) allow the MPU to control the operation of the four peripheral control lines CA1, CA2, CB1,andCB2. In addition they allow the MPU to enable the interrupt lines and monitor the status of the inter- rupt flags. Bits through 5 of the two registers may be writ- ten or read by the MPU when the proper chip select and register select signals are applied. Bits 6 and 7 of the two registers are read only and are modified by external interrupts occurring on control lines CA1, CA2, CB1, or CB2. The for- mat of the control words is shown in Figure 18. DATA DIRECTION ACCESS CONTROL BIT (CRA-2 and CRB-2) Bit 2, in each Control Register (CRA and CRB), deter- mines selection of either a Peripheral Output Register or the corresponding Data Direction E Register when the proper register select signals are applied to RSO and RS1. A "1" in bit 2 allows access of the Peripheral Interface Register, while a "0" causes the Data Direction Register to be addressed. Interrupt Flags (CRA-6, CRA-7, CRB-6, and CRB-7) - The four interrupt flag bits are set by active transitions of signals on the four Interrupt and Peripheral Control lines when those lines are programmed to be inputs. These bits cannot be set directly from the MPU Data Bus and are reset indirectly by a Read Peripheral Data Operation on the ap- propriate section. Control of CA2 and CB2 Peripheral Control Lines (CRA-3, CRA-4, CRA-5, CRB-3, CRB-4, and CRB-5) - Bits 3, 4, and 5 of the two control registers are used to control the CA2 and CB2 Peripheral Control lines. These bits determine if the con- trol lines will be an interrupt input or an output control signal. If bit CRA-5 (CRB-5) is low, CA2 (CB2) is an interrupt input line similar to CA1 (CB1). When CRA-5 (CRB-5) is high, CA2 (CB2) becomes an output signal that may be used to control peripheral data transfers. When in the output mode, CA2 and CB2 have slightly different loading characteristics. ® MOTOROLA Semiconductor Products Inc. gS«rei :": Control of CA1 and CB1 Interrupt Input Lines (CRA-0, CRB-0, CRA-1, and CRB-1) - The two lowest-order bits of the control registers are used to control the interrupt input lines CA1 and CB1. Bits CRA-0 and CRB-0 are used to enable the MPU interrupt signals IRQA and IRQB, respec- tively. Bits CRA-1 and CRB-1 determine the active transition of the interrupt input signals CA1 and CB1. Port A FIGURE 17 - PORT A AND PORT B EQUIVALENT CIRCUITS Port B VCC VCC Port Pin Data Direction DATA tion -* -s. € Data Direction (0— Input Pin) ^ — ^(1— Output Pin) (1u- Read of B ^HJ/ Data When in Output Mode =£> Port Pin t-n Read A Data in Input or Output Mode o a- Read of B Data when in Input Mode Internal PIA Bus ORDERING INFORMATION MC68A21CP J" Motorola Integrated Circuit ■ M6800 Family Blanks =1.0 MHz A=1.5 MHz B = 2.0 MHz Device Designation In M6800 Family Temperature Range Blank = 0°— +70°C C= -40°— +85°C Package P= Plastic S = Cerdip L= Ceramic BETTER PROGRAM Better program processing is available on all types listed. Add suffix letters to part number. Level 1 add "S" Level 1 "S' Level 2 add "D" Level 3 add "DS" 10 Temp Cycles - ( - 25 to 150°C); Hi Temp testing at T^ max. Level 2 "D" = 168 Hour Burn-in at 125°C Level 3 "DS" = Combination of Level 1 and 2. ® MOTOROLA Semiconductor Products Inc. Determine Active CA1 (CB1) Transition for Setting Interrupt Flag IRQA(B)1 - (bit 7) b1 =0: IRQA(B)1 set by high-to-low transition on CA1 (CB1) bl = 1 : IRQA(B)1 set by low-to-high transition on CA1 (CB1). FIGURE 18 - CONTROL WORD FORMAT IRQA(B) 1 Interrupt Flag (bit 7) Goes high on active transition of CA1 (CB1); Automa- tically cleared by MPU Read of Output Register A(B). May also be cleared by hardware Reset. CAT (CB1) Interrupt Request Enable/ Disable b0=0: Disables IRQA(B) MPU Interrupt by CA1 (CB1) active transition. 1 b0=1: Enable IRQA(B) MPU Interrupt by CA1 (CB1) active transition. 1. IRQA(B) will occur on next (MPU generated) positive transition of bO if CA1 (CB1) active transition oc- curred while interrupt was disabled. Control Register b7 b6 b5 b4 b3 b2 b1 bO IRQA(B)1 Flag IRQA(B)2 Flag CA2 (CB2) Control DDR Access CA1 (CB1) Control I IRQA(B)2 Interrupt Flag (bit 6) When CA2 (CB2) is an input, IRQA(B) goes high on ac- Determines Whether Data Direction Register Or Output tive transition CA2 (CB2); Automatically cleared by Register is Addressed MPU Read of Output Register A(B). May also be b2=0: Data Direction Register selected. cleared by hardware Reset. b2=1: Output Register selected. CA2 (CB2) Established as Output (b5=1): IRQA(B) 2=0, not affected by CA2 (CB2) transitions. CA2 (CB2) Established as Output by b5=1 CA2 (CB2) Established as Input by b5=0 (Note that operation of CA2 and CB2 output b5 b4 b 1 3 functions are not identical) : — >-CA2 b3=0: Read Strobe with CA1 Restore CA2 goes low on first high-to-low E transition following an MPU read of Output Register A; returned high by next active CA1 transition, as specified by bit 1 . b3= 1 : Read Strobe with E Restore CA2 goes low on first high-to-low E transition following an MPU read of Output Register A; returned high b5 b \ b3 ' — >■ CA2 (CB2) Interrupt Request Enable/ Disable b3=0: Disables IRQA(B) MPU Interrupt by CA2 (CB2) active transition.* b3=1: Enables IRQA(B) MPU Interrupt by CA2 (CB2) active transition. *IRQA(B) will occur on next (MPU generat- ted) positive transition of b3 if CA2 (CB2) active transition occurred while interrupt was disabled. by next high-to-low E transition dur- Setting Interrupt Flag IRQA(B)2 - (Bit b6) ing a deselect. b4=0: IRQA(B)2 set by high-to-low transi- ^ *~ CB2 tion on CA2 (CB2). b3=0: Write Strobe with CB1 Restore b4= 1: IRQA(B)2 set by low-to-high transi- CB2 goes low on first low-to-high tion on CA2 (CB2). E transition following an MPU write into Output Register B; returned high by the next active CB1 transi- tion as specified by bit 1. CRB-b7 must first be cleared by a read of data. b3= 1 : Write Strobe with E Restore CB2 goes low on first low-to-high E transition following an MPU write into Output Register B; returned b5 b4 b3 high by the next low-to-high E tran- sition following an E pulse which occurred while the part was de- selected. 1 1 w Sot/R»cot TA9 irR9> CA2 (CB2) goes low as MPU writes b3=0 into Control Register. CA2 (CB2) goes high as MPU writes b3=1 into Control Register. ® MOTOROLA Semiconductor Products Inc. 10 PACKAGE DIMENSIONS H J dL SEATING PLANE-/J ; -4-j M- L SUFFIX CERAMIC PACKAGE CASE 715-04 DIM MILLIMETERS INCHES MIN MAX MIN MAX A 50.29 51.31 1.980 2.020 B 14.94 15.34 0.588 0.604 C 3.05 4.06 0.1 20 0.160 D 0.38 0.53 0.015 0.021 F 0.76 1.40 0.030 0.055 G 2.54 BSC 0.100 BSC H 0.76 1.78 0.030 0.070 J 0.20 0.33 0.008 0.013 K 2.54 4.19 0.100 0.165 L 14.99 15.49 0.590 0.610 M - 100 - 10" N 1.02 1.52 0.040 0.060 . LEADS. TRUE POSITIONED WITHIN 0.25 mm (0.0101 DIA (AT SEATING PLANE), AT MAX MAT'L CONDITION. . DIMENSION "L" TO CENTER OF LEADS WHEN FORMED PARALLEL. ^riftrtftft^firt^rt^p^^ftftA^ft wm;um;uinjmjuvouijmjm; wmmfmwmm hU — | G i— -| L-F -11— D \ *\. SEATING plane -I P SUFFIX PLASTIC PACKAGE CASE 71 1-03 DIM MILLIMETERS INCHES MIN I MAX MIN MAX A 51.69 1 52.45 2.035 2.065 B 13.72 ! 14.22 0.540 0.560 C 3.94 i 5.08 0.155 0.200 0.36 ' 0.56 0.014 0.022 F 1.02 1 1.52 0.O40 0.060 G 2.54 BSC 0.100 BSC H 1.65 : 2.16 0.065 0.085 J 0.20 1 0.38 0.008 0.015 K 2.92 | 3.43 0.115 0.135 L 15.24 BSC 0.600 BSC M 0° 15° 0° 15° N 0.51 1.02 0.020 0.040 NOTES: 1. POSITIONAL TOLERANCE OF LEADS (D), SHALL BE WITHIN 0.25 mm (0.010) AT MAXIMUM MATERIAL CONDITION. IN RELATION TO SEATING PLANE ANO EACH OTHER. 2. DIMENSION L TO CENTER OF LEADS WHEN FORMED PARALLEL. 3. DIMENSION B OOES NOT INCLUDE MOLD FLASH. ^rifti^ft^ri^ff^^riftAftflftft^ft -+- S SUFFIX CERDIP PACKAGE CASE 734-03 DIM MILLIMETERS INCHES MIN 1 MAX MIN MAX A 51.31 153.24 2.020 2.096 B 12.70 | 15.49 0.500 0.610 C 4.06 1 5.84 J. 160 0.230 D 0.38 i 0.56 0.015 0.022 F 127 j 1.65 0.050 0.065 G 2.54 BSC 0.10 IBSC J 0.20 0.30 0.008 0.012 K 3.18 4.06 0.12V 0.160 L 15.24 BSC 0.600 BSC M 5" 15" 5° I 15" II 0.51 1.27 0.020 | 0.050 01MENSION-A-IS DATUM. POSITIONAL TOLERANCE FOR LEAOS: I + U0.25(0.010)(y)lT[A(g1 m IS SEATING PLANE. OIMENSION L TO CENTER OF LEAOS WHEN FORMED PARALLEL. DIMENSION A ANO B INCLUDES MENISCUS. (g) MOTOROLA Semiconductor Products Inc. 11 Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical" parameters can and do vary in different applications. All operating parameters, including 'Typicals" must be validated for each customer application by customer's technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. Motorola and ® are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer. Literature Distribution Centers: USA: Motorola Literature Distribution; P.O. Box 20912; Phoenix, Arizona 85036. EUROPE: Motorola Ltd.; European Literature Centre; 88 Tanners Drive, Blakelands, Milton Keynes, MK14 5BP, England. JAPAN: Nippon Motorola Ltd.; 4-32-1 , Nishi-Gotanda, Shinagawa-ku, Tokyo 141 , Japan. ASIA PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Center, No. 2 Dai King Street, Tai Po Industrial Estate, Tai Po, N.T., Hong Kong. ® MOTOROLA A10959-11 PRINTED IN USA (1994) MPS/POD MCU YGACAA MC6821/D