
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
TwinCAN Module
User’s Manual
21-85
V2.2, 2004-01
TwinCAN_X1, V2.1
21.3.2.2
Port Registers
The port registers required to program to TwinCAN operation are listed as follows.
ALTSEL0P4
P4 Alternate Select Register 0
Reset Value: 0000
H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0
P7
P6
0
r
rw
rw
r
Field
Bit
Type
Description
ALTSEL0
P4.y
6, 7
rw
P4 Alternate Select Register 0 bit y
0
associated peripheral output is not selected as
alternate function
1
associated peripheral output is selected as
alternate function
DP4
P4 Direction Ctrl. Register
Reset Value: 0000
H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0
P7
P6
P5
P4
P3
P2
P1
P0
r
rw
rw
rw
rw
rw
rw
rw
rw
Field
Bit
Type
Description
DP4.y
7 … 4
rw
Port Direction Register DP4 Bit y
0
Port line P4.y is an input
(high-impedance)
1
Port line P4.y is an output