System Integration Module
MOTOROLA
MC68307 USER’S MANUAL
5-37
any of the port B lines are required as outputs. Pullup resistors may be required to solve the
problem of port B I/O lines perhaps floating at cold reset, until PBDDR is written.
Bits 15–0—Data Direction Field B (DB15–DB0)
These bits are used to determine whether the corresponding port B input/output line are
inputs or latched outputs. As such, the DDR bit for any one port B line is ignored unless
that port B line is configured as a general-purpose output in the PBCNT. If a particular
general-purpose I/O line has its direction changed from an input to an output, the initial
data which appears on that pin is the last data written to the latch by the PBDAT register.
0 = The corresponding port B I/O bit is to be an
input.
1 = The corresponding port B I/O bit is to be an
ouput.
5.2.3.6 PORT B DATA REGISTER (PBDAT). This 16-bit read/write register is used by the
user to read or write the logic states of the general-purpose I/O lines in port B, the 8-bit I/O
port.
From a cold reset, these register bits are all cleared, so when any port B lines are configured
as outputs, a logic zero appears on those pins, unless PBDAT is written with an initial data
value to be written.
PB7–PB0—Port B Data Field
If the corresponding port B bit is configured as a general-purpose output in the PBDDR,
then writing a certain logic value to that bit in the PBDAT register enables that logic level
to appear on the output pin. Data written is latched internally, even for pins which are not
currently configured as outputs. As already mentioned, if a port line is reconfigured from
being an input to being an output, then the most recently latched value appears on that
pin.
If the corresponding port B bit is configured as a general-purpose input in the PBDDR,
then the current status of that pin can be read by reading PBDAT and examining the value
in that bit position. Reading PBDAT bits for pins configured as general-purpose outputs
simply returns the output value as stored in the latch. Reading PBDAT bits for pins con-
PBDDR
MBASE+$018
15
0
DB15
DB14
DB13
DB12
DB11
DB10
DB9
DB8
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0
RESET:
0
Read/Write
Supervisor or User
PBDAT
MBASE+$01A
15
0
PB15
PB14
PB13
PB12
PB11
PB10
PB9
PB8
PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
RESET:
0
Read/Write
Supervisor or User