Download ST10X167 USER`S MANUAL - REV

Transcript
ST10X167
DP0L (F100h / 80h)
ESFR
Reset Value: - - 00h
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
-
-
-
-
-
-
-
-
DP0L.7
DP0L.6
DP0L.5
DP0L.4
DP0L.3
DP0L.2
DP0L.1
DP0L.0
RW
RW
RW
RW
RW
RW
RW
RW
DP0H (F102h / 81h)
ESFR
15
14
13
12
11
10
9
8
7
-
-
-
-
-
-
-
-
DP0H.7
6
5
4
3
DP0H.6 DP0H.5 DP0H.4 DP0H.3
RW
Bit
DP0X.y
Reset Value: - - 00h
RW
RW
RW
RW
2
1
0
DP0H.2 DP0H.1 DP0H.0
RW
RW
RW
Function
Port direction register DP0H or DP0L Bit y
DP0X.y = 0: Port line P0X.y is an input (high-impedance)
DP0X.y = 1: Port line P0X.y is an output
6.2.1 - Alternate Functions of PORT0
When an external bus is enabled, PORT0 is used
as data bus or address/data bus.
Note that an external 8 Bit de-multiplexed bus only
uses P0L, while P0H is free for I/O (provided that
no other bus mode is enabled).
PORT0 is also used to select the system start-up
configuration. During reset, PORT0 is configured
to input, and each line is held high through an
internal pull-up device.
Each line can now be individually pulled to a low
level (see DC-level specifications in the respective
Data Sheets) through an external pull-down
device. A default configuration is selected when
the respective PORT0 lines are at a high level.
Through pulling individual lines to a low level, this
default can be changed according to the needs of
the applications.
The internal pull-up devices are designed such
that an external pull-down resistors (see Data
Sheet specification) can be used to apply a correct low level.
These external pull-down resistors can remain
connected to the PORT0 pins also during normal
operation, however, care has to be taken such that
they do not disturb the normal function of PORT0
(this might be the case, for example, if the external
resistor is too strong).
With the end of reset, the selected bus configuration will be written to the BUSCON0 register. The
configuration of the high Byte of PORT0, will be
copied into the special register RP0H.
This read-only register holds the selection for the
number of chip selects and segment addresses.
Software can read this register in order to react
78/294
according to the selected configuration, if required.
When the reset is terminated, the internal pull-up
devices are switched off, and PORT0 will be
switched to the appropriate operating mode.
During external accesses in multiplexed bus
modes PORT0 first outputs the 16 Bit intra-segment address as an alternate output function.
PORT0 is then switched to high-impedance input
mode to read the incoming instruction or data.
In 8 Bit data bus mode, two memory cycles are
required for Word accesses, the first for the low
Byte and the second for the high Byte of the Word.
During write cycles PORT0 outputs the data Byte
or Word after outputting the address. During external accesses in de-multiplexed bus modes PORT0
reads the incoming instruction or data Word or outputs the data Byte or Word (see Figure 26).
When an external bus mode is enabled, the direction of the port pin and the loading of data into the
port output latch are controlled by the bus controller hardware. The input of the port output latch is
disconnected from the internal bus and is
switched to the line labeled “Alternate Data Output” via a multiplexer. The alternate data can be
the 16 Bit intra-segment address or the 8/16 Bit
data information. The incoming data on PORT0 is
read on the line “Alternate Data Input”. While an
external bus mode is enabled, the user software
should not write to the port output latch, otherwise
unpredictable results may occur. When the external bus modes are disabled, the contents of the
direction register last written by the user becomes
active.