Freelance Electronics Components Distributor
Closed Dec 25th-26th
800-300-1968
We Stock Hard to Find Parts

C8051F041-GQ

Part # C8051F041-GQ
Description MCU 8BIT CISC 64KB FLASH 3V 64TQFP - Trays
Category IC
Availability In Stock
Qty 2
Qty Price
1 + $20.05559
Manufacturer Available Qty
SILICON LABORATORIES
Date Code: 0903
  • Shipping Freelance Stock: 2
    Ships Immediately



Technical Document


DISCLAIMER: The information provided herein is solely for informational purposes. Customers must be aware of the suitability of this product for their application, and consider that variable factors such as Manufacturer, Product Category, Date Codes, Pictures and Descriptions may differ from available inventory.

C8051F040/1/2/3/4/5/6/7
Rev. 1.5 91
7. 8-Bit ADC (ADC2, C8051F040/1/2/3 Only)
The ADC2 subsystem for the C8051F040/1/2/3 consists of an 8-channel, configurable analog multiplexer,
a programmable gain amplifier, and a 500 ksps, 8-bit successive-approximation-register ADC with inte-
grated track-and-hold (see block diagram in Figure 7.1). The AMUX2, PGA2, and Data Conversion Modes,
are all configurable under software control via the Special Function Registers shown in Figure 7.1. The
ADC2 subsystem (8-bit ADC, track-and-hold and PGA) is enabled only when the AD2EN bit in the ADC2
Control register (ADC2CN) is set to logic 1. The ADC2 subsystem is in low power shutdown when this bit is
logic 0. The voltage reference used by ADC2 is selected as described in Section “9. Voltage Reference
(C8051F040/2/4/6)” on page 113 for C8051F040/2 devices, or Section “10. Voltage Reference
(C8051F041/3/5/7)” on page 117 for C8051F041/3 devices.
Figure 7.1. ADC2 Functional Block Diagram
7.1. Analog Multiplexer and PGA
Eight ADC2 channels are available for measurement, as selected by the AMX2SL register (see SFR Defi-
nition 7.2). The PGA amplifies the ADC2 output signal by an amount determined by the states of the
AMP2GN2-0 bits in the ADC2 Configuration register, ADC2CF (SFR Definition 7.1). The PGA can be soft-
ware-programmed for gains of 0.5, 1, 2, or 4. Gain defaults to 0.5 on reset.
Important Note: AIN2 pins also function as Port 1 I/O pins, and must be configured as analog inputs when
used as ADC2 inputs. To configure an AIN2 pin for analog input, set to ‘0’ the corresponding bit in register
P1MDIN. Port 1 pins selected as analog inputs are skipped by the Digital I/O Crossbar. See Section
“17.1.5. Configuring Port 1, 2, and 3 Pins as Analog Inputs” on page 207 for more information on con-
figuring the AIN2 pins.
8-Bit
SAR
ADC
REF
+
-
AV+
8
AV+
AD2EN
SYSCLK
X
AGND
ADC2
ADC2CF
AMP2GN0
AMP2GN1
AD2SC0
AD2SC1
AD2SC2
AD2SC3
AD2SC4
AMX2SL ADC2CN
AD2CM0
AD2CM1
AD2CM2
AD2BUSY
AD2INT
AD2TM
AD2EN
Start Conversion
Timer 3 Overflow
Timer 2 Overflow
000
001
010
011
Write to AD2BUSY
CNVSTR
1xx
Write to AD0BUSY
(synchronized with
ADC0)
AMX2AD0
AMX2AD1
AMX2AD2
8-to-1
AMUX
AIN2.0 (P1.0)
AIN2.1 (P1.1)
AIN2.2 (P1.2)
AIN2.3 (P1.3)
AIN2.4 (P1.4)
AIN2.5 (P1.5)
AIN2.6 (P1.6)
AIN2.7 (P1.7)
+
-
+
-
+
-
+
-
AMX2CF
AIN01IC
AIN23IC
AIN45IC
AIN67IC
ADC2LTHADC2GTH
16
Dig
Comp
ADC Window
Interrupt
C8051F040/1/2/3/4/5/6/7
92 Rev. 1.5
7.2. ADC2 Modes of Operation
ADC2 has a maximum conversion speed of 500 ksps. The ADC2 conversion clock (SAR2 clock) is a
divided version of the system clock, determined by the AD2SC bits in the ADC2CF register (system clock
divided by (AD2SC + 1) for 0 AD2SC 31). The maximum ADC2 conversion clock is 7.5 MHz.
7.2.1. Starting a Conversion
A conversion can be initiated in one of five ways, depending on the programmed states of the ADC2 Start
of Conversion Mode bits (AD2CM2–0) in ADC2CN. Conversions may be initiated by the following:
•Writing a ‘1’ to the AD2BUSY bit of ADC2CN;
•A Timer 3 overflow (i.e., timed continuous conversions);
•A rising edge detected on the external ADC conver
t start signal, CNVSTR2 or CNVSTR0 (see
important note below);
•A Timer 2 overflow (i.e., timed continuous conversions);
•Writing a ‘1’ to the AD0BUSY of register ADC0CN (initiate conv
ersion of ADC2 and ADC0 with a
single software command).
An important note about external convert start (CNVSTR0 and CNVSTR2): If CNVSTR2 is enabled in the
digital crossbar (Section “17.1. Ports 0 through 3 and the Priority Crossbar Decoder” on page 204),
CNVSTR2 will be the external convert start signal for ADC2. However, if only CNVSTR0 is enabled in the
digital crossbar and CNVSTR2 is not enabled, then CNVSTR0 may serve as the start of conversion for
both ADC0 and ADC2. This permits synchronous sampling of both ADC0 and ADC2.
During conversion, the AD2BUSY bit is set to logic 1 and restored to 0 when conversion is complete. The
falling edge of AD2BUSY triggers an interrupt (when enabled) and sets the interrupt flag in ADC2CN. Con-
verted data is available in the ADC2 data word, ADC2.
When a conversion is initiated by writing a ‘1’ to AD2BUSY, it is recommended to poll AD2INT to determine
when the conversion is complete. The recommended procedure is:
Step 1. Write a ‘0’ to AD2INT;
Step 2. Write a ‘1’ to AD2BUSY;
Step 3. Poll AD2INT for ‘1’;
Step 4. Process ADC2 data.
7.2.2. Tracking Modes
According to Table 7.2, each ADC2 conversion must be preceded by a minimum tracking time for the con-
verted result to be accurate. The AD2TM bit in register ADC2CN controls the ADC2 track-and-hold mode.
In its default state, the ADC2 input is continuously tracked, except when a conversion is in progress. When
the AD2TM bit is logic 1, ADC2 operates in low-power tracking mode. In this mode, each conversion is pre-
ceded by a tracking period of 3 SAR clocks (after the start-of-conversion signal). When the CNVSTR2 (or
CNVSTR0, See Section 7.2.1 above) signal is used to initiate conversions in low-power tracking mode,
ADC2 tracks only when CNVSTR2 is low; conversion begins on the rising edge of CNVSTR2 (see
Figure 7.2). Tracking can also be disabled (shutdown) when the entire chip is in low power standby or
sleep modes. Low-power Track-and-Hold mode is also useful when AMUX or PGA settings are frequently
changed, due to the settling time requirements described in Section “7.2.3. Settling Time Require-
ments” on page 94.
C8051F040/1/2/3/4/5/6/7
Rev. 1.5 93
Figure 7.2. ADC2 Track and Conversion Example Timing
Write '1' to AD2BUSY,
Timer 3 Overflow,
Timer 2 Overflow,
Write '1' to AD0BUSY
(AD2CM[2:0]=000, 001, 011, 0xx)
AD2TM=1
AD2TM=0
SAR2 Clocks
123456789101112
123456789
SAR2 Clocks
Track Convert Low Power Mode
Low Power
or Convert
Track or
Convert
Convert Track
B. ADC Timing for Internal Trigger Source
123456789
CNVSTR2/CNVSTR0
(AD2CM[2:0]=010)
AD2TM=1
A. ADC Timing for External Trigger Source
SAR2 Clocks
Track or Convert Convert TrackAD2TM=0
Track Convert Low Power Mode
Low Power
or Convert
PREVIOUS2425262728293031323334353637NEXT