C8051F336/7/8/9
20.2. Assigning Port I/O Pins to Analog and Digital Functions
Port I/O pins P0.0 - P2.3 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 external interrupt functions should be configured for digital I/O.
20.2.1. Assigning Port I/O Pins to Analog Functions
Table 20.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 PnSKIP 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 20.1 shows
the potential mapping of Port I/O to each analog function.
Table 20.1. Port I/O Assignment for Analog Functions
Analog Function
PotentiallyAssignable
Port Pins
SFR(s) used for
Assignment
ADC Input
P0.0 - P2.3
AMX0P, AMX0N,
PnSKIP
Comparator0 Input
P0.0 - P2.3
P0.0
CPT0MX, PnSKIP
REF0CN, PnSKIP
IDA0CN, PnSKIP
OSCXCN, PnSKIP
OSCXCN, PnSKIP
Voltage Reference (VREF0)
Current DAC Output (IDA0)
P0.1
External Oscillator in Crystal Mode (XTAL1)
External Oscillator in RC, C, or Crystal Mode (XTAL2)
P0.2
P0.3
Rev. 0.2
129