![](http://datasheet.mmic.net.cn/120000/MC68349FT16_datasheet_3559370/MC68349FT16_151.png)
MOTOROLA
MC68349 USER'S MANUAL
4- 39
4.3.5.6 PORT B DATA DIRECTION REGISTER (DDRB). DDRB controls the direction of
the pin drivers when the pins are configured as I/O. Any set bit configures the
corresponding pin as an output; any cleared bit configures the corresponding pin as an
input. This register affects only pins configured as discrete I/O. This register can be read
or written at any time.
DDRB
$01D
76543210
DD7
DD6
DD5
DD4
DD3
DD2
DD1
DD0
RESET:
00000000
Supervisor/User
4.3.5.7 PORT B DATA REGISTER (PORTB, PORTB1). This is a single register that can
be accessed at two different addresses. This register affects only those pins configured as
discrete I/O. A write is stored in the internal data latch, and if any port B pin is configured
as an output, the value stored for that bit is driven on the pin. A read of this register returns
the value stored in the register only if the pin is configured as a discrete output. Otherwise,
the value read is the value of the pin. This register can be read or written at any time.
PORTB, PORTB1
$019, 01B
76543210
P7
P6
P5
P4
P3
P2
P1
P0
RESET:
UUUUUUUU
Supervisor/User
4.4 MC68349 INITIALIZATION SEQUENCE
The following paragraphs discuss a suggested method for initializing the MC68349 after
power-up.
4.4.1 Startup
RESET is asserted by the MC68349 during the time in which VCC is ramping up, the VCO
is locking onto the frequency, and the MC68349 is going through the reset operation. After
RESET is negated, four bus cycles are run, with global CS0 being asserted to fetch the
32-bit supervisor stack pointer (SSP) and the 32-bit program counter (PC) from the boot
read-only memory (ROM). Until programmed differently, CS0 is a global, six-wait-state
chip select. Port termination size is determined at reset by the state of D31 and D30 (see
Table 4-4). CS0 can be programmed to continue decode for a range of addresses after the
V-bit is set, provided the desired address range is first loaded into the CS0 base address
register. After the V-bit is set for CS0 , global chip select can only be restarted with a
system reset.
After the SSP and the PC are fetched, the MBAR should be initialized, and the MBAR V-
bit should be set (CPU space address $0003FF00) with the desired base address for the
internal modules.