C8051T600/1/2/3/4/5/6
22.2. Assigning Port I/O Pins to Analog and Digital Functions
Port I/O pins can be assigned to various analog, digital, and external interrupt functions. The Port pins
assigned to analog functions should be configured for analog I/O, and Port pins assigned to digital or exter-
nal interrupt functions should be configured for digital I/O.
22.2.1. Assigning Port I/O Pins to Analog Functions
Table 22.1 shows all available analog functions that require Port I/O assignments. Port pins selected for
these analog functions should have their corresponding bit in XBR0 set to 1. This reserves the pin
for use by the analog function and does not allow it to be claimed by the crossbar. Table 22.1 shows the
potential mapping of Port I/O to each analog function.
Table 22.1. Port I/O Assignment for Analog Functions
Analog Function
ADC Input
Comparator0 Input
Voltage Reference Input for ADC (VREF)
External Oscillator in RC or C Mode (EXTCLK)
Potentially Assignable
Port Pins
P0.0–P0.7
P0.0–P0.7
P0.0
P0.3
SFR(s) used for
Assignment
AMX0SL, XBR0
CPT0MX, XBR0
REF0CN, XBR0
OSCXCN, XBR0
22.2.2. Assigning Port I/O Pins to Digital Functions
Any Port pins not assigned to analog functions may be assigned to digital functions or used as GPIO. Most
digital functions rely on the crossbar for pin assignment; however, some digital functions bypass the cross-
bar in a manner similar to the analog functions listed above. Port pins used by these digital functions
and any Port pins selected for use as GPIO should have their corresponding bit in XBR0 set to 1.
Table 22.2 shows all available digital functions and the potential mapping of Port I/O to each digital func-
tion.
Table 22.2. Port I/O Assignment for Digital Functions
Digital Function
Potentially Assignable Port Pins
UART0, SMBus, CP0,
Any Port pin available for assignment by the
CP0A, SYSCLK, PCA0
crossbar. This includes P0.0 - P0.7 pins which
(CEX0-2 and ECI), T0 or T1. have their XBR0 bit set to 0.
Note: The crossbar will always assign UART0
pins to P0.4 and P0.5.
Any pin used for GPIO
P0.0–P0.7
SFR(s) used for
Assignment
XBR1, XBR2
XBR0
Rev. 1.2
109