MODE 2 - BIDIRECTIONAL B-BIT MODE pin may be associated with either input transfers (H3) or out- put transfers (H 1 I. but not both. Refer to Table 6 for a sum- mary of the Port B Data Register responses in Mode 2. Marje 2 Bit 1/0 (Port AI - Mode 2. Port A performs Simple bit I/O with no associated handshake pins. This configuration is in- tended for applications in which several independent devices must be controlled or monitored. Data written to the Port A data register is single-buffered. If the Port A Data Direction Register bit for that pin is 1 (output). the' output buffer is enabled. If it is D. data written is still latched but not available at the pin.
Data read from the data register is either the in- stantaneous value of the pin or what was written to the data register. depending on the contents of the Port A Data Direction Register. This is summarized in Table 7. B 181 H1L- Output H2' Transters H3,------ Input '--~-- H4r- Transters MODE 3 - BIDIRECTIONAL 16-BIT DOUBLE- BUFFERED 1/0 In Mode 2. Port A is used for simple bit I/O with no associated handshake pins. Port B is used for bidirectional B-bit double-buffered transfers. H1 and H2. enabled by the H 12 Enable bit In the Port General Control Register. control output transfers. while H3 and H4. enabled by the Port General Control Register bit H34 Enable.
control input transfers The Instantaneous direction of the data is deter- mined by the H1 handshake pin The Port B Data Direction Register IS not used. The port A and Port B submode fields do not affect PI/T operation In Mode 2 Mode 3 ~AandB '\,--vI It61 Double-Buffered I/O (Port BI - The only aspect of bidirectional double-buffered transfers that differs from the unidirectional modes lies In controlling the Port B output buf- fers They are controlled by the level of H1 When H1 IS negated. the Port B output buffers lallB) are enabled and the pins drive the bidirectional bus. Generally. H1 IS negated in response to an asserted H2.
which indicates that new output data IS present In the double.buffered latches. Following ac- ceptance of the data. the peripheral asserts H1. disabling the Port B output buffers. Other than controlling the output buf- fer. H 1 IS edge·sensltlve as In other modes. Input transfers proceed Iderltlcally to the double-buffered Input protocol desCrIbed In the Port General Information and Conventions Sec\lon In Mode 2. only the Interlocked and pulsed hand· shake Pin options are available on H2 and H4. The DMAREQ In Mode 3. Ports A and B are used for bidirectional 16-bit double-buffered transfers. H 1 and H2 control output transfers. while H3 and H4 control input transfers.
IH1 and H2 are enabled by the H 12 Enable bit while H3 and H4 are enabled by the H34 Enable bit cf the Port General Control Register.) The instantaneous direction of the data IS deter- mined by the H1 handshake pin. and thus. the data direction registers are not used. The Port A and Port B submode fields do r10t affect PI/T operation In Mode 3 The only aspect of bidirectional double-buffered transfers that differs from the unidirectional modes lies In controlling the Port A and B output buffers. They are controlled by the level of H1. When Hlls negated. the output buffers lall 161 are enabled and the pins drive the bidirectional bus.
General· TABLE 6 - MODE 2 PORT B DATA PATHS Mode Read Port B Write Port B Data Register Data Register 2 Fil. 0 B IOUFOl.O.B AbbreViations. IOl - Imllal Output Latch FOL - Final Output latch O.B. - Double Buttered Fil - Final Input latch TABLE 7 - MODE 2 PORT A DATA PATHS Read Port A Write Port A Mode Data Register Data ~ster DDR-O I DDR-l DDR=O I DDR-l 2 Pin I FOL FOL 1 FOL. 5 B AbbreViations S.B - Single Buttered FOl - Final Output latch OOR - Data Olfectlon Register '------® MOTOROLA Semiconductor Products Inc. 19