English
Language : 

C8051F336_08 Datasheet, PDF (122/227 Pages) Silicon Laboratories – Mixed-Signal Byte-Programmable EPROM MCU
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
ADC Input
Potentially Assignable
Port Pins
P0.0 - P2.3
Comparator0 Input
P0.0 - P2.3
Voltage Reference (VREF0)
P0.0
Current DAC Output (IDA0)
P0.1
External Oscillator in Crystal Mode (XTAL1)
P0.2
External Oscillator in RC, C, or Crystal Mode (XTAL2)
P0.3
SFR(s) used for
Assignment
AMX0P, AMX0N,
PnSKIP, PnMDIN
CPT0MX, PnSKIP,
PnMDIN
REF0CN, PnSKIP,
PnMDIN
IDA0CN, PnSKIP,
PnMDIN
OSCXCN, PnSKIP,
PnMDIN
OSCXCN, PnSKIP,
PnMDIN
20.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
Crossbar 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
PnSKIP set to ‘1’. Table 20.2 shows all available digital functions and the potential mapping of Port I/O to
each digital function.
Table 20.2. Port I/O Assignment for Digital Functions
Digital Function
Potentially Assignable Port Pins
UART0, SPI0, SMBus, CP0, Any Port pin available for assignment by the
CP0A, SYSCLK, PCA0
Crossbar. This includes P0.0 - P2.3 pins which
(CEX0-2 and ECI), T0 or T1. have their PnSKIP 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 - P2.4
SFR(s) used for
Assignment
XBR0, XBR1
P0SKIP, P1SKIP,
P2SKIP
122
Rev.1.0