C8051F41x devices are fully integrated, low power, mixed-signal system-on-a-chip MCUs. Highlighted features are listed below. Refer to Table 1.1 for specific product feature selection.
•High-speed pipelined 8051-compatible microcontroller core (up to 50 MIPS)
•SMBus/I2C, Enhanced UART, and SPI serial interfaces implemented in hardware
•Four general-purpose 16-bit timers
•Programmable Counter/Timer Array (PCA) with six capture/compare modules and Watchdog Timer
function
•Hardware smaRTClock (Real Time Clock) operates down to 1 V with 64 bytes of Backup RAM and a
Backup Voltage Regulator
•Hardware CRC Engine
•On-chip Power-On Reset, VDD Monitor, and Temperature Sensor
•On-chip Voltage Comparators
•Up to 24 Port I/O
With on-chip Power-On Reset, VDD monitor, Watchdog Timer, and clock oscillator , the C8051F41x devices
are truly standalone system-on-a-chip solutions. Th e Fl as h m emo ry c an be re progr am med ev en in -c irc ui t,
providing non-volati le data storage , and also allow ing field upg rades of the 8051 firmware. U ser software
has complete contr ol of all peripherals, a nd may individually shut down any or all peripher als for power
savings.
The on-chip Silicon Laboratories 2-Wire (C2) Development Interface allows non-intrusive (uses no on-chip
resources), full speed, in-circuit debugging using the production MCU installed in the final application. This
debug logic supports inspection and modification of memory and registers, setting breakpoints, single
stepping, run and halt commands. All a nalog and digital peripheral s are fully function al while debugging
using C2. The two C2 i nterface pins can be shared with us er functions, allowi ng in-system pro gramming
and debugging without occupying package pins.
Each device is specified for 2.0-to-2.75 V operation (supply voltage can be up to 5.25 V using on-chip regulator) over the industrial temperature range (–45 to +85 °C). The C8051F41x are available in 28-pin QFN
(also referred to as MLP or MLF) or 32-pin LQFP packages.
The C8051F41x devices use Silicon Laboratories’ proprietary CIP-51 microcontroller core. The CIP-51 is
fully compatible with the MCS-5 1™ instruc tion se t. Standard 803x/805x assembl ers and compile rs can be
used to develop software. The C8051F41x family has a superset of all the peripherals included with a stan
dard 8052.
1.1.2. Improved Throughput
The CIP-51 employs a pipelined architecture that greatly increases its instruction throughput over the standard 8051 architecture. In a standard 8051, all ins truction s except for MU L and DIV take 12 or 24 syste m
clock cycles to execute, and usually have a maximum system clock of 12-to-24
51 core executes 70% of its instructions in one or two system clock cycles, with no instructions taking more
than eight system clock cycles.
With the CIP-51's system clock running at 50 MHz, it has a peak throughput of 50 MIPS. The CIP-51 has a
total of 109 instructions. The table below shows the total number of instructions that require each execution
time.
MHz. By contrast, the CIP-
-
Clocks to Execute122/433/5454/668
Number of Instructions2650510752121
1.1.3. Additional Features
The C8051F41x SoC famil y includes several key enhancements to the CIP-51 co re and peripherals to
improve performance and ease of use in end applications.
An extended interrupt handler allows the numerous analog and digital peripherals to operate independently of the controller core and interrupt the controller only when necessary. By requiring less intervention
from the microcontrol ler co re, an interru pt-driv en sy stem is more efficient and a llows for eas ier impl emen
tation of multi-tasking, real-time systems.
Eight reset sources are available: power-on reset ci rcuitry (POR), an on-chip VDD monitor, a Watchdog
Timer, a Missing Clock Detector, a voltage level detection from Comparator0, a smaRTClock alarm or
missing smaRTClock cl ock detector reset, a forced software reset, an ex ternal reset pin, and an illegal
Flash access protection circuit. Each reset source except for the POR, Reset Input Pin, or Flash error may
be disabled by the user in so ftware. The WDT may be permanently enab led in software after a pow er-on
reset during MCU initialization.
The internal oscillator is factory calibrated to 24.5 MHz ±2%. An external oscillator drive circuit is also
included, allowing an external crystal, ceramic resonator, capacitor , RC, or CMOS clock source to generate
the system clock. A clock multiplier allows for operation at up to 50
lator can be extremel y useful in low power applications, allowi ng the system to maintain accurate time
while the MCU is not po wered, or its internal oscillator is sus pended. The MCU ca n be reset or have its
oscillator awakened using the smaRTClock alarm function.
MHz. The dedicated smaRTClock oscil-
-
Rev. 1.025
C8051F410/1/2/3
1.2.On-Chip Debug Circuitry
The C8051F41x devices include on-chip Silicon La boratories 2-Wire (C2) debug circuitry that provides
non-intrusive, full speed, in-circuit debugging of the production part installed in the end application.
Silicon Laboratories’ debugging system supports inspection and modification of memory and registers,
breakpoints, and single stepping . No addi tional targe t RAM, prog ram memo ry, timers, or communications
channels are required. All the digital and analog peripherals are functional and work correctly while debug
ging. All the peripherals (except for the ADC and SMBus) are stalled when the MCU is halted, during single
stepping, or at a breakpoint in order to keep them synchronized.
The C8051F410DK development kit provides all the hardware and software necessary to develop application code and perfo rm in-circuit debugging wi th the C8051F41x MCUs. The k it includes software with a
developer's studio and debugger, a USB debug adapter, a target applicati on board with the associated
MCU installed, and the required cables and wall-mount power supply. The development kit requires a com
puter with Windows®98 SE or later installed . As shown in Figure 1.5, the PC is connected to the USB
debug adapter. A six-inch ribbon cable connects th e USB debug ad apter to the user's application boa rd,
picking up the two C2 pins and GND.
The Silicon Labor atories ID E interface is a vastly superior deve loping a nd debugging configuration, compared to standard MCU em ulators that use on-b oard "ICE Chi ps" and requi re the MCU in the app lication
board to be socketed. Sil icon La bor ato rie s’ de bug paradi gm i ncre ases ease of use and preserves the per
formance of the precision analog peripherals.
-
-
-
WINDOWS 98 SE or later
Silicon Laboratories Integrated
Development Environment
USB
Debug
Adapter
C2 (x2), GND
VDD GND
C8051F41x
TARGET PCB
Figure 1.5. Development/In-System Debug Diagram
26Rev. 1.0
C8051F410/1/2/3
1.3.On-Chip Memory
The CIP-51 has a standa rd 8051 program and data addr ess configuration. It inc ludes 256 bytes of data
RAM, with the upper 128 bytes dual-mapped. Indirect addressing accesses the upper 128 bytes of general
purpose RAM, and d irect addr essing a ccesses the 128-by te SFR add ress space. The lower 128 bytes of
RAM are accessible via direct and indirect addressing. The first 32 bytes are addressable as four banks of
general purpose registers, and the next 16 bytes can be byte addressable or bit addressable.
Program memory con sists of 32 kB (‘F410/1) or 16 kB (‘F41 2/3) of Flash. This memory may be reprogrammed in-system in 512 byte sectors and requires no special off-chip programming voltage.
PROGRAM/DATA MEMORY
(Flash)
‘F410/1
0x7E00
0x7DFF
0x0000
0x4000
0x3FFF
RESERVED
32 kB Flash
(In-System
Programmab le in 51 2
Byte Sectors)
‘F412/3
RESERVED
16 kB Flash
(In-System
Programmable in 512
Byte Sectors)
0xFF
0x80
0x7F
0x30
0x2F
0x20
0x1F
0x00
DATA MEMORY (RAM)
INTERNAL DATA ADDRESS SPACE
Upper 128 RAM
(Indirect Addressing
Only)
(Direct and Indirect
Addressing)
Bit Addressable
General Purpose
Registers
Special Function
Register's
(Direct Addressing Only)
Lower 128 RAM
(Direct and Indirect
Addressing)
EXTERNAL DATA ADDRESS SPACE
0xFFFF
Same 2048 bytes as from
0x0000 to 0x07FF, wrapped
on 2048-byte boundaries
0x0800
0x07FF
XRAM - 2048 Bytes
(accessible using MOVX
instruction)
0x0000
0x0000
Figure 1.6. Memory Map
Rev. 1.027
C8051F410/1/2/3
1.4.Operating Modes
The C8051F41x devices have four operating modes: Active (Normal), Idle, Suspend, and Stop. Active
mode occurs during normal ope ration when the oscillator and peri pherals are active. Idle mode halts the
CPU while leaving the peripherals and internal clocks active. Suspend mode halts SYSCLK until a waken
ing event occurs, which also halts all peripherals using SYSCLK. In Stop mode, the CPU is halted, all interrupts and timers are inactive, and the internal oscillator is stopped. The various operating modes are
described in
Table 1.2 below:
Table 1.2. Operating Modes Summary
-
Active
Idle
Suspend
Stop
Properties
•SYSCLK active
•CPU active (accessing Flash)
•Peripherals active or inactive
depending on user settings
•smaRTClock active or inactive
•SYSCLK active
•CPU inactive (not accessing
Flash)
•Peripherals active or inactive
depending on user settings
•smaRTClock active or inactive
•SYSCLK inactive
•CPU inactive (not accessing
Flash)
•Peripherals enabled (but not
operating) or disabled depend
ing on user settings
•smaRTClock active or inactive
•SYSCLK inactive
•CPU inactive (not accessing
Flash)
•Digital peripherals inactive;
analog peripherals enabled
(but not operating) or disabled
depending on user settings
•smaRTClock inactive
Power
Consumption
Full——
Less than FullIDLE
LowSUSPEND
-
Very lowSTOP
How
Entered?
(PCON.0)
(OSCICN.5)
(PCON.1)
How Exited?
Any enabled
interrupt or
device reset
Wakening
event or exter
nal/MCD reset
External or
MCD reset
-
See Section“10.3. Power Management Modes” on page 101 for Idle and Stop mode details. See Sec-
tion“19.1.1. Internal Oscillator Suspend Mode” on page 166 for more information on Suspend mode.
28Rev. 1.0
C8051F410/1/2/3
1.5.12-Bit Analog to Digital Converter
The C8051F41x devices include an on-ch ip 12-bit SAR ADC wit h a 27-channel single -ended input mul tiplexer and a maximum throughput of 200 ksps. The ADC system includes a configurable analog m ultiplexer that selects the positive ADC input, which is measured with respect to GND. Ports 0–2 are available
as ADC inputs; additionally, the on-chip Temperature Sensor output and the co re sup ply vo ltage (V
available as ADC inputs. User firmware may shut down the ADC or use it in Burst Mode to save power.
Conversions can be started in four wa ys: a s oftware comman d, an ove rf low of Timer 2 or 3, or an ex ternal
convert start signal. This flexibility allows the start of conversion to be triggered by software events, a peri
odic signal (timer ov erfl ows ), or ex ternal HW si gn als . Co nv ersi on c om pl eti ons ar e i ndicated by a status bit
and an interrupt (if enab led ) and occ ur a fter 1, 4 , 8, o r 1 6 s amp le s h av e be en ac cumulated by a hardware
accumulator. The resulting data word is latched into the ADC data SFRs upon completion of a conversion.
When the system clo ck is slow, Burst Mode allows ADC0 to automa tically wake from a low pow er shut
down state, acquire and accu mulate samples, then re-enter the low power shutdown state without CPU
intervention.
Window compare registers for the ADC data can be configured to interrupt the controller when ADC data is
either within or o utside of a specified range. Th e ADC can monitor a key v oltage continuously in back
ground mode, but not interrupt the controller unless the converted data is within/outside the specified
range.
The C8051F41x devices in cl ude two 12-bit current-mode Digital-to-Analog Con verte rs (ID ACs ). Th e max imum current output of the IDACs can be adjusted for four different current settings; 0 .25 mA, 0.5 mA,
1
mA, and 2 mA. A flexible output update mechanism allows for seamless full-scale changes, and supports
jitter-free updates for waveform generation. The IDAC outputs can be merged onto a single port I/O pin for
increased full -scale current ou tput or increase d resolution. IDAC updates can be p erformed on-dem and,
scheduled on a Timer overflow, or synchronized with an external signal.
of the IDAC circuitry.
Figure 1.8 shows a block diagram
Rev. 1.029
C8051F410/1/2/3
nt
t
1
nt
t
1
Data Write
Timer 0
Timer 1
Timer 2
Timer 3
CNVSTR
2-bit Digital
12
Input
2-bit Digital
12
Input
Data Write
Timer 0
Timer 1
Timer 2
Timer 3
CNVSTR
Figure 1.8. IDAC Block Diagram
1.7.Programmable Compa rat ors
12
IDA0
Latch
12
IDA1
Latch
Curre
Outpu
Curre
Outpu
C8051F41x devices include two software-configurable voltage comparators with an input multiplexer. Each
comparator offers programmable response time and hyst eresis and two outputs that are opti onally avail
able at the Port pins: a synchrono us “latched” output (CP0 and CP1), or an asynch ronous “raw” output
(CP0A and CP1A). Co mparator interrupts may be generated on rising, falling, or both edges. When in
IDLE or SUSPEND mode, these interrupts may be used as a “wake-up” source for the processor.
Comparator0 may also be conf igured as a reset source. A block diagram of the comparato r is shown in
Figure 1.9.
-
30Rev. 1.0
VDD
)
t)
)
t)
C8051F410/1/2/3
Inter rupt
Logic
Port I/O
Pins
Port I/O
Pins
Multiplexer
Multiplexer
+
-
+
-
GND
VDD
GND
Reset
Decision
Tree
SET
D
Q
CLR
Q
(SYNCHRONIZER)
SET
D
CLR
Inter rupt
SET
D
Q
CLR
Q
(SYNCHRONIZER)
SET
D
CLR
Q
Q
Logic
Q
Q
CP0
(synchronous output
CP0A
(asynchronous outpu
CP1
(synchronous output
CP1A
(asynchronous outpu
Figure 1.9. Comparator s Block Diagram
1.8.Cyclic Redundancy Check Unit
C8051F41x devices include a cyclic redundancy check unit (CRC0) that can perform a CRC using a 16-bit
or 32-bit polynomial . CRC0 accepts a stream of 8-bit data and out puts a 16-bi t o r 32-bi t r esul t. CRC 0 al s o
has a hardware bit reverse feature for quick data manipulation.
1.9.Voltage Regulator
C8051F41x devices incl ude an on-chip low dropout voltage regul ator (REG0). The input to REG0 at the
V
enabled, the output of REG0 powers the device and drives the V
to power external devices connected to V
pin can be as high as 5.25 V. The output can be selecte d by software to 2.0 V or 2.5 V. W h e n
REGIN
pin. The vol t ag e r egu la t or c an be used
DD
.
DD
1.10. Serial Ports
The C8051F41x Family includ es an SMBus/I2C interface, a full-duplex UA RT with enhanced baud rate
configuration, an d an Enhanced S PI interface. Eac h of the seri al buses is full y implemented in hardware
and makes extensive use of the CIP-51's interrupts, thus requiring very little CPU intervention.
Rev. 1.031
C8051F410/1/2/3
1.11. smaRTClock (Real Time Clock)
C8051F41x device s include a smaRTClock Peripher al (Real Time Clock). The smaRTClock has a ded icated 32 kHz o scilla tor th at c an be co nfi gured for u se wi th o r with out a crystal, a 47-bit smaRTClock ti mer
with alarm, a backup supply regulator, and 64
(V
RTC-BACKUP
age (VDD) is lost.
The smaRTClock allows a maximum of 137 year 47-bit independent time-keeping when used with a
32.768
Clock from the backup s upply when the voltage at V
alarm and missing cloc k detector can interrupt the CIP-51, wake the internal oscillator from SUSPEND
mode, or generate a device reset if the smaRTClock timer reaches a pre-set value or the oscillator stops.
kHz Watch Crystal and backup supply voltage of at least 1 V. The switchover logic powers smaRT-
) is powered, the smaRTClock peripheral remains fully functional even if the core supply volt-
bytes of backup SRA M. When the backup su pply voltage
RTC-BACKUP
is greater than VDD. The smaRTClock
XTAL4
smaRTCloc k Os cillator
smaRTClock State Machine
64B
Backup RAM
Backup
Regulator
Switchover
Logic
XTAL3
Interrupt
Internal
Registers
CAPTUREn
RTC0CN
RTC0XCN
ALARMn
RAMADDR
RAMDATA
smaRTClock
47-Bit
smaRTClock
Timer
Interface
Registers
RTC0KEY
RTC0ADR
RTC0DAT
CIP-51 CPU
V
DD
V
RTC-BACKUP
Figure 1.10. smaRTClock Block Diagram
32Rev. 1.0
C8051F410/1/2/3
1.12. Port Input/Output
C8051F41x devices include up to 24 I/O pins. Port pins a re organized as three byte-w ide ports. The p ort
pins behave like ty pi ca l 805 1 p or ts wi th a fe w e nha nc eme nts. E ac h p ort p in can be c onfi gur ed a s a dig ital
or analog I/O pin. Pins se lec te d as dig ital I/O c an be con figured for push-pull or open-dr ai n op erati on. The
“weak pullups” that are fixed on typical 8051 devices may be individually or globally disabled to save
power.
The Digital Crossbar allows mapping of internal digital system resources to port I/O pins. On-chip
counter/timers, ser ial bu ses, hardware i nte rrupts, and oth er dig ital signals can be c onfigu red to a ppear on
the port pins using the Cr ossbar cont rol regis ters. This a llows the us er to select the exact m ix of genera lpurpose port I/O, digital, and analog resources needed for the application.
Highest
Priority
Lowest
Priority
XBR0, XBR1,
PnSKIP Registers
Priority
Decoder
UART
SPI
SMBus
2
4
2
Digital
Crossbar
CP0
CP1
Outputs
SYSCLK
(Internal Digital Signals)
PCA
T0, T1
P0
(P0.0-P0.7)
P1
(P1.0-P1.7)
4
7
2
8
8
P0MASK, P0MATCH
P1MASK, P1MATCH
Registers
PnMDIN Registers
8
8
8
P0
I/O
Cells
P1
I/O
Cells
P2
I/O
Cell
P2.3–2.6 available on
C8051F410/2
PnMDOUT,
P0.0
P0.7
P1.0
P1.7
P2.0
P2.7
(Port Latches)
P2
(P2.0-P2.7)
8
Figure 1.11. Port I/O Functional Block Diagram
Rev. 1.033
C8051F410/1/2/3
1.13. Programmable Counter Array
The Programmable Count er Arr ay (PCA0 ) provi des en hance d timer functiona lity while req uiri ng less CP U
intervention than the standard 80 51 counter/tim ers. The PCA con sists of a dedicated 16 -bit counter/timer
and six 16-bit capture/co mpare modules. The counter/timer is driven by a programmable timebase that
can select betwee n seven sources: syst em clock, system clock di vided by four, system clock divided by
twelve, the external os cil la tor cl ock source divided by 8, real- tim e c loc k source divided by 8, Timer 0 over
flow, or an external clock signal on the External Clock Input (ECI) pin.
Each capture/com pare module may be configured to operate independently in o ne of six modes: EdgeTriggered Capture, Software Timer, High-Speed Output, Frequency Output, 8-Bit P WM, or 16-Bit PWM.
Additionally, PCA Module 5 may be u sed as a watchd og t imer (WDT ), an d is enab le d in this mode fo llow
ing a system reset. The PCA Cap tur e/Co mpare Modu le I/O and the Ex terna l Clo ck Input may be routed to
Port I/O using the digital crossbar.
SYSCLK/12
SYSCLK/4
Timer 0 Overflow
ECI
SYSCLK
External Clock/8
smaRTClock/8
PCA
CLOCK
MUX
16-Bit Counter/Timer
-
-
Capture/Compare
Module 0
ECI
CEX0
Capture/Compare
Module 1
CEX1
Capture/Compare
Module 2
CEX2
Capture/Compare
Module 3
CEX3
Capture/Compare
Module 4
CEX4
Capture/Compare
Module 5
CEX5
Crossbar
Port I/O
Figure 1.12. PCA Block Diagram
34Rev. 1.0
C8051F410/1/2/3
2.Absolute Maximum Ratings
Table 2.1. Absolute Maximum Ratings*
ParameterConditionsMinTypMaxUnits
Ambient temperature under bias–55—125°C
Storage Temperature–65—150°C
Voltage on V
Voltage on V
Voltage on V
Voltage on XTAL1 with respect to GND–0.3—V
Voltage on XTAL3 with respect to GND–0.3—5.5V
with respect to GND–0.3—5.5V
REGIN
with respect to GND–0.3—3.0V
DD
RTC-BACKUP
with respect to GND–0.3—5.5V
+ 0.3V
DD
Voltage on any Port I/O Pin (except Port 0 pins) or
RST
with respect to GND
–0.3—V
+ 0.3V
IO
Voltage on any Port 0 Pin with respect to GND0.3—5.5V
Maximum output current sunk by any Port pin——100mA
Maximum output current sourced by any Port pin——100mA
Maximum Total current through V
V
RTC-BACKUP
*Note: S tre sses abov e those lis ted under “Abs olute Maxim um Ratin gs” may cau se permanent d amage to the device.
, V
This is a stress rating only and f unctional operation of the devi ces at th ose or any other cond itions ab ove those
indicated in the o peration l istings of this spe cificati on is not implied. Exposur e to maxim um rating conditio ns for
extended periods may affect device reliability.
REGIN
, and GND
DD
, VIO,
——500mA
Rev. 1.035
C8051F410/1/2/3
3.Global DC Electrical Characteristics
Table 3.1. Global DC Electrical Characteristics
–40 to +85 °C, 50 MHz System Clock unless otherwise specified. Typical values are given at 25 °C
ParameterConditionsMinTypMaxUnits
Supply Input Voltage (V
REGIN
1
)
Core Supply Voltage (VDD)2.0—2.75V
I/O Supply Voltage (VIO)2.0—5.25V
Output Current = 1 mA2.15—5.25V
Backup Supply Voltage (V
RTC-BACKUP
Backup Supply Current
(I
RTC-BACKUP
(V
= 0 V, smaRTClock clock = 32 kHz)
DD
)
2
)
V
RTC-BACKUP
= 1.0 V:
at –40 ºC
at 25 ºC
at 85 ºC
V
RTC-BACKUP
= 1.8 V:
at –40 ºC
at 25 ºC
at 85 ºC
V
RTC-BACKUP
= 2.5 V:
at –40 ºC
at 25 ºC
at 85 ºC
1.0—5.25V
—
—
—
—
—
—
—
—
—
0.65
0.9
1.4
0.7
0.92
1.45
0.72
0.95
1.5
1.5
1.8
2.5
—
—
—
1.6
1.85
2.6
µA
µA
µA
µA
µA
µA
µA
µA
µA
Core Supply RAM Data Retention Voltage—1.5—V
SYSCLK (System Clock)
3,4
0—50MHz
Specified Operating Temperature Range–40—+85°C
Notes:
1. For more information on V
2. The Backup Supply Voltage (V
characteristics, see Table 8.1 on page 82.
REGIN
RTC-BACKUP
) is used to power the smaRTClock peripheral only.
3. SYSCLK is the internal device clock. For operational speeds in excess of 25 MHz, SYSCLK must
be derived from the internal clock multiplier.
4. SYSCLK must be at least 32 kHz to enable debugging.
5. Based on device character izati on data, not producti on tes ted.
6. Active and Inactive IDD at voltages and frequencies other than those specified can be calculated
using the IDD Supply Sensitivity. For example, if the V
I
= 5.5 mA typical at 2.0 V and f = 25 MHz. From this, IDD = 5.5 mA + 1.14 x (2.2 V –
DD
is 2.2 V instead of 2.0 V at 25 MHz:
DD
2.0 V) = 5.73 mA at 2.2 V and f = 25 MHz.
7. I
can be estimated for frequencies < 15 MHz by simply multiplying the frequency of interest by the
DD
frequency sensitivity number for that range. When using these numbers to estimate I
15
MHz, the estimate should be the current at 25 MHz minus the difference in current indicated by
the frequency sensitivity number. For example: V
= 2.0 V; F = 20 MHz, IDD = 5.5 mA – (25 MHz –
DD
DD
for >
20 MHz) x 0.16 mA/MHz = 4.7 mA.
8. Idle IDD can be estimated for frequencies < 1 MHz by simply multiplying the frequency of interest by
the frequency sensitivity number for that range. When using these numbers to estimate Idle for >
1
MHz, the estimate should be the current at 25 MHz minus the difference in current indica ted by
the frequency sensitivity number. For example: V
= 2.0 V; F = 5 MHz, Idle IDD = 2.8 mA –
DD
(25 MHz – 5 MHz) x 0.1 mA/MHz = 0.8 mA.
36Rev. 1.0
C8051F410/1/2/3
Table 3.1. Global DC Electrical Characteristics (Continued)
–40 to +85 °C, 50 MHz System Clock unless otherwise specified. Typical values are given at 25 °C
ParameterConditionsMinTypMaxUnits
Digital Supply Current—CPU Active (Normal Mode, fetching instructions from Flash)
Core Supply Current (IDD)
5
VDD = 2.0 V:
F = 32 kHz
F = 1 MHz
F = 25 MHz
F = 50 MHz
—
—
—
—
13
0.30
5.5
9.5
30
0.5
6.5
12
VDD = 2.5 V:
Supply Sensitivity (IDD)
5,6
Frequency Sensitivity (IDD)
5,7
F = 32 kHz
F = 1 MHz
F = 25 MHz
F = 50 MHz
F = 25 MHz
F = 1 MHz
VDD = 2.0 V:
F < 15 MHz, T = 25 ºC
F > 15 MHz, T = 25 ºC
—
—
—
—
—
—
—
—
17
0.43
8.3
13.5
114
100
0.27
0.16
40
0.65
9.5
15
—
—
—
—
mA/MHz
mA/MHz
VDD = 2.5 V:
F < 15 MHz, T = 25 ºC
F > 15 MHz, T = 25 ºC
—
—
0.39
0.2
—
—
mA/MHz
mA/MHz
Notes:
1.
For more information on V
2. The Backup Supply Voltage (V
characteristics, see Table 8.1 on page 82.
REGIN
RTC-BACKUP
) is used to power the smaRTClock peripheral only.
3. SYSCLK is the internal device clock. For operational speeds in excess of 25 MHz, SYSCLK must
be derived from the internal clock multiplier.
4. SYSCLK must be at least 32 kHz to enable debugging.
5. Based on device character izati on data, not producti on tes ted.
6. Active and Inactive IDD at voltages and frequencies other than those specified can be calculated
using the IDD Supply Sensitivity. For example, if the V
I
= 5.5 mA typical at 2.0 V and f = 25 MHz. From this, IDD = 5.5 mA + 1.1 4 x (2.2 V –
DD
is 2.2 V instead of 2.0 V at 25 MHz:
DD
2.0 V) = 5.73 mA at 2.2 V and f = 25 MHz.
7. I
can be estimated for frequencies < 15 MHz by simply multiplying the frequency of interest by the
DD
frequency sensitivity number for that range. When using these numbers to estimate I
DD
for >
15 MHz, the estimate should be the current at 25 MHz minus the difference in current indicated by
the frequency sensitivity number. For example: V
= 2.0 V; F = 20 MHz, IDD = 5.5 mA – (25 MHz –
DD
20 MHz) x 0.16 mA/MHz = 4.7 mA.
8. Idle IDD can be estimated for frequencies < 1 MHz by simply multiplying the frequency of interest by
the frequency sensitivity number for that range. When using these numbers to estimate Idle for >
1 MHz, the estimate should be the current at 25 MHz minus the difference in current indicated by
the frequency sensitivity number. For example: V
= 2.0 V; F = 5 MHz, Idle IDD = 2.8 mA –
DD
(25 MHz – 5 MHz) x 0.1 mA/MHz = 0.8 mA.
µA
mA
mA
mA
µA
mA
mA
mA
%/V
%/V
Rev. 1.037
C8051F410/1/2/3
Table 3.1. Global DC Electrical Characteristics (Continued)
–40 to +85 °C, 50 MHz System Clock unless otherwise specified. Typical values are given at 25 °C
ParameterConditionsMinTypMaxUnits
Digital Supply Current—CPU Inactive (Idle Mode, not fetching instructions from Flash)
Core Supply Current (IDD)
5
VDD = 2.0 V:
F = 32 kHz
F = 1 MHz
F = 25 MHz
F = 50 MHz
VDD = 2.5 V:
F = 32 kHz
F = 1 MHz
F = 25 MHz
F = 50 MHz
Supply Sensitivity (IDD)
5,6
F = 25 MHz
F = 1 MHz
Frequency Sensitivity (IDD)
5,8
VDD = 2.0 V:
F < 1 MHz, T = 25 ºC
F > 1 MHz, T = 25 ºC
VDD = 2.5 V:
F < 1 MHz, T = 25 ºC
F > 1 MHz, T = 25 ºC
Digital Supply Current (Suspend Mode)Oscillator not running,
VDD = 2.5 V
Digital Supply Current
(Stop Mode, shutdown)
Oscillator not running,
VDD = 2.5 V
—
—
—
—
—
—
—
—
—
—
—
—
—
—
10
0.15
2.8
5
11
0.21
3.8
7.5
75
68
0.14
0.1
0.19
0.13
25
0.25
3.3
11
30
0.37
4.3
8.0
—
—
—
—
—
—
µA
mA
mA
mA
µA
mA
mA
mA
%/V
%/V
mA/MHz
mA/MHz
mA/MHz
mA/MHz
—0.1550µA
—0.1550µA
Notes:
1.
For more information on V
2. The Backup Supply Voltage (V
characteristics, see Table 8.1 on page 82.
REGIN
RTC-BACKUP
) is used to power the smaRTClock peripheral only.
3. SYSCLK is the internal device clock. For operational speeds in excess of 25 MHz, SYSCLK must
be derived from the internal clock multiplier.
4. SYSCLK must be at least 32 kHz to enable debugging.
5. Based on device character izati on data, not producti on tes ted.
6. Active and Inactive IDD at voltages and frequencies other than those specified can be calculated
using the IDD Supply Sensitivity. For example, if the V
I
= 5.5 mA typical at 2.0 V and f = 25 MHz. From this, IDD = 5.5 mA + 1.1 4 x (2.2 V –
DD
is 2.2 V instead of 2.0 V at 25 MHz:
DD
2.0 V) = 5.73 mA at 2.2 V and f = 25 MHz.
7. I
can be estimated for frequencies < 15 MHz by simply multiplying the frequency of interest by the
DD
frequency sensitivity number for that range. When using these numbers to estimate I
DD
for >
15 MHz, the estimate should be the current at 25 MHz minus the difference in current indicated by
the frequency sensitivity number. For example: V
= 2.0 V; F = 20 MHz, IDD = 5.5 mA – (25 MHz –
DD
20 MHz) x 0.16 mA/MHz = 4.7 mA.
8. Idle IDD can be estimated for frequencies < 1 MHz by simply multiplying the frequency of interest by
the frequency sensitivity number for that range. When using these numbers to estimate Idle for >
1 MHz, the estimate should be the current at 25 MHz minus the difference in current indicated by
the frequency sensitivity number. For example: V
= 2.0 V; F = 5 MHz, Idle IDD = 2.8 mA –
DD
(25 MHz – 5 MHz) x 0.1 mA/MHz = 0.8 mA.
38Rev. 1.0
C8051F410/1/2/3
Table 3.2. Index to Electrical Characteristics Tables
Table TitlePage #
ADC0 Electrical Characteristics (VDD = 2.5 V, V
ADC0 Electrical Characteristics (VDD = 2.1 V, V
IDAC Electrical Characteristics75
Voltage Reference Electrical Characteristics79
Voltage Regulator Electrical Specifications82
Comparator Electrical Characteristics92
Reset Electrical Characteristics134
Flash Electrical Characteri sti cs143
Port I/O DC Electrical Characteristics163
Oscillator Electrical Characteristics175
= 2.2 V)67
REF
= 1.5 V)68
REF
Rev. 1.039
C8051F410/1/2/3
NOTES:
40Rev. 1.0
4.Pinout and Package Definitions
Table 4.1. Pin Definitions for the C8051F41x
C8051F410/1/2/3
Name
V
DD
V
IO
GND
V
RTC-BACKUP
V
REGIN
RST/
C2CK
P2.7/
C2D
XTAL354A In
Pin Numbers
‘F410/2‘F411/3
76
128
65
32
87
21
3227
TypeDescription
Core Supply Voltage.
I/O Supply Voltage.
Ground.
smaRTClock Backup Sup pl y Voltage.
On-Chip Voltage Regulator Input.
D I/O
D I/O
D I/O
D I/O
Device Reset. Open-drain output of internal POR or VDD
monitor. An external source can initiate a system reset by
driving this pin low for at least 15
recommended. See Reset Sources Section for a complete
description.
Clock signal for the C2 Debug Interface.
Port 2.7. See Port I/O Section for a complete description.
Bi-directional data signal for the C2 Debug Interface.
smaRTClock Oscillator Crystal Input.
See Section 20. "smaRTClock (Real Time Clock)" for a
complete description.
µs. A 1 kΩ pullup to VIO is
XTAL443A Out
P0.0/
IDAC0
P0.1/
IDAC1
P0.2
P0.3
1716
1817
1918
2019
D I/O or
A In
A Out
D I/O or
A In
A Out
D I/O or
A In
D I/O or
A In
smaRTClock Oscillator Crystal Input.
See Section 20. "smaRTClock (Real Time Clock)" for a
complete description.
Port 0.0. See Port I/O Section for a complete description.
IDAC0 Output. See IDAC Section for complete description.
Port 0.1. See Port I/O Section for a complete description.
IDAC1 Output. See IDAC Section for complete description.
Port 0.2. See Port I/O Section for a complete description.
Port 0.3. See Port I/O Section for a complete description.
Rev. 1.041
C8051F410/1/2/3
Table 4.1. Pin Definitions for the C8051F41x (Continued)
Name
P0.4/
TX
P0.5/
RX
P0.6/
CNVSTR
P0.7
P1.0/
XTAL1
Pin Numbers
‘F410/2‘F411/3
2120
2221
2322
2423
98
TypeDescription
D I/O or
A In
D Out
D I/O or
A In
D In
D I/O or
A In
D In
D I/O or
A In
D I/O or
A In
A In
Port 0.4. See Port I/O Section for a complete description.
UART TX Pin. See Port I/O Section for a complete description.
Port 0.5. See Port I/O Section for a complete description.
UART RX Pin. See Port I/O Section for a complete description.
Port 0.6. See Port I/O Section for a complete description.
External Convert Start Input for ADC0, IDA0, and IDA1. See
ADC0 or IDACs section for a complete description.
Port 0.7. See Port I/O Section for a complete description.
Port 1.0. See Port I/O Section for a complete description.
External Clock Input. This pin is the external oscillator
return for a crystal or resonator. See Oscillator Section.
P1.1/
109
XTAL2
P1.2
1110
V
REF
P1.31211
P1.41312
P1.51413
P1.61514
D I/O or
A In
A O or
D In
D I/O or
A In
A In
D I/O or
A In
D I/O or
A In
D I/O or
A In
D I/O or
A In
Port 1.1. See Port I/O Section for a complete description.
External Clock Output. This pin is the excitation driver for an
external crystal or resonator, or an external clock input for
CMOS, capacitor, or RC oscillator configurations. See
Oscillator Secti on.
Port 1.2. See Port I/O Section for a complete description.
External V
Port 1.3. See Port I/O Section for a complete description.
Port 1.4. See Port I/O Section for a complete description.
Port 1.5. See Port I/O Section for a complete description.
Port 1.6. See Port I/O Section for a complete description.
Input. See V
REF
REF
Section.
42Rev. 1.0
C8051F410/1/2/3
Table 4.1. Pin Definitions for the C8051F41x (Continued)
Name
P1.71615
P2.02524
P2.12625
P2.22726
P2.3*28
P2.4*29
P2.5*30
P2.6*31
*Note: Available only on the C8051F410/2.
Pin Numbers
TypeDescription
‘F410/2‘F411/3
D I/O or
D I/O or
D I/O or
D I/O or
D I/O or
D I/O or
D I/O or
D I/O or
A In
Port 1.7. See Port I/O Section for a complete description.
Port 2.0. See Port I/O Section for a complete description.
A In
Port 2.1. See Port I/O Section for a complete description.
A In
Port 2.2. See Port I/O Section for a complete description.
A In
Port 2.3. See Port I/O Section for a complete description.
A In
Port 2.4. See Port I/O Section for a complete description.
A In
Port 2.5. See Port I/O Section for a complete description.
A In
Port 2.6. See Port I/O Section for a complete description.
A In
Rev. 1.043
C8051F410/1/2/3
V
RST/C2CK
V
RTC-BACKUP
XTAL4
XTAL3
GND
V
DD
V
REGIN
P2.6
P2.7 / C2D
32
31
1
IO
P2.5
30
P2.4
29
2
3
4
5
C8051F410/2
Top View
6
7
8
9
10
11
12
P2.3
28
13
P2.2
27
14
P2.1
26
15
P2.0
25
16
P0.7
24
P0.6 / CNVSTR
23
P0.5 / RX
22
P0.4 / TX
21
P0.3
20
P0.2
19
P0.1 / ID A C1
18
P0.0 / ID A C0
17
P1.3
P1.4
P1.5
P1.6
P1.7
P1.2 / VREF
P1.1 / XTAL2
P1.0 / XTAL1
Figure 4.1. LQFP-32 Pinout Diagram (Top View)
44Rev. 1.0
C8051F410/1/2/3
GND
RST / C2CK
V
RTC-BACKUP
XTAL4
XTAL3
GND
V
DD
V
REGIN
IO
V
28
1
2
3
P2.7 / C2D
27
P2.2
26
P2.1
25
P2.0
24
P0.7
23
P0.6 / CNVSTR
22
21
20
19
P0.5 / R X
P0.4 / TX
P0.3
C8051F411/3
4
18
P0.2
Top View
5
6
GND
7
8
9
10
11
12
13
14
17
16
15
P0 .1 / IDAC1
P0 .0 / IDAC0
P1.7
P1.3
P1.0 / XTAL1
P1.1 / XTAL2
P1.2 / VREF
P1.4
P1.5
P1.6
Figure 4.2. QFN-28 Pinout Diagram (Top View)
Rev. 1.045
C8051F410/1/2/3
I
32
PIN 1
DENTIFIER
A2
L
D
Table 4.2. LQFP-32
Package Dimensions
D1
MINTYPMAX
A--1.60
A10.05-0.15
A21.351.401.45
b0.300.370.45
E1
1
E
D-9.00-
D1-7.00-
e-0.80-
E-9.00E1-7.00-
L0.450.600.75
MM
A
A1
eb
Figure 4.3. LQFP-32 Package Diagram
46Rev. 1.0
C8051F410/1/2/3
Bottom View
Table 4.3. QFN-2 8
Package Dimensions
8
9
10
L
7
6
b
5
4
e
3
2
1
DETAIL 1
28
D2
2
27
D2
26
6 x e
D
11
25
E2
12
24
13
14
MinTypMax
15
16
17
E2
2
23
R
22
18
6 x e
19
20
21
A0.800.901.00
A100.020.05
A200.651.00
A3-0.25-
b0.180.230.30
D-5.00-
D22.903.153.35
E
E-5.00E22.903.153.35
e-0.5L0.450.550.65
N-28-
ND-7NE-7-
R0.09--
AA-0.435BB-0.435CC-0.18DD-0.18-
MM
Side View
A3
DETAIL 1
A2
e
AA
BB
CC
DD
A
A1
Figure 4.4. QFN-28 Package Drawing
Rev. 1.047
C8051F410/1/2/3
0.50 mm
0.20 mm
Top View
0.85 mm
0.30 mm
0.20 mm
0.50 mm
0.20 mm
0.20 mm
0.30 mm
0.50 mm
0.10 mm
0.35 mm
b
D2
L
E2
e
D
0.50 mm
0.85 mm
0.35 mm
0.10 mm
E
Figure 4.5. Typical QFN-28 Landing Diagram
48Rev. 1.0
C8051F410/1/2/3
Top View
0.85 mm
0.30 mm
0.50 mm
0.20 mm
0.20 mm
0.50 mm
0.20 mm
0.20 mm
0.30 mm
0.50 mm
0.10 mm
0.60 mm
0.60 mm
0.70 mm
b
L
e
0.30 mm
0.20 mm
0.40 mm
E2
0.35 mm
D2
D
0.85 mm
0.50 mm
0.10 mm
0.35 mm
E
Figure 4.6. Typical QFN-28 Solder Paste Mask
Rev. 1.049
C8051F410/1/2/3
NOTES:
50Rev. 1.0
C8051F410/1/2/3
5.12-Bit ADC (ADC0)
The ADC0 subsystem for the C8051F41x consists of an analog multiplexer (AMUX0) with 27 total input
selections, and a 200
programmable window detector, and hardware accumulator. The ADC0 subsystem ha s a special
Mode
which can automatica ll y en abl e A DC0, c ap tur e an d ac cumu late samples, then place ADC0 i n a lo w
power shutdown mode without CPU intervention. The AMUX0,
tor are all configurable under software control via the Special Function Registers shown in Figure 5.1.
ADC0 inputs are single-ended and may be configured to measure P0.0-P2.7, the Temperature Sensor output, VDD, or GND with respect to GND. ADC0 is enabled when the AD0EN bit in the ADC0 Control register
(ADC0CN) is set to logic
down when AD0EN is logic 0 and no Burst Mode conversions are taking place.
1, or when performing con versions in Burst Mode. ADC 0 is in low power shut-
P0.0
P0.7
P1.0
P1.7
P2.0
P2.7
VDD
Temp Sensor
GND
AD0EN
VDD
ADC0CN
AD0INT
BURSTEN
AD0WINT
AD0BUSY
AD0LJST
Conversion
ADC0MX
ADC0MX4
ADC0MX3
Burst Mode
Oscillator
25 MHz Max
ADC0MX2
ADC0MX1
Start
Conversion
SYSCLK
ADC0TK
AD0TK1
AD0TK0
AD0TM1
ADC0MX0
AD0PWR3
AD0PWR2
Burst Mode
FCLK
AD0PWR1
Logic
AD0TM0
AD0PWR0
12-Bit
SAR
27-to-1
AMUX
P2.3-P2.6 available on
‘F410/2
AD0SC2
AD0SC3
AD0SC4
ADC0CF
Figure 5.1. ADC0 Functional Block Diagram
AD0SC0
AD0SC1
ADC
AD0PRE
AD0TM1:0
ADC0LTH
AD0RPT0
AD0RPT1
ADC0GTH ADC0GTL
AD0POST
REF
FCLK
ADC0LTL
AD0CM1
Start
AD0CM0
00AD0BUSY (W)
01
Timer 3 Overflow
10
CNVSTR Input
Timer 2 Overflow
11
ADC0L
Accumulator
ADC0H
AD0WINT
Window
Compare
32
Logic
5.1.Analog Multiplexer
AMUX0 selects the input channel to the ADC. Any of the following may be selected as an input: P0.0-P2.7,
the on-chip temper ature sensor, the core power sup ply (V
and all signals measured are w ith respect to GND.
ADC0MX register as described in
SFR Definition 5.1.
Important Note About ADC0 Input Configuration: Port pins selected as ADC0 i nputs should be config-
ured as analog i nputs and should be s kipped by the Dig ital Crossbar. To configure a Port pin fo r analog
input, set to ‘0’ the corresponding bit in register PnMDIN (for n = 0,1,2) and write a ‘1’ in the corresponding
Port Latch register Pn (for n = 0, 1,2). To force the Crossbar to skip a Port pin, s et to ‘1’ the corr espondin g
bit in register PnSKIP (for n = 0,1,2). See
Section “18. Port Input/Output” on page 147 for more Port I/O
configuration details.
Rev. 1.051
), or ground (GND). AD C0 is single-ended
DD
The ADC0 input cha nnels are selected usi ng the
C8051F410/1/2/3
s)
0
0
0
0
0
(
1
5.2.Temperature Sensor
The typical temperature sensor trans fer functi on is shown in Figure 5.2. The output voltage (V
positive ADC input when the temperature sensor is selected by bits AD0MX4-0 in register ADC0MX.
Volts)
TEMP
.000
.900
.800
V
= SLOPE(TEMPC) + Offset
TEMP
.700
.600
) is the
.500
0-5050100
(Celsiu
Figure 5.2. Typical Temperature Sensor Transfer Function
5.3.ADC0 Operation
In a typical system, ADC0 is configured using the following steps:
Step 1. Choose the start of conversion source.
Step 2. Choose Normal Mode or Burst Mode operation.
Step 3. If Burst Mode, choose the ADC0 Idle Power State and set the Power-Up Time.
Step 4. Choose the tracking mode. Note that Pre-Tracking Mode can only be used with Normal
Mode.
Step 5. Calculate required settling time and set the post convert-start tracking time using the
AD0TK bits.
Step 6. Choose the repeat count.
Step 7. Choose the output word justification (Right-Justified or Left-Justified).
Step 8. Enable or disable the End of Conversion and Window Comparator Interrupts.
52Rev. 1.0
C8051F410/1/2/3
5.3.1. Starting a Conversion
A conversion can be ini tia ted i n on e of fo ur way s, d epe ndi ng on the p rogr amm ed s tates of the A DC0 Start
of Conversion Mode bits (AD0CM1-0) in register ADC0CN. Conversions may be initiated by one of the fol
lowing:
•Writing a ‘1’ to the AD0BUSY bit of register ADC0CN
•A rising edge on the CNVSTR input signal (pin P0.6)
•A Timer 2 overflow (i.e., timed continuous conversions)
Writing a ‘1’ to AD0BUSY p rovides software contr ol of ADC0 whereby conversions are perf ormed "on-
demand.” During conversion, the AD0BUSY bit is set to logic 1 and reset to logic 0 when the conversion is
complete. The falling edge of A D0BUSY trigger s an inter rupt (when enab led ) and sets the ADC0 i nterrup t
flag (AD0INT). Note: When polling for ADC conversion completions, the ADC0 interrupt flag (AD0INT)
should be used. Converted data is available in the ADC0 data registers, ADC0H:ADC0L, when bit AD0INT
is logic 1. Note that when Timer 2 or Timer 3 overflows are used as the conversion source, Low Byte over
flows are used if Timer 2/3 is in 8-bit mode; High byte overflows are used if Timer 2/3 is in 16-bit mode. See
Section “24. Timers” on page 231 for timer configuration.
Important Note About Using CNVST R: The CNVSTR input pin also functions asPort Pi n P0.6 . Wh en the
CNVSTR input is used a s the ADC0 conversion source,
Crossbar. To configure the Crossbar to skip P0.6, se t bit
“18. Port Input/Output” on page 147 for details on Port I/O configuration.
Port Pin P0.6 should be skipped by the Digital
6 in the P0SKIP register to logic 1. See Section
-
-
5.3.2. Tracking Modes
According to Table 5.3 and Table 5.4, each ADC0 conversion must be preceded by a minimum tracking
time for the converted result to be accurate. ADC0 has three tracking modes: Pre-Tracking, Post-Tracking,
and Dual-Tracking. Pre-Tracking Mode pr ovides the mini mum delay b etween the conv ert start signal an d
end of conversion by tracking continuou sly before the conver t start signal. This mode r equires software
management in order to meet mi nimum tracking requirements. In Post- Tracking Mode, a programmable
tracking time starts after the convert start sig nal and is manage d by hardwa re. Dual-Tracking Mode max i
mizes tracking time by tracking before and after the convert start signal. Figure 5.3 shows examples of the
three tracking modes.
Pre-Tracking Mode is selected when AD0TM is se t to 10b. Convers ions are started i mmediatel y followin g
the convert start signal. ADC0 is trac king continu ously when not pe rforming a co nversion . Software must
allow at least the minimum tracking time between each end of conversion and the next convert start signal.
The minimum tracking time must also be met prior to the first convert start signal after ADC0 is enabled.
Post-Tracking Mode is selected when AD0TM is set to 01b. A programmable tracking time based on
AD0TK is started immediately following the con vert start signal. Conversions are started after the pro
grammed tracking time e nds. After a conversion is complete, ADC0 does not track the input. Rather, the
sampling capacitor remains disconnected from the input making the input pin high-impedance until the
next convert start signal.
Dual-Tracking Mode is selected when AD0TM is set to 11b. A programmable tracking time based on
AD0TK is started immediately following the con vert start signal. Conversions are started after the pro
grammed tracking time end s. A fter a con vers ion is co mpl ete , ADC0 tra cks cont inu ous l y until the nex t c onversion is started.
-
-
-
Rev. 1.053
C8051F410/1/2/3
P
.
D
.
Depending on the output connec ted to the ADC input, additional tracki ng time, more than is specified in
Table 5.3 and Table 5.4, may be required after changing MUX s etti ngs . Se e the se ttli ng tim e r equ irem ents
described in Section “5.3.6. Settling Time Requirements” on page 58.
Convert Start
Pre-Tracking
AD0TM = 10
ost-Tracking
AD0TM= 01
ual-Tracking
AD0TM = 11
Track ConvertTrackConvert ...
TrackConvertIdleIdleTrackConvert.
TrackConvertTrackTrackTrackConvert.
Figure 5.3. ADC0 Tracking Modes
5.3.3. Timing
ADC0 has a max imum conver sion speed spe cified in Table 5.3 and Table 5 .4. ADC0 is clo cked from the
ADC0 Subsystem Clock (FCLK). The source of FCLK is selected based on the BURSTEN bit. When
BURSTEN is logic
derived from the Burst Mode Oscillator, an independent clock source with a maximum frequency of
25
MHz.
When ADC0 is performi ng a co nversi on, it r equir es a clo ck so urce that is typical ly sl ower t han FCLK. T he
ADC0 SAR convers ion clo ck (SA R cl oc k) i s a div i ded v ersi on of F CLK . The divide ratio can be confi gu re d
using the AD0SC bits in the ADC0CF register. The maximum SAR clock frequency is listed in
and Table 5.4.
0, FCLK is der ived f rom the c urrent s yste m clock . When BURSTEN is lo gic 1, FCLK is
Table 5.3
ADC0 can be in one of three states at any gi ven tim e: tracki ng, conver ting, or idl e. Tracking time depends
on the tracking mode selected . For Pre-Tracking Mod e, trackin g is managed by so ftware and ADC0 starts
conversions immediate ly following the convert start signal. For Post -Tracking and Dual-Tracking Modes,
the tracking time a fter the convert star t signal is equa l to the value determined by the AD0TK bits plus 2
FCLK cycles. Tracking is immediately followed by a convers ion. The ADC0 conversio n time is always 13
SAR clock cycles plus an additional 2 FCLK cy cles to start and compl ete a conversion .
timing diagrams for a conversion in Pre-Tracking Mode and tracking plu s conversion in Po st-Tracking or
Dual-Tracking Mode. In this example, repeat count is set to one.
54Rev. 1.0
Figure 5.4 shows
C8051F410/1/2/3
C
onvert Start
Pre-Tracking Mode
Time
ADC0 State
AD0INT Flag
TimeFS1S2S12S13
ADC0 State
AD0INT Flag
FS1S2S12S13
Post-Tracking or Dual-Tracking Modes (AD0TK = ‘00')
FS1S2F
Track
Key
F
Sn
Equal to one period of FCLK.
Each Sn is equal to one period of the SAR clock.
...
Convert
F
...
Convert
Figure 5.4. 12-Bit ADC Tracking Mode Example
F
Rev. 1.055
C8051F410/1/2/3
D
D
5.3.4. Burst Mode
Burst Mode is a po wer saving featu re that allows ADC0 to remain i n a low power state be tween conversions. When Burst Mode is enabled, ADC0 wakes from a low power state, accumulates 1, 4, 8, or 16 samples using an internal Bur st Mode clock (approximatel y 25 MHz), then r e-enters a low powe r state. Since
the Burst Mode clock is inde pendent of the system clock, ADC0 can perfor m multiple conversions the n
enter a low power state within a single system clock cycle, even if the system clock is slow (e.g.
32.768
Burst Mode is enabled by setti ng BURSTEN to logic 1. When in Bu rst Mode, AD0EN control s the ADC0
idle power state (i.e. the state ADC0 ente rs wh en no t trac ki ng o r p erfor mi ng con vers ions ) . If A D0E N is set
to logic
each burst. On each convert start signal, ADC0 is awakened from its Idle Power State. If ADC0 is powered
down, it will automatically power up and wait the programmable Power-Up Time controlled by the
AD0PWR bits. Otherwise, ADC0 will start tracking and converting immediately .
ple of Burst Mode Operation with a slow system clock and a repeat count of 4.
Important Note: When Burst Mode is enabled, only Post-Tracking and Dual-Tracking modes can be used.
When Burst Mode is enabled, a single convert start will initiate a number of conversions equal to the repeat
count. When Burst Mode is disabled, a convert start is required to initiate each conversion. In both modes,
the ADC0 End of Conversi on Interrupt Flag (AD0INT) will be set after “re peat count” conversions have
been accumulated. Simil arly, the Window Comparator will not compare the result to the greater-than and
less-than registers until “repeat count” conversions have been accumulated.
kHz), or suspended.
0, ADC0 is powered down after each burst. If AD0EN is set to logic 1, ADC0 remains enabled after
Figure 5.5 shows an exam-
Note: When using Burst Mode, care must be taken to issue a convert start signal no faster than once every
four SYSCLK periods. This includes external convert start signals.
System C lock
Convert S tart
Post-Tracking
AD0TM = 01
AD0EN = 0
ual-Tracking
AD0TM = 11
AD0EN = 0
Post-Tracking
AD0TM = 01
AD0EN = 1
ual-Tracking
AD0TM = 11
AD0EN = 1
Powered
Down
Powered
Down
IdleIdleT C T C T C T CT C..
TrackTrackT C T CT C T C T C..
T = Tracking
C = Converting
Po we r-U p
and Idle
Po we r-U p
and Track
AD0PWR
T C
T C T C T C
T C
T C T C T C
T C T C
Powered
Down
Powered
Down
Power-Up
and Idle
Power-Up
and Track
T C T C
T C..
T C..
Figure 5.5. 12-Bit ADC Burst Mode Example with Repeat Count Set to 4
56Rev. 1.0
C8051F410/1/2/3
5.3.5. Output Conversion Code
The registers ADC0H and ADC0L contain the high and low bytes of the output conversion code. When the
repeat count is set to 1, conversion codes are represented in 12-bit unsigned integer format and the output
conversion code is up dated after each conversion. Inputs are measured from ‘0’ to V
Data can be right-justified or left-justified, depending on the setting of the AD0LJST bit (ADC0CN.2).
Unused bits in the ADC0H and ADC0L regis ters are set to ‘0’. Examp le codes are show n in
both right-justified and left-justified data.
Table 5.1. ADC0 Examples of Right- and Left-Justified Samples
x 4095/4096.
REF
Table 5.1 for
Input VoltageRight-Justified ADC0H:ADC0L
(AD0LJST = 0)
V
x 4095/4096
REF
x 2048/4096
V
REF
V
x 2047/4096
REF
00x00000x0000
When the ADC0 Repeat Count i s greater tha n 1, the output conv ersion co de represen ts the accumulate d
result of the conversions performed and i s updated after the la st convers ion in the serie s is finished . Sets
of 4, 8, or 16 consecutiv e samples can b e accumulated an d represented in unsigned integer format. Th e
repeat count can be select ed using the AD0RPT bits in the ADC0CF register. The value must be rightjustified (AD0LJST
in
Table 5.2 shows the right-justified result for various input voltages and repeat counts. Notice that
accumulating 2n samples is equivalent to left-shifting by n bit positions when all samples returned from the
ADC have the same value.
= “0”), and unused bits in the ADC0H and ADC0 L registe rs ar e set to '0'. The exam ple
0x0FFF0xFFF0
0x08000x8000
0x07FF0x7FF0
Left-Justified ADC0H:ADC0L
(AD0LJST = 1)
Table 5.2. ADC0 Repeat Count Examples at Various Input Voltages
A minimum tracking time is required before an accurate conversion can be performed. This tracking time is
determined by the AM UX0 resistance, the ADC0 samp ling capacitance, any external sou rce resistance,
and the accuracy required for the conversion.
Figure 5.6 shows the equivalent ADC0 input circuit. The r equired ADC0 settling tim e for a given settling
accuracy (SA) may be approximated by Equation 5.1. When measuring the Temperature Sensor output or
VDD with respect to GND, R
tling time requirements.
Equation 5.1. ADC0 Settling Time Requirements
Where:
SA is the settling accuracy, given as a fraction of an LSB (for example, 0.25 to settle within 1/4 LSB)
t is the required settling time in seconds
R
n is the ADC resolution in bits (12).
is the sum of the AMUX0 resistance and any external source resistance.
TOTAL
reduces to R
TOTAL
t
MUX
n
2
⎛⎞
------ -
×ln=
⎝⎠
SA
. See Table 5.3 and Table 5.4 for ADC0 minimum set-
*Note: Only applies to C8051F410/2; selection RESERVED on C8051F411/3 devices.
Rev. 1.059
C8051F410/1/2/3
FCLK
1
FCLK
SFR Definition 5.2. ADC0CF: ADC0 Configuration
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
AD0SCAD0RPTReserved11111000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0SFR Address:
Bits7-3:AD0SC4-0: ADC0 SAR Conversion Clock Period Bits.
SAR Conversion clock is derived from FCLK by the following equation, where
to the 5-bit value held in bits AD0SC4-0. SAR Conversion clock requirements are given in
Table 5.3.
BURSTEN = 0: FCLK is the current system clock.
BURSTEN = 1: FCLK is a maximum of 25 MHz, independent of the current system clock.
AD0SC refers
0xBC
AD0SC
*Note: Round the result up.
Bits2-1:AD0RPT1-0: ADC0 Repeat Count.
Controls the number of conversions taken and accumulated between ADC0 End of
Conversion (ADCINT) and ADC0 Window Comparator (ADCWINT) interrupts. A convert
start is required for each conversion unless Burst Mode is enabled. In Burst Mode, a single
convert start can initiate multiple self-timed conversions. Results in both modes are
accumulated in the ADC0H:ADC0L register.
than '00', the AD0LJST bit in the ADC0CN register must be set to '0' (right justified).
00: 1 conversion is performed.
01: 4 conversions are performed and accumulated.
10: 8 conversions are performed and accumulated.
11: 16 conversions are performed and accumulated.
Bit0:RESERVED. Read = 0b; Must write 0b.
--------------------
CLK
SAR
* or
–=
CLK
SAR
When AD0RPT1-0 are set to a value other
----------------------------
=
AD0SC1+
60Rev. 1.0
C8051F410/1/2/3
SFR Definition 5.3. ADC0H: ADC0 Data Word MSB
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
00000000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0SFR Address:
Bits7-0:ADC0 Data Word High-Order Bits.
For AD0LJST = 0 and AD0RPT as follows:
00: Bits 3–0 are the upper 4 bits of the accumulated result. Bits 7–4 are 0000b.
01: Bits 5–0 are the upper 6 bits of the accumulated result. Bits 7–6 are 00b.
10: Bits 6–0 are the upper 7 bits of the accumulated result. Bit 7 is 0b.
11: Bits 7–0 are the upper 8 bits of the accumulated result.
For AD0LJST = 1 (AD0RPT must be '00'): Bits 7–0 are the most-significant bits of the ADC0
12-bit result.
SFR Definition 5.4. ADC0L: ADC0 Data Word LSB
0xBE
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
00000000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0SFR Address:
Bits7-0:ADC0 Data Word Low-Order Bits.
For AD0LJST = 0: Bits 7-0 are the lower 8 bits of the ADC0 accumulated result.
For AD0LJST = 1 (AD0RPT must be '00'): Bits 7-4 are the lower 4 bits of the 12-bit result.
Bits 3-0 are 0000b.
0: ADC0 has not completed a data conversion since the last time AD0INT was cleared.
1: ADC0 has completed a data conversion.
Bit4:AD0BUSY: ADC0 Busy Bit.
Read:
0: ADC0 conversion is complete or a conversion is not currently in progress. AD0INT is set
to logic 1 on the falling edge of AD0BUSY.
1: ADC0 conversion is in progress.
Write:
0: No Effect.
1: Initiates ADC0 Conversion if AD0CM1-0 = 00b
Bit3:AD0WINT: ADC0 Window Compare Interrupt Flag.
This bit must be cleared by software.
0: ADC0 Window Comparison Data match has not occurred since this flag was last cleared.
1: ADC0 Window Comparison Data match has occurred.
Bit2:AD0LJST: ADC0 Left Justify Select
0: Data in ADC0H:ADC0L registers is right justified.
1: Data in ADC0H:ADC0L registers is left justified. This option should not be used with a
repeat count greater than 1 (when AD0RPT1-0 is 01b, 10b, or 11b).
Bits1-0:AD0CM1-0: ADC0 Start of Conversion Mode Select.
00: ADC0 conversion initiated on every write of ‘1’ to AD0BUSY.
01: ADC0 conversion initiated on overflow of Timer 3.
10: ADC0 conversion initiated on rising edge of external CNVSTR.
11: ADC0 conversion initiated on overflow of Timer 2.
0xE8
62Rev. 1.0
C8051F410/1/2/3
Tstartup
s
SFR Definition 5.6. ADC0TK: ADC0 T racking Mode Select
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
AD0PWRAD0TMAD0TK11111111
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0SFR Address:
(bit addressable)
Bits7-4:AD0PWR3-0: ADC0 Burst Power-Up Time.
For BURSTEN = 0:
ADC0 power state controlled by AD0EN.
For BURSTEN = 1 and AD0EN = 1;
ADC0 remains enabled and does not enter the low power state.
For BURSTEN = 1 and AD0EN = 0:
ADC0 enters the low power state as specified in Table 5.3 and Table 5.4 and is enabled
after each convert start signal. The Power Up time is programmed according to the following
equation:
0xBA
AD0PWR
Bits3-2:AD0TM1-0: ADC0 Tracking Mode Select Bits.
00: Reserved.
01: ADC0 is configured to Post-Tracking Mode.
10: ADC0 is configured to Pre-Tracking Mode.
11: ADC0 is configured to Dual-Tracking Mode (default).
Bits1-0:AD0TK1-0: ADC0 Post-Track Time.
Post-Tracking time is controlled by AD0TK as follows:
00: Post-Tracking time is equal to 2 SAR clock cycles + 2 FCLK cycles.
01: Post-Tracking time is equal to 4 SAR clock cycles + 2 FCLK cycles.
10: Post-Tracking time is equal to 8 SAR clock cycles + 2 FCLK cycles.
11: Post-Tracking time is equal to 16 SAR clock cycles + 2 FCLK cycles.
---------------------200ns
or
1–=TstartupAD0PWR1+()200n
=
5.4.Programmable Window Detector
The ADC Programmable Win dow Detec tor con tinuousl y compares the ADC0 outp ut reg isters to us er-pr ogrammed limits, and notifies the system when a desired condition is detected. This is especially effective in
an interrupt-driven system, saving code space and CPU bandwidth while delivering faster system
response times. The win dow detector interrupt f lag (AD0WINT in register ADC0C N) can also be used in
polled mode. The ADC0 Greater-Than (ADC0GTH, ADC0GTL) and Less-Than (ADC0L TH, ADC0LTL) reg
isters hold the compariso n values. The window detec tor flag can be programme d to indicate when measured data is inside or outside of the user-pro grammed limits, depending on the contents of the ADC0
Less-Than and ADC0 Greater-Than registers.
-
Rev. 1.063
C8051F410/1/2/3
SFR Definition 5.7. ADC0GTH: ADC0 Greater-Than Data High Byte
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0SFR Address:
Bits7-0: High byte of ADC0 Greater-Than Data Word.
SFR Definition 5.8. ADC0GTL: ADC0 Greater-Than Data Low Byte
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0SFR Address:
Bits7-0: Low byte of ADC0 Greater-Than Data Word.
11111111
0xC4
11111111
0xC3
64Rev. 1.0
C8051F410/1/2/3
SFR Definition 5.9. ADC0LTH: ADC0 Less-Than Data High Byte
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
00000000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0SFR Address:
Bits7-0: High byte of ADC0 Less-Than Data Word.
SFR Definition 5.10. ADC0LTL: ADC0 Less-Than Data Low Byte
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
00000000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0SFR Address:
0xC6
0xC5
Bits7-0: Low byte of ADC0 Less-Than Data Word.
Rev. 1.065
C8051F410/1/2/3
1
1
5.4.1. Window Detector In Single-Ended Mode
Figure 5.7 shows two example window comparisons for right-justified data with
ADC0LTH:ADC0LTL = 0x0200 (512d) an d ADC0GTH: ADC0GTL = 0x 0100 (256d). The input voltage can
range from ‘0’ to V
value. The repeat count i s set to one. In the left example, an AD0WI NT interrupt will be generat ed if the
ADC0 conversion word (ADC0H:ADC0L) is within the range defined by ADC0GTH:ADC0GTL and
ADC0LTH:ADC0LTL (if
will be generated if the ADC0 conversion word is outside of the range defined by the ADC0GT and
ADC0LT registers (if
ple using left-justified data with the same comparison values.
Input Voltage
(Px.x - GND)
VREF x (4095/4096)
x (4095/4096) with respect to GND, and is represented by a 12-bit unsigned integer
REF
0x0100 < ADC0H:ADC0L < 0x0200). In the right example, and AD0WINT interrupt
ADC0H:ADC0L < 0x0100 or ADC0H:ADC0L > 0x0200). Figure 5.8 shows an exam-
ADC0H:ADC0LADC0H:ADC0L
Input Voltage
(Px.x - GND)
0x0FFF
AD0WINT
not affected
VREF x (4095/
4096)
0x0FFF
AD0WINT=1
VREF x (512/4096)
VREF x (256/4096)
0
0x0201
0x0200
0x01FF
0x0101
0x0100
0x00FF
0x0000
ADC0LTH:ADC0LTL
ADC0GTH:ADC0GTL
AD0WINT
not affected
VREF x (512/4096)
AD0WINT=1
VREF x (256/4096)
0
0x0201
0x0200
0x01FF
0x0101
0x0100
0x00FF
0x0000
ADC0GTH:ADC0GTL
AD0WINT
not affected
ADC0LTH:ADC0LTL
AD0WINT=1
Figure 5.7. ADC Window Compare Example: Right-Justified Single-Ended Data
ADC0H:ADC0LADC0H:ADC0L
Input Volt a g e
(Px.x - GND)
VREF x (4095/4096)
VREF x (512/4096)
VREF x (256/4096)
0xFFF0
0x2010
0x2000
0x1FF0
0x1010
0x1000
0x0FF0
AD0WINT
not affected
ADC0LTH:ADC0LTL
AD0WINT=1
ADC0GTH:ADC0GTL
Input Voltage
(Px.x - GND)
VREF x (4095/4096)
VREF x (512/4096)
VREF x (256/4096)
0xFFF0
0x2010
0x2000
0x1FF0
0x1010
0x1000
0x0FF0
ADC0GTH:ADC0GTL
AD0WINT
not affected
ADC0LTH:ADC0LTL
AD0WINT=
AD0WINT
not affected
0
0x0000
0
0x0000
Figure 5.8. ADC Window Compare Example: Left-Justified Single-Ended Data
66Rev. 1.0
AD0WINT=
C8051F410/1/2/3
Table 5.3. ADC0 Electrical Characteristics (VDD = 2.5 V, V
VDD = 2.5 V, V
ºC.
at 25
= 2.2 V (REFSL=0), –40 to +85 °C unless otherwise specified. Typical values are given
REF
REF
= 2.2 V)
ParameterConditionsMinTypMaxUnits
DC Accuracy
Resolution12bits
Integral Nonlinearity——±1LSB
Differential NonlinearityGuaranteed Monotonic——±1LSB
Offset Error—±3±10LSB
Full Scale Error—±3±10LSB
Dynamic Performance (10 kHz sine-wave Single-ended input, 0 to 1 dB below Full Scale, 200 ksps)
Signal-to-Noise Plus Distortion
Total Harmonic Distortion
SAR Conversion ClockRegular Mode (BURSTEN = '0')——3MHz
Conversion Time in SAR Clocks
Track/Hold Acquisit ion Time
2
1
—13—clocks
1——µs
Throughput Rate——200ksps
Analog Inputs
Input Voltage Range0—
V
REF
V
Input Capacitance—12—pF
Temperature Sensor
Linearity
Slope
3,4
4
Slope Error
3
—±0.2—°C
—2.95—mV/°C
—±73—µV/°C
Offset(Temp = 0 °C)—900—mV
Offset Error
3
—±17—mV
Power Specifications
Power Supply Current (VDD supplied to ADC0)
Operating Mode, 200 ksps—6501000µA
Burst Mode (Idle)—100—µA
Power Supply R eje ct i on—1—mV/V
Notes:
1. An additional 2 FCLK cycles are required to start and complete a conversion.
2. Additional tracking time may be required depending on the output impedance connected to the ADC input.
See
Section “5.3.6. Settling Time Requirements” on page 58.
3. Represents one standard deviation from the mean.
4. Includes ADC offset, gain, and linearity variations.
68Rev. 1.0
C8051F410/1/2/3
ut
6.12-Bit Current Mode DACs (IDA0 and IDA1)
The C8051F41x devices in cl ude two 12-bit cur rent- mo de Dig ital- to-A nal og Con verte rs (ID ACs ) . The max imum current output of the IDACs can be adjusted for four different current settings; 0.25 mA, 0.5 mA,
1
mA, and 2 mA. The IDACs can be individually enabled or disabled u sing the enable bits in the corresponding IDAC Contro l Regi ster (IDA0 CN or IDA1CN) . When both IDACs ar e enabl ed, their ou tputs may
be routed to individual pins or merged onto a single pin. An internal bandgap bias generator is used to gen
erate a reference curr ent for the IDA Cs whenev er they ar e enabled. IDA C updates can be per formed ondemand, scheduled o n a Timer overflow, or synchronized with an external pin edge.
block diagram of the IDAC circuitry.
Figure 6.1 shows a
-
IDAnEN
IDAnCM2
IDAnCM1
IDAnCM0
IDAnCN
IDAnRJST
IDAnOMD1
IDAnOMD0
IDAnH
Timer 0
Timer 1
Timer 2
Timer 3
CNVSTR
8
IDAnH
12
Latch
4
IDAnL
IDAn
IDAn
Outp
Figure 6.1. IDAC Functional Block Diagram
6.1.IDAC Output Scheduling
A flexible output update mechanism allows for seamless full-scale changes and supports jitter-free
updates for waveform ge neration. Three u pdate modes ar e provided, all owing IDAC outpu t updates on a
write to the IDAC’s data register, on a Timer overflow, or on an external pin edge.
6.1.1. Update Output On-Demand
In its default mode (IDAnCN.[6:4] = ‘111’) the IDAC output is up date d “on- de man d” wit h a wr it e to th e da ta
register high byte ( IDAnH). It is important to note that in this mode, writes to the data register l ow byte
(IDAnL) are held and have no effect on the IDAn output until a write to IDAnH takes place. Since data from
both the high and low bytes of the data register are immediately latched to IDAn after a write to IDAnH,
write sequence when writing a full 12-bit word to the IDAC data registers should be IDAnL followed
by IDAnH
the desired value (typically 0x00), and writing data only to IDA0H.
. When the data word is left justified, the IDAC can be used in 8-bi t mode by initial izi ng IDAn L to
Rev. 1.069
the
C8051F410/1/2/3
6.1.2. Update Output Based on Timer Overflow
The IDAC output update can be scheduled on a Timer overflow. This feature is useful in systems where the
IDAC is used to generate a waveform of a defined sampling rate, by e liminating the effects of variable
interrupt latency and instruction execution on the timing of the IDAC output. When the IDAnCM bits
(IDAnCN.[6:4]) are set to ‘000’, ‘001’, ‘010’ or ‘011’, writes to both IDAC d ata regis te rs ( IDAnL and IDAnH)
are held until an associated Timer overflow event (Timer
occurs, at which time the IDAnH:IDAnL contents are copied to the IDAC input latch, allowing the IDAC out
put to change to the new value. Wh en updates are scheduled based on Timer 2 or 3, updates occur on
low-byte overflows if Timer
2 or 3 is in 8-bit mode and high-byte overflows if Timer 2 or 3 is in 16-bit mode.
6.1.3. Update Output Based on CNVSTR Edge
The IDAC output ca n also be configured to update on a rising edge, falling ed ge, or both edges of the
external CNVSTR signal. Wh en the IDAnCM bits (IDAnCN.[6:4 ]) are set to ‘100’, ‘10 1’, or ‘110’, writes to
the IDAC data registers (ID AnL and IDA nH) are hel d until a n edge occur s on the CNVS TR input pi n. The
particular setting of the IDAnCM bits determin es whether the IDAC output is upda ted on rising, falling, or
both edges of CNVSTR. When a corresponding edge occurs, the IDAnH:IDAnL contents are copied to the
IDAC input latch, allowing the IDAC output to change to the new value.
6.2.IDAC Output Mapping
0, Timer 1, Timer 2 or Timer 3, respectively)
-
The IDAC data word can be Left Justified or Right Justified as shown in Figure 6.2. When Left Justified, the
8 MSBs of the data word (D11-D4) are mapped to bits 7-0 of the IDAnH register and the 4 LSBs of the data
word (D3-D0) are map ped to bits 7- 4 of the IDA nL registe r. When Right Justified, the 4 MSBs of the da ta
word (D11-D8) are mapped to bits 3-0 of the IDAnH register and the 8 LSBs of the data word (D7-D0) ar e
mapped to bits 7-0 of the IDAnL register. The IDAC data word justification is selected using the IDAnRJST
bit (IDAnCN.2).
The full-scale output curr ent of the IDAC is selected using the IDAnOM D bits (IDAnCN[1:0]). By default,
the IDAC is set to a full-scale output current of 2 mA. The IDAnOMD bits can also be configured to provide
full-scale output currents of 0.25 mA, 0.5 mA, or 1 mA.
Left Justif ied Data (IDAnRJST = 0):
IDAnHIDAnL
D11D10D9D8D7D6D5D4D3D2D1D0
Right Justified Data (IDAnRJST = 1):
IDAnHIDAnL
D11D10D9D8D7D6D5D4D3D2D1D0
IDAn Data Word
(D11 - D0)
0x0000 mA0 mA0 mA0 mA
0x0011/4096 x 2 mA1/4096 x 1 mA1/4096 x 0.5 mA1/4096 x 0.25 mA
0x8002048/4096 x 2 mA 2048/4096 x 1 mA 2048/4096 x 0.5 mA 2048/4096 x 0.25 mA
0xFFF4095/4096 x 2 mA 4095/4096 x 1 mA 4095/4096 x 0.5 mA 4095/4096 x 0.25 mA
101: DAC output updates on falling edge of CNVSTR.
110: DAC output updates on any edge of CNVSTR.
111: DAC output updates on write to IDA1H.
Bit 3:Reserved. Read = 0b, Write = 0b.
Bit 2:IDA1RJST: IDA1 Right Justify Select Bit.
0: IDA1 data in IDA1H:IDA1L is left justified.
1: IDA1 data in IDA1H:IDA1L is right justified.
Bits 1–0: IDA1OMD[1 :0]: IDA1 Outp ut Mode Sel ect Bits.
00: 0.25 mA full-scale output current.
01: 0.5 mA full-scale output current.
10: 1.0 mA full-scale output current.
11: 2.0 mA full-scale output current.
72Rev. 1.0
C8051F410/1/2/3
SFR Definition 6.5. IDA1H: IDA0 Data High Byte
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
00000000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
SFR Address:
Bits 7–0: IDA1 Data Word High-Order Bits.
For IDA0RJST = 0:
Bits 7-0 hold the most significant 8-bits of the 12-bit IDA1 Data Word.
For IDA0RJST = 1:
Bits 3-0 hold the most significant 4-bits of the 12-bit IDA1 Data Word. Bits 7–4 are 0000b.
SFR Definition 6.6. IDA1L: IDA1 Data Low Byte
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
SFR Address:
0xF5
00000000
0xF4
Bits 7–0: IDA1 Data Word Low-Order Bits.
For IDA0RJST = 0:
Bits 7-4 hold the least significant 4-bits of the 12-bit IDA1 Data Word. Bits 3–0 are 0000b.
For IDA0RJST = 1:
Bits 7–0 hold the least significant 8-bits of the 12-bit IDA1 Data Word.
6.3.IDAC External Pin Connections
The IDA0 output is conn ected to P0.0, and the IDA 1 out put ca n b e con nec te d to P 0.0 or P 0. 1. Th e output
pin for IDA1 is sele cted using IDAM RG (REF0CN.7) . When the en able bits for both ID ACs (IDAnEN) ar e
set to ‘0’, the IDAC outputs behave as a normal GPIO pins. When either IDAC’s enable bit is set to ‘1’, the
digital output driver s and wea k pullup fo r the s elected I DAC pin a re automa tically d isabled, and the p in is
connected to the IDAC o utput. When using the I DACs, the s elected IDA C pin(s) s hould be s kipped in th e
Crossbar by setting the corr esponding PnSKIP bits to a ‘1’.
and IDA1.
When both IDACs are e nabled and IDAMRG is set to logic 1, the output of both IDACs is merged onto
P0.0.
Figure 6.3 shows the pin co nne ct ion s for IDA0
Rev. 1.073
C8051F410/1/2/3
.0
.1
IDA0 EN
0
IDA0
1
IDA1 EN
1
0
IDA1
0
1
IDAMRG
Figure 6.3. IDAC Pin Connections
P0
P0
74Rev. 1.0
C8051F410/1/2/3
Table 6.1. IDAC Electrical Characteristics
–40 to +85 °C, VDD = 2.0 V Full-scale output current set to 2 mA unless otherwise specified. Typical values are given
ºC.
at 25
ParameterConditionsMinTypMaxUnits
Static Performance
Resolution12bits
Integral Nonlinearity——±10LSB
Differential NonlinearityGuaranteed Monotonic——±1LSB
0.5
0.5
0.5
2.1
1.1
0.6
VDD – 1.2
—
—
V
%
%
%
mA
mA
mA
mA
Output Compliance RangeGuaranteed by Design——
Offset Error—0—LSB
Gain Error2 mA Full Scale Output Current—0.052%
Gain-Error Tempco—320—nA/°C
VDD Power Supply Rejection
Ratio
Output Capacitance—2—pF
Dynamic Performance
Startup Time—10—µs
Gain Variation From 2 mA
range
Power Consumption
Power Supply Current
1 mA Full Scale Output Current
0.5 mA Full Scale Output Current
0.25 mA Full Scale Output Current
2 mA Full Scale Output Current
1 mA Full Scale Output Current
0.5 mA Full Scale Output Current
0.25 mA Full Scale Output Current
—2—µA/V
—
—
0.35
Rev. 1.075
C8051F410/1/2/3
NOTES:
76Rev. 1.0
C8051F410/1/2/3
7.Voltage Reference
The Voltage reference MUX on C8051F41x devices is configurable to use an externally connected voltage
reference, the internal reference voltage generator, or the V
REFSL bit in the Reference Control register (REF0CN) selects the reference source. For an external
source or the interna l refere nce, REF SL should be set to ‘0’. To use V
should be set to ‘1’.
The internal voltage r efere nce ci rcuit c onsi sts of a te mpe rature stable ba ndgap vo ltage refer ence genera -
tor and a gain-of-two ou tput buffer ampli fier. The output voltage is select ed between 1 .5 V and 2.2 V. The
internal voltage refere nce c an be dr i ven o ut on the V
to a ‘1’ (see
Figure 7.1). The load seen by the V
REF
pin must draw less than 200 µA to GND. When us in g
REF
the internal voltage refe rence, bypass capacitors of 0.1 µF and 4.7 µF are r ecommended from the V
pin to GND. If the internal reference is not used, the REFBE bit should be cleared to ‘0’.
The BIASE bit enables the internal voltage bias generator, which is used by the ADC, Temperature Sensor,
internal oscillators, and IDACs. This bit is forced to logic 1 when any of the aforementioned peripherals are
enabled. The bias generator may be enabled manually by writing a ‘1’ to the BIASE bit in register
REF0CN; see
SFR Definition 7.1 for REF0CN register details.
The electrical specifications for the voltage reference circuit are given in Table 7.1.
power supply voltag e (se e Figure 7.1). The
DD
as the reference source, REFSL
DD
pin by setting the REFBE bit in register REF0CN
REF
REFLV
REFLV
Figure 7.1. Voltage Reference Functional Block Diagram
Rev. 1.077
C8051F410/1/2/3
Important Note About the V
the internal V
. When using either an exter nal voltage refer ence or the in ternal refer ence circuit ry, P1.2
REF
Pin: Port pin P1.2 is used as the external V
REF
input and as an output for
REF
should be configured as an analog pin, and skipped by the Digital Cr ossbar. To config ure P1. 2 as an ana
log pin, clear Bit 2 in r egiste r P1 MDIN to ‘0’ a nd set Bit 2 in register P1 to '1 '. To configure the Crossbar to
skip P1.2, set Bit
2 in register P1SKIP to ‘1’. Refer to Sec tion “18. Port Input/Output” on page 147 for
complete Port I/O configuration details. The TEMPE bit in register REF0CN enables/disables the temperature sensor. While disabled, the temperature sensor defaul ts to a high impedance state and any ADC0
measurements performed on the sensor result in meaningless data.
SFR Definition 7.1. REF0CN: Reference Control
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
IDAMRGGFZTCENREFLVREFSLTEMPEBIASEREFBE00000000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0SFR Address:
0xD1
Bit7:IDAMRG: IDAC Output Merge Select.
0: IDA1 Output is P0.1.
1: IDA1 Output is P0.0 (Merged with IDA0 Output).
Bit6:GF. General Purpose Flag.
This bit is a general purpose flag for use under software control.
Bit5:ZTCEN: Zero-TempCo Bias Enable Bit.
0: ZeroTC Bias Generator automatically enabled when needed.
1: ZeroTC Bias Generator forced on.
Bit4:REFLV: Voltage Reference Output Level Select.
This bit selects the output voltage level for the internal voltage reference.
0: Internal voltage reference set to 1.5 V.
1: Internal voltage reference set to 2.2 V.
Bit3:REFSL: Voltage Reference Select.
This bit selects the source for the internal voltage reference.
0: V
1: V
Bit2:TEMPE: Temperature Sensor Enable Bit.
0: Internal Temperature Sensor off.
1: Internal Temperature Sensor on.
Bit1:BIASE: Internal Analog Bias Generator Enable Bit.
0: Internal Analog Bias Generator automatically enabled when needed.
1: Internal Analog Bias Generator on.
Bit0:REFBE: Internal Reference Buffer Enable Bit.
0: Internal Reference Buffer disabled.
1: Internal Reference Buffer enabled. Internal voltage reference driven on the V
pin used as voltage reference.
REF
used as voltage reference.
DD
REF
pin.
-
78Rev. 1.0
C8051F410/1/2/3
Table 7.1. Voltage Reference Electrical Charac teristics
VDD = 2.0 V; –40 to +85 °C unless otherwise specified.
ParameterConditionsMinTypMaxUnits
Internal Reference (REFBE = 1)
Output Voltage
V
Short-Circuit Current
REF
V
Temperature Coefficient
REF
25 °C ambient (REFLV = 0)
25 °C ambient (REFLV = 1), VDD = 2.5 V
1.47
2.16
—3.0—mA
—35—ppm/°C
Load RegulationLoad = 0 to 200 µA to GND—10—ppm/µA
V
Turn-on TimeVDD = 2.5 V, V
REF
4.7 µF tantalum, 0.1 µF ceramic bypass
0.1 µF ceramic bypass
VDD = 2.5 V, V
4.7 µF tantalum, 0.1 µF ceramic bypass
0.1 µF ceramic bypass
REF
REF
= 1.5 V:
—
—
= 2.2 V:
—
—
Power Supply R eje ct i on—2—mV/V
External Reference (REFBE = 0)
Input Voltage Range0—
Input Current
Sample Rate = 200 ksps; V
REF
= 2 V
—5—µA
Bias Generators
ADC Bias GeneratorBIASE = ‘1’—22—µA
Power Consumption (Internal)—50—µA
1.5
2.2
2.5
55
6.8
144
1.53
2.24
—
—
—
—
VDD
V
ms
µs
ms
µs
V
Rev. 1.079
C8051F410/1/2/3
NOTES:
80Rev. 1.0
C8051F410/1/2/3
R
N
N
V
8.Voltage Regulator (REG0)
C8051F41x devices incl ude an on-chip low dropout voltage regul ator (REG0). The input to REG0 at the
V
enabled, the output of REG0 appears on the V
power external devices. On reset, REG0 is enabled and can be disabled by software.
pin can be as high as 5.25 V. The output can be selecte d by software to 2.1 V or 2.5 V. W h e n
REGIN
pin, powers the microcontroller core, and can be used to
DD
The input (V
tor (4.7 µF + 0.1 µF) to ground. This capacitor will eliminate power spikes and provide any immediate
power required by the microcontroller. A settling time associa ted with the voltage regulator is show n in
Table 8.1.
) and output (VDD) of the voltage regulator should both be pr otec ted with a la rge ca paci-
REGIN
EG0
V
DD
4.7 µF
.1 µF
V
V
REGI
DD
4.7 µF.1 µF
Figure 8.1. External Capacitors for Voltage Regulator Input/Output
If the internal voltage regulator is not used, the V
DD
4.7 µF.1 µF
Figure 8.2. External Capacitors for Voltage Regulator Input/Output
input should be tied to VDD, as shown i n Fi g ure 8.2.
REGIN
V
REGI
V
DD
Rev. 1.081
C8051F410/1/2/3
SFR Definition 8.1. REG0CN: Regulator Control
R/WR/WRR/WRRRRReset Value
REGDIS Reserved—REG0MD———DROPOUT 00010000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
Bit 7:REGDIS: Voltage Regulator Disable Bit.
This bit disables/enables the Voltage Regulator.
0: Voltage Regulator Enabled.
1: Voltage Regulator Disabled.
Bit 6: RESERVED. Read = 0b. Must write 0b.
Bit 5:UNUSED. Read = 0b. Write = don’t care.
Bit 4:REG0MD: Voltage Regulator Mode Select Bit.
This bit selects the Voltage Regulator output voltage.
0: Voltage Regulator output is 2.1 V.
1: Voltage Regulator output is 2.5 V (default).
Bits 3–1: UNUSED. Read = 0b. Write = don’t care.
Bit 0:DROPOUT: Voltage Regulator Dropout Indicator Bit.
0: Voltage Regulator is not in dropout.
1: Voltage Regulator is in or near dropout.
SFR Address:
0xC9
Table 8.1. Voltage Regulator Electrical Specifications
VDD = 2.1 or 2.5 V; –40 to +85 °C unless otherwise specified. Typical values are given at 25 ºC.
ParameterConditionsMinTypMaxUnits
Input Voltage Range (V
Dropout Voltage (VDO)—715
Output Voltage (VDD)
Bias Current
Dropout Indicator Detection
Threshold
Output Voltage Tempco—600—µV/ºC
VREG Settling Time
*Note: Actual Output Voltage (VDD) = Nominal Output Voltage (VDD) – Dropout Voltage (VDO)(max load).
)*(See Note)—5.25
REGIN
Output Current = 1 mA
REG0MD = ‘0’
REG0MD = ‘1’
REG0MD = ‘0’
REG0MD = ‘1’
2.0
2.35
—
—
—65—mV
50 mA load with V
and V
load capacitor of 4.8 µF
DD
REGIN
= 2.5 V
—250—µs
2.1
2.5
1
1
2.25
2.55
1.5
1.5
V
mV/mA
V
µA
82Rev. 1.0
C8051F410/1/2/3
P
P
P
P
P
P
P
P
P
P
P
P
9.Comparators
C8051F41x devices include two on-chip programmable voltage comparators: Comparator0 is shown in
Figure 9.1; Comparator1 is shown in Figure 9.2. The two comparators operate identically, but only
Comparator0 can be used as a reset source.
The Comparator offers programmab le respo nse ti me and hys teres is, an ana log in put m ultiple xer, and two
outputs that are optionally av ailable at the Port pins: a synchronous “ latched” output (CP0, CP1), or an
asynchronous “raw” output (CP0A, CP1A). The asynchronous C P0A signal is available even when the
system clock is not act ive. This allo ws the Comparato r to operate and generate an output with the d evice
in STOP or SUSPEND mo de. When a ssig ned to a P ort pin , the Com parator ou tput m ay b e config ured as
open drain or push-pull (see
be used as a reset source (see Section “15.5. Comparator0 Reset” on page 130).
The Comparator0 inputs are selected in the CPT0MX register (SFR Definition 9.2). The CMX0P3-CMX0P0
bits select the Comparator0 pos itive input; the CMX0N3-CMX0N0 bits select the Comparator0 negative
input. The Comparator1 inputs are selected in the CPT1MX register (
CMX1P0 bits select the Comparator1 po sitive input; the CMX1N3-CMX1N0 bits select the Comparator1
negative input.
Important Note About Comparator Inputs: The Port pins select ed as Com parato r in puts s hou ld be con-
figured as analog inputs in their associated Port configuration register (with a ‘1’ written to the corresponding Port Latch registe r), and configured to be skip ped by the Crossbar (for details on Por t configuration,
see
Section “18.3. General Purpose Port I/O” on page 154)
Section “18.2. Port I/O Initialization” on page 151). Comparator0 may also
SFR Definition 9.4). The CMX1P3-
CP0EN
CP0OUT
CMX0N3
CMX0N2
CMX0N1
CMX0N0
CMX0P3
CPT0MX
CMX0P2
CMX0P1
CMX0P0
0.1
0.3
0.5
0.7
1.1
1.3
1.5
1.7
2.1
2.3
2.5
2.7
P0.0
P0.2
P0.4
P0.6
P1.0
P1.2
P1.4
P1.6
P2.0
P2.2
P2.4
P2.6
Figure 9.1. Comparator0 Functional Block Diagram
CP0RIF
CP0FIF
CP0HYP1
CPT0CN
CP0HYP0
CP0HYN1
CP0HYN0
CP0 +
CP0 -
Rev. 1.083
VDD
CP0
Interrupt
CP0
Rising-edge
Interrup t
+
-
GND
Reset
Decision
Tree
SET
SET
D
D
Q
CLR
CLR
Q
(SYNCHRONIZER)
Q
Q
Crossbar
Logic
CP0
Falling-edge
CP0
CP0A
CPT0MD
CP0MD1
CP0MD0
CP0RIE
CP0FIE
C8051F410/1/2/3
P
P
P
P
P
P
P
P
P
P
P
P
The Comparator output can be pol led i n software, u sed a s an interru pt sourc e, in ternal o scilla tor sus pend
awakening source and /or rou ted to a P ort pin. W hen rou ted to a P ort pin, th e Comparator output i s avail
able asynchronous or synchronous to the system clock; the asynchronous output is available even in
STOP or SUSPEND mode (with no system clock active). When disabled, the Comparator output (if
assigned to a Port I/O pin via the Crossbar) defaults to the log ic low state, and its supply curren t falls to
less than 100
nA. See Section “18.1. Priority Crossbar Decoder ” on page 149 for details on configuring
Comparator outputs via the dig ital Crossbar. Comparator inputs can be externally driv en from -0.25 V to
(V
) + 0.25 V without dam age or upset. The complete Comparato r electrical specificatio ns are given in
DD
Table 9.1.
The Comparator response time may be configured in software via the CPTnMD registers (see SFR Defini-
tion 9.3 and SFR Definition 9.5). Selecting a longer response time reduces the Comparator supply current.
See Table 9.1 for complete timing and curren t consumption specifications.
CP1EN
CP1OUT
0.1
0.3
0.5
0.7
1.1
1.3
1.5
1.7
2.1
2.3
2.5
2.7
CMX1N3
CMX1N2
CMX1N1
CMX1N0
CMX1P3
CPT1MX
CMX1P2
CMX1P1
CMX1P0
P0.0
P0.2
P0.4
P0.6
P1.0
P1.2
P1.4
P1.6
P2.0
P2.2
P2.4
P2.6
CP1RIF
CP1FIF
CP1HYP1
CPT1CN
CP1HYP0
CP1HYN1
CP1HYN0
CP1 +
CP1 -
VDD
CP1
Interrup t
CP1
Rising-edge
Interrup t
Logic
+
-
GND
SET
SET
Q
D
D
CLR
CLR
Q
(SYNCHRONIZER)
Q
Q
Crossbar
CP1
Falling-edge
CP1
CP1A
CPT1MD
CP1MD1
CP1MD0
CP1RIE
CP1FIE
-
84Rev. 1.0
Figure 9.2. Comparator1 Functional Block Diagram
CP0+
VIN+
CP0-
VIN-
CIRCUIT CONFIGURATION
Positive Hysteresis Voltage
(Programmed with CP0HYP Bits)
VIN-
INPUTS
VIN+
OUTPUT
V
OL
Positive Hysteresis
Disabled
C8051F410/1/2/3
+
CP0
_
V
OH
OUT
Maximum
Positive Hysteresis
Negative Hysteresis
Disabled
Negative Hysteresis Voltage
(Programmed by CP0HYN Bits)
Maximum
Negative Hy steresi s
Figure 9.3. Comparator Hysteresis Plot
The Comparator hysteres is is software-programmable via its Comparator Con trol register CPTnCN (for
n
= 0 or 1). The user can program both the amount of hysteresis voltage (referred to the input voltage) and
the positive and negative-going symmetry of this hysteresis around the threshold voltage.
The Comparator hysteresis is programmed using Bits3-0 in the Comparator Control Register CPTnCN
(shown in
determined by the settings of the CPnHYN bits. As shown in Table 9.1, settings of 20, 10 or 5 mV of
negative hysteresis can be programmed, or negative hysteresis can be disabled. In a similar way, the
amount of positive hysteresis is determined by setting the CPnHYP bits.
Comparator interrupts can be generated on both rising-edge and falling-edge output transitions. (For Interrupt enable and prior ity control, see Sect ion “12. Interrupt Handler” on page 110). The CPnFIF flag is
set to logic 1 upon a C omparator fall ing-e dge det ect, an d the CPnRIF flag is set t o logi c 1 up on the C omparator rising-edge detect. Once set, these bits remain set until cleared by software. The output state of
the Comparator can be obtained at any tim e by reading the CPnOUT bit. The Comparator is enabl ed by
setting the CPnEN bit to logic 1, and is disabled by clearing this bit to logic 0.
The output state of the Comparator can be obtained at any time by reading the CPnOUT bit. The Comparator is enabled by setting the CPnEN bit to logic 1, and is disabled by cl earin g thi s bit t o lo gic 0 . Wh en th e
Comparator is enabled, the internal oscillator is awakened from SUSPEND mode if the Comparator output
is logic
SFR Definition 9.1 and SFR Definition 9.6). The amount of negative hysteresis voltage is
0.
Note that false rising ed ges a nd fa ll in g ed ges can b e d etec ted whe n th e c ompar ator i s firs t po wer ed-on or
if changes are made to the hy ste re sis o r res po ns e tim e c ontro l bi ts. Ther efore, it is recommended that the
rising-edge and falling-edge flags be explicitly cleared to logic
enabled or its mode bits have been changed. This Power Up Time is specified in
VDD = 2.0 V, –40 to +85 °C unless otherwise noted. All specifications apply to both Comparator0 and Comparator1
unless otherwise noted. Typical values are given at 25
ParameterConditionsMinTypMaxUnits
Response Time:
Mode 0, Vcm1 = 1.5 V
CP0+ – CP0– = 100 mV—120—ns
CP0+ – CP0– = –100 mV—160—ns
ºC.
Response Time:
Mode 1, Vcm1 = 1.5 V
Response Time:
Mode 2, Vcm1 = 1.5 V
Response Time:
Mode 3, Vcm1 = 1.5 V
Common-Mode Rejection Ratio
Positive Hysteresis 1CP0HYP1-0 = 00—0.52.0mV
1. Vcm is the common-mode voltage on CP0+ and CP0–.
2. Guaranteed by design and/or characterization.
92Rev. 1.0
—0.24mV/V
C8051F410/1/2/3
10. CIP-51 Microcontroller
The MCU system controller core is the CIP-51 microcontroller. The CIP-51 is fully compatible with the
MCS-51™ instruction s et. Standard 8 03x/805x assemblers and compile rs can be used to develop soft
ware. The C8051F41x family has a superset of all the peripherals included with a standard 8051. See Section “1. System Ov erview” on page 19 for more informat ion about the a vailable peripheral s. The CIP-51
includes on-chi p d ebu g h ar dwa re wh ic h i nte rf ac es di r ect ly wi th the a nal og and di gi tal s ubsy ste ms , p rovi ding a complete data acquisition or control-system solution in a single integrated circuit.
The CIP-51 Microcont roller core implements the standar d 8051 organization and perip herals as well as
additional custo m perip herals an d functi ons to exte nd its capabil ity (see
The CIP-51 core includes the following features:
Figure 10.1 for a block diagram).
-
- Fully Compatible with MCS-51 Instruction
Set
- 50 MIPS Peak Throughput
- 256 Bytes of Internal RAM
DATA BUS
RESET
CLOCK
STOP
IDLE
D8
ACCUMULATOR
PSW
D8
BUFFER
DATA POINTER
PC INCREMENTER
PROGRAM COUNTER (PC)
PRGM. ADDRESS REG.
CONTROL
LOGIC
POWER CONTROL
REGISTER
D8
TMP1TMP2
ALU
PIPELINE
DATA BUS
D8
D8
DATA BUS
D8
D8
D8
- Extended Interrupt Handler
- Reset Input
- Power Management Modes
- Integrated Debug Logic
D8
DATA BUS
B REGISTER
ADDRESS
REGISTER
D8
INTERFACE
D8
A16
INTERFACE
D8
INTERRUPT
INTERFACE
D8
SRAM
D8
SFR
BUS
MEMORY
STACK POINTER
SRAM
(256 X 8)
D8
SFR_ADDRESS
SFR_CONTROL
SFR_WRITE_DATA
SFR_READ_DATA
MEM_ADDRESS
MEM_CONTROL
MEM_WRITE_DATA
MEM_READ_DATA
SYSTEM_IRQs
EMULATION_IRQ
D8
Figure 10.1. CIP-51 Block Diagram
Rev. 1.093
C8051F410/1/2/3
Performance
The CIP-51 employs a pipelined architecture that greatly increases its instruction throughput over the standard 8051 architecture. In a standard 8051, all i nstruction s except for MU L and DIV take 12 or 24 syste m
clock cycles to execute, and usually have a maximum syst em clock of 12
core executes 70% of its instructions in one or two syst em clock cycles , with no instruct ions taking more
than eight system clock cycles.
With the CIP-51's system clock running at 50 MHz, it has a peak throughput of 50 MIPS. The CIP-51 has a
total of 109 instructions. The table below shows the total number of instructions that require each execution
time.
Clocks to Execute122/433/5454/668
Number of Instructions2650510752121
Programming and Debugging Support
In-system programming of the Flash program memory and communication with on-chip debug support
logic is accomplished via the Silicon Labs 2-Wire (C 2) inte rfa ce . Note th at the r e- programmable Flash can
also be read and written a singl e byte at a time by the application softwa re using the MOVC and MOVX
instructions. This feature allows program memory to be used for non-volatile data storage as well as updat
ing program code under software control.
MHz. By contrast, the CIP-51
-
The on-chip debug support logic facilitates full speed in-circuit debugging, allowing the setting of hardware
breakpoints, starting, sto pping and single steppi ng through program e xecution (includi ng interr upt servic e
routines), examination of the progra m's call stack, and reading/writin g the contents of re gisters and m em
ory. This method of on-chip debuggi ng is completely non-intrusive, requiring no RAM, Stack, timers, or
other on-chip resources.
The CIP-51 is supported by development tools from Silicon Laboratories, Inc. and third party vendors. Silicon Laboratories prov ides an inte grated de ve lopmen t enviro nment (I DE) inc luding e dit or, evaluation compiler, assembler, debugger and programmer. The IDE's debugger and programmer inte rf ac e to th e CIP-5 1
via the on-chip debug logic to provide fast and efficient in-syst em device programming and debugg ing.
Third party macro assemblers and C compilers are also available.
10.1. Instruction Set
The instruction set of the CIP-51 System Controller is fully compatible with the standard MCS-51™ instruction set. Standard 8051 development to ols can be used to develop software for the CIP-51. All CIP-51
instructions are th e binary and functional equivale nt of their MCS-51™ counterparts, inc luding opcodes,
addressing modes and effect on PSW flags. However, instruction timing is different than tha t of the stan
dard 8051.
10.1.1. Instruction and CPU Timing
In many 8051 implementations, a distinction is made between machine cycles and clock cycles, with
machine cycles varying from 2 to 12 clock cycles in length. However, the CIP-51 implementation is based
solely on clock cycle timing. All instruction timings are specified in terms of clock cycles.
-
-
Due to the pipelined archite cture of the CIP-51, most instructions execute in the same number of clock
cycles as there are program bytes in the instruction. Conditional branch instructions take two less clock
cycles to complete when the branch is not taken as opposed to when the branch is taken.
CIP-51 Instruction Set Sum mary, which inc ludes the mnemonic, number of bytes, a nd number of clock
cycles for each instruction.
94Rev. 1.0
Table 10.1 is the
C8051F410/1/2/3
10.1.2. MOVX Instruction and Program Memory
The MOVX instruc tio n i s ty pi ca ll y us ed to acc ess da ta stored in XDATA memory space . In th e CIP-51, the
MOVX instruction can also be u sed to wri te or erase o n-chip progr am memor y space implement ed as reprogrammable Flash m emory. The Flash access feature pro vides a mechanis m for the CIP-51 to u pdate
program code and use the program memory space for non-volatile data storage. Refer to
“16. Flash Memory” on page 135 for fu rther details.
Table 10.1. CIP-51 Instruction Set Summary1
Section
MnemonicDescriptionBytes
Arithmetic Operations
ADD A, RnAdd register to A11
ADD A, directAdd direct byte to A22
ADD A, @RiAdd indirect RAM to A12
ADD A, #dataAdd immediate to A22
ADDC A, RnAdd register to A with carry11
ADDC A, directAdd direct byte to A with carry22
ADDC A, @RiAdd indirect RAM to A with carry12
ADDC A, #dataAdd immediate to A with carry22
SUBB A, RnSubtract register from A with borrow11
SUBB A, directSubtract direct byte from A with borrow22
SUBB A, @RiSubtract indirect RAM from A with borrow12
SUBB A, #dataSubtract immediate from A with borrow22
INC AIncrement A11
INC RnIncrement register11
INC directIncrement direct byte22
INC @RiIncrement indirect RAM12
DEC ADecrement A11
DEC RnDecrement register11
DEC directDecrement direct byte22
DEC @RiDecrement indirect RAM12
INC DPTRIncrement Data Pointer11
MUL ABMultiply A and B14
DIV ABDivide A by B18
DA ADecimal adjust A11
Logical Operations
ANL A, RnAND Register to A11
ANL A, directAND direct byte to A22
ANL A, @RiAND indirect RAM to A12
ANL A, #dataAND immediate to A22
ANL direct, AAND A to direct byte22
ANL direct, #dataAND immediate to direct byte33
ORL A, RnOR Register to A11
ORL A, directOR direct byte to A22
Notes:
1. Assumes PFEN = 1 for all instruction timing.
2. MOVC instructions take 4 to 7 clock cycles depending on instruction alignment and the FLRT setting (SFR
Definition 16.3. FLSCL: Flash Scale).
Clock
Cycles
Rev. 1.095
C8051F410/1/2/3
Table 10.1. CIP-51 Instruction Set Summary1 (Continued)
MnemonicDescriptionBytes
ORL A, @RiOR indirect RAM to A12
ORL A, #dataOR immediate to A22
ORL direct, AOR A to direct byte22
ORL direct, #dataOR immediate to direct byte33
XRL A, RnExclusive-OR Register to A11
XRL A, directExclusive-OR direct byte to A22
XRL A, @RiExclusive-OR indirect RAM to A12
XRL A, #dataExclusive-OR immediate to A22
XRL direct, AExclusive-OR A to direct byte22
XRL direct, #dataExclusive-OR immediate to direct byte33
CLR AClear A11
CPL AComplement A11
RL ARotate A left11
RLC ARotate A left through Carry11
RR ARotate A right11
RRC ARotate A right through Carry11
SWAP ASwap nibbles of A11
Data Transfer
MOV A, RnMove Register to A11
MOV A, directMove direct byte to A22
MOV A, @RiMove indirect RAM to A12
MOV A, #dataMove imm edi ate to A22
MOV Rn, AMove A to Register11
MOV Rn, directMove direct byte to Register22
MOV Rn, #dataMove immediate to Register22
MOV direct, AMove A to direct byte22
MOV direct, RnMove Register to direct byte22
MOV direct, directMove direct byte to direct byte33
MOV direct, @RiMove indirect RAM to direct byte22
MOV direct, #dataMove immediate to direct byte33
MOV @Ri, AMove A to indirect RAM12
MOV @Ri, directMove direct byte to indirect RAM22
MOV @Ri, #dataMove immediate to indirec t RAM22
MOV DPTR, #data16Load DPTR with 16-bit constant33
MOVC A, @A+DPTRMove code byte relative DPTR to A1
MOVC A, @A+PCMove code byte relative PC to A1
MOVX A, @RiMove external data (8-bit address) to A13
MOVX @Ri, AMove A to external data (8-bit address)13
MOVX A, @DPTRMove external data (16-bit address) to A13
MOVX @DPTR, AMove A to external data (16-bit address)13
PUSH directPush direct byte onto stack22
Notes:
1. Assumes PFEN = 1 for all instruction timing.
2. MOVC instructions take 4 to 7 clock cycles depending on instruction alignment and the FLRT setting (SFR
Definition 16.3. FLSCL: Flash Scale).
Clock
Cycles
4 to 7
4 to 7
2
2
96Rev. 1.0
C8051F410/1/2/3
Table 10.1. CIP-51 Instruction Set Summary1 (Continued)
MnemonicDescriptionBytes
POP directPop direct byte from stack22
XCH A, RnExchange Register with A11
XCH A, directExchange direct byte with A22
XCH A, @RiExchange indirect RAM with A12
XCHD A, @RiExchange low nibble of indirect RAM with A12
Boolean Manipulation
CLR CClear Carry11
CLR bitClear direct bit22
SETB CSet Carry11
SETB bitSet direct bit22
CPL CComplement Carry11
CPL bitComplement direct bit22
ANL C, bitAND direct bit to Carry22
ANL C, /bitAND complement of direct bit to Carry22
ORL C, bitOR direct bit to carry22
ORL C, /bitOR complement of direct bit to Carry22
MOV C, bitMove direct bit to Carry22
MOV bit, CMove Carry to direct bit22
JC relJump if Carry is set22/4
JNC relJump if Carry is not set22/4
JB bit, relJump if direct bit is set33/5
JNB bit, relJump if direct bit is not set33/5
JBC bit, relJump if direct bit is set and clear bit33/5
Program Branching
ACALL addr11Absolute subroutine call24
LCALL addr16Long subroutine call35
RETReturn from subroutine16
RETIReturn from interrupt16
AJMP addr11Absolute jump24
LJMP addr16Long jump35
SJMP relShort jump (relative address)24
JMP @A+DPTRJump indirect relative to DPTR14
JZ relJump if A equals zero22/4
JNZ relJump if A does not equal zero22/4
CJNE A, direct, relCompare direct byte to A and jump if not equal33/5
CJNE A, #data, relCompare immediate to A and jump if not equal33/5
CJNE Rn, #data, relCompare immediate to Register and jump if not equal33/5
CJNE @Ri, #data, relCompare immediate to indirect and jump if not equal34/6
DJNZ Rn, relDecrement Register and jump if not zero22/4
DJNZ direct, relDecrement direct byte and jump if not zero33/5
NOPNo operation11
Notes:
1. Assumes PFEN = 1 for all instruction timing.
2. MOVC instructions take 4 to 7 clock cycles depending on instruction alignment and the FLRT setting (SFR
Definition 16.3. FLSCL: Flash Scale).
Clock
Cycles
Rev. 1.097
C8051F410/1/2/3
Notes on Registers, Operands and Addressing Modes:
- Register R0-R7 of the currently selected register bank.
Rn
@Ri - Data RAM location addressed indirectly through R0 or R1.
rel - 8-bit, signed (two’s complement) offset relative to the first byte of the following instruction. Used by
SJMP and all conditional jumps.
direct - 8-bit internal data location’s address. This could be a direct-access Data RAM location (0x00-
0x7F) or an SFR (0x80-0xFF).
#data - 8-bit constant
#data16 - 16-bit constant
bit - Direct-accessed bit in Data RAM or SFR
addr11 - 11-bit destination address used by ACALL and AJMP . The destination must be within the same
2K-byte page of program memory as the first byte of the following instruction.
addr16 - 16-bit destination address used by LCALL and LJMP. The destination may be anywhere within
the 8K-byte program memory space.
There is one unused opcode (0xA5) that performs the same function as NOP.
Following are descriptions of SFRs related to the operation of the CIP-51 System Controller. Reserved bits
should not be set to lo gic
which case the res et valu e of t he bit will be log ic
tions of the remaining SFRs are included in the sections of the datasheet associated with their corresponding system function.
1. Future product v ersions may use these bits to implement new feature s in
0, selecting the feature's defaul t state. Detailed descrip-
SFR Definition 10.1. SP: Stack Pointe r
R/WR/WR/WR/WR/WR/WR/WR/WReset V alue
00000111
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
SFR Address: 0x81
Bits7–0: SP: Stack Pointer.
The Stack Pointer holds the location of the top of the stack. The stack pointer is incremented
before every PUSH operation. The SP register defaults to 0x07 after reset.
98Rev. 1.0
C8051F410/1/2/3
SFR Definition 10.2. DPL: Data Pointer Low Byte
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
00000000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
SFR Address: 0x82
Bits7–0: DPL: Data Pointer Low.
The DPL register is the low byte of the 16-bit DPTR. DPTR is used to access indirectly
addressed XRAM and Flash memory.
SFR Definition 10.3. DPH: Data Pointer High Byte
R/WR/WR/WR/WR/WR/WR/WR/WReset Value
00000000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
SFR Address: 0x83
Bits7–0: DPH: Data Pointer High.
The DPH register is the high byte of the 16-bit DPTR. DPTR is used to access indirectly
addressed XRAM and Flash memory.
Rev. 1.099
C8051F410/1/2/3
SFR Definition 10.4. PSW: Program Status Word
R/WR/WR/WR/WR/WR/WR/WRReset Value
CYACF0RS1RS0OVF1PARITY00000000
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
SFR Address: 0xD0
Bit7:CY: Carry Flag.
This bit is set when the last arithmetic operation resulted in a carry (addition) or a borrow
(subtraction). It is cleared to 0 by all other arithmetic operations.
Bit6:AC: Auxiliary Carry Flag
This bit is set when the last arithmetic operation resulted in a carry into (addition) or a borrow
from (subtraction) the high order nibble. It is cleared to 0 by all other arithmetic operations.
Bit5:F0: User Flag 0.
This is a bit-addressable, general purpose flag for use under software control.
Bits4–3: RS1–RS0: Register Bank Sel ec t.
These bits select which register bank is used during register accesses.
This bit is set to 1 under the following circumstances:
• An ADD, ADDC, or SUBB instruction causes a sign-change overflow.
• A MUL instruction results in an overflow (result is greater than 255).
• A DIV instruction causes a divide-by-zero condition.
The OV bit is cleared to 0 by the ADD, ADDC, SUBB, MUL, and DIV instructions in all other
cases.
Bit1:F1: User Flag 1.
This is a bit-addressable, general purpose flag for use under software control.
Bit0:PARITY: Parity Flag.
This bit is set to 1 if the sum of the eight bits in the accumulator is odd and cleared if the sum
is even.
100Rev. 1.0
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.