System Integration Module
MOTOROLA
MC68307 USER’S MANUAL
5-11
configuring all port A and B pins as general-purpose inputs. (Note that the port pins do not
have internal pullup resistors).
When a port pin is used as general-purpose I/O, it may be accessed through the port A or
B data register (PADAT, PBDAT). Data written to the PADAT or PBDAT is stored in an out-
put latch.
If a port pin is configured as an output, the output latch data is gated onto the port pin.
In this case, when the PADAT or PBDAT is read, the contents of the output latch data
associated with the output port pin are read.
If a port pin is configured as an input, data written to PADAT or PBDAT is still stored in
the output latch, but is prevented from reaching the port pin. In this case, when PADAT
or PBDAT is read, the current state of the port pin is read.
If port pins are selected as dedicated on-chip peripheral pins, the corresponding bit in the
PADDR or PBDDR is ignored, and the actual direction of the pin is determined by the
operating mode of the on-chip peripheral. In this case, the PADAT or PBDAT register
contains, for those bit positions, the current state of the peripheral's input pin or output driver.
The dedicated functions for port A input/output lines are the extra peripheral chip select
outputs (CS2B, CS2C, and CS2D) for simple external peripherals (PA2–PA0), the timer
output signals TOUT1 and TOUT2 (PA4 and PA3), and the bus arbitration signals BR, BG,
and BGACK (PA7–PA5).
Certain port pins may be selected as general-purpose I/O pins, even when other pins related
to the same on-chip peripheral are used as dedicated pins. For example, a system which
requires a UART interface using TxD and RxD signals only, and not requiring RTS or CTS,
is free to program RTS/PB4 and CTS/PB5 as general-purpose I/O. What the peripheral now
receives as input, given that some of its pins have been reassigned, is shown in
Table 5-2.If an input pin to an I/O peripheral is used as a general-purpose I/O pin, then the actual input
to the peripheral is automatically connected internally to VDD or GND, based on the pin's
function. This does not affect the operation of the port I/O pins in their general-purpose I/O
function. Note also that even if all the pins for a particular peripheral are configured as
general-purpose input/output, the peripheral still operates as normal, although this is only
useful in the case of the timer module.