
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
TwinCAN Module
User’s Manual
21-89
V2.2, 2004-01
TwinCAN_X1, V2.1
shows the required register setting to configure the IO lines of the TwinCAN
module for operation.
Note: The ALTSEL1 registers of Port 7 and Port 4 are ‘don’t care’ for selecting the
TwinCAN alternate output function.
Table 21-9
TwinCAN IO Selection and Setup
Port Lines
Alternate Select
Register
Port Input Select
Register
Direction
Control
Register
IO
TwinCAN Node A
P4.5 / RxDCA
–
CAN_PISEL[2:0] =
000
DP4.P5 = 0
Input
P4.6 / TxDCA
ALTSEL0P4.P6 = 1
–
DP4.P6 = 1
Output
P4.7 / RxDCA
–
CAN_PISEL[2:0] =
001
DP4.P7 = 0
Input
P7.6 / RxDCA
–
CAN_PISEL[2:0] =
010
DP7.P6 = 0
Input
P7.7 / TxDCA
ALTSEL0P7.P7 = 1
–
DP7.P7 = 1
Output
P9.2 / RxDCA
–
CAN_PISEL[2:0] =
011
DP9.P2 = 0
Input
P9.3 / TxDCA
ALTSEL0P9.P3 = 1
and
ALTSEL1P9.P3 =1
–
DP9.P3 = 1
Output
TwinCAN Node B
P4.4 / RxDCB
–
CAN_PISEL[5:3] =
000
DP4.P4 = 0
Input
P4.7 / TxDCB
ALTSEL0P4.P7 = 1
–
DP4.P7 = 1
Output
P7.4 / RxDCB
–
CAN_PISEL[5:3] =
010
DP7.P4 = 0
Input
P7.5 / TxDCB
ALTSEL0P7.P5 = 1
–
DP7.P5 = 1
Output
P9.0 / RxDCB
–
CAN_PISEL[5:3] =
001
DP9.P0 = 0
Input
P9.1 / TxDCB
ALTSEL0P9.P1 = 1
and
ALTSEL1P9.P1 =1
–
DP9.P1 = 1
Output