User’s Manual
C166S V1 SubSystem
Parallel Ports
User’s Manual
7-3
V 1.6, 2001-08
way the direction of the pin is switched and depending on whether the pin is accessible
by the user software or not in the alternate function mode.
All port lines that are not used for these alternate functions may be used as general
purpose IO lines. When using port pins for general purpose output, the initial output
value should be written to the port register prior to enabling the output drivers, in order
to avoid undesired transitions on the output pins. This applies to single pins as well as
to pin groups (see examples below).
OUTPUT_ENABLE_SINGLE_PIN:
BSET
P4.0
;Initial output level is ’high’
BSET
DP4.0
;Switch on the output driver
OUTPUT_ENABLE_PIN_GROUP:
BFLDL
P4, #05H, #05H
;Initial output level is ’high’
BFLDL
DP4, #05H, #05H
;Switch on the output drivers
Note: When using several BSET pairs to control more pins of one port, these pairs must
be separated by instructions, which do not reference the respective port (see
Section 3.8.1
“Particular Pipeline Effects” in chapter “The Central Processing
Unit”).
Each of these ports and the alternate input and output functions are described in detail
in the following subsections.
7.2
PORT0
The two 8-bit ports P0H and P0L represent the higher and lower part of PORT0,
respectively. Both halfs of PORT0 can be written (e.g. via a PEC transfer) without
effecting the other half.
If this port is used for general purpose IO, the direction of each line can be configured
via the corresponding direction registers DP0H and DP0L.
P0L
PORT0 Low Register
SFR (FF00
H
/80
H
Reset value: - - 00
H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
P0L
.7
P0L
.6
P0L
.5
P0L
.4
P0L
.3
P0L
.2
P0L
.1
P0L
.0
-
-
-
-
-
-
-
-
rw
rw
rw
rw
rw
rw
rw
rw
Содержание C166S V1 SubSystem
Страница 10: ...User s Manual C166S V1 SubSystem User s Manual I 6 V 1 6 2001 08...
Страница 16: ...User s Manual C166S V1 SubSystem Introduction User s Manual 1 6 V 1 6 2001 08...
Страница 126: ...User s Manual C166S V1 SubSystem Central Processing Unit User s Manual 3 96 V 1 6 2001 08...
Страница 178: ...User s Manual C166S V1 SubSystem Memory Organization User s Manual 4 52 V 1 6 2001 08...
Страница 206: ...User s Manual C166S V1 SubSystem Instruction Set User s Manual 5 28 V 1 6 2001 08...
Страница 306: ...User s Manual C166S V1 SubSystem Detailed Instruction Set User s Manual 6 100 V 1 6 2001 08...
Страница 362: ...User s Manual C166S V1 SubSystem The External Bus Interface User s Manual 8 40 V 1 6 2001 08...
Страница 452: ...User s Manual C166S V1 SubSystem General Purpose Timer Unit User s Manual 12 44 V 1 6 2001 08...
Страница 454: ...User s Manual C166S V1 SubSystem Instruction Index User s Manual 13 2 V 1 6 2001 08...
Страница 459: ......