C8051F52x/F53x
8/4/2 kB ISP Flash MCU Family
Analog Peripherals
-
12-Bit ADC
•
Programmable throughput up to 200 ksps
•
Up to 6/16 external inputs
•
Data dependent windowed interrupt generator
•
Built-in temperature sensor
-
Comparator
•
Programmable hysteresis and response time
•
Configurable as wake-up or reset source
•
Low current
-
POR/Brownout Detector
-
Voltage Reference—1.5 and 2.2 V
(programmable)
Memory
-
8/4/2 kB Flash; In-system byte programmable in
-
Digital Peripherals
-
16/6 port I/O; push-pull or open-drain, 5 V tolerant
-
Hardware SPI™, and UART serial port
-
LIN 2.1 Controller (Master and Slave capable); no
-
-
crystal required
Three general purpose 16-bit counter/timers
Programmable 16-bit counter/timer array with three
capture/compare modules, WDT
512 byte sectors
256 bytes internal data RAM
On-Chip Debug
-
On-chip debug circuitry facilitates full-speed, non-
-
-
-
Supply Voltage 2.0 to 5.25 V
-
Built-in LDO regulator
High-Speed 8051 µC Core
-
Pipelined instruction architecture; executes 70% of
-
-
instructions in 1 or 2 system clocks
Up to
25 MIPS
throughput with
25 MHz system clock
Expanded interrupt handler
intrusive in-system debug (No emulator required)
Provides breakpoints, single stepping
Inspect/modify memory and registers
Complete development kit
Clock Sources
-
Internal oscillators: 24.5 MHz
±0.5%
accuracy sup-
-
ports UART and LIN-Master operation
External oscillator: Crystal, RC, C, or Clock
(1 or 2 pin modes)
Can switch between clock sources on-the-fly
-
Packages
-
10-Pin DFN (3 x 3 mm)
-
20-pin QFN (4 x 4 mm)
-
20-pin TSSOP
Automotive Qualified
-
Temperature Range:
–40 to +125 °C
-
Compliant to AEC-Q100
ANALOG
PERIPHERALS
A
M
U
X
DIGITAL I/O
UART
SPI
PCA
Timer 0
Timer 1
Timer 2
Port 0
CROSSBAR
12-bit
200 ksps
ADC
+
-
VOLTAGE
COMPARATOR
Port 1
LIN
TEMP
SENSOR
VREF
VREG
24.5 MHz High Precision (±0.5%) Internal Oscillator
HIGH-SPEED CONTROLLER CORE
8/4/2 kB
ISP FLASH
FLEXIBLE
INTERRUPTS
8051 CPU
(25 MIPS)
DEBUG
CIRCUITRY
256 B SRAM
POR
WDT
Rev. 1.4 4/12
Copyright © 2012 by Silicon Laboratories
C8051F52x/F53x
C8051F52x/F53x
2
Rev. 1.4
C8051F52x/F53x
Table of Contents
1. System Overview ..................................................................................................... 13
1.1. Ordering Information.......................................................................................... 14
1.2. CIP-51™ Microcontroller ................................................................................... 18
1.2.1. Fully 8051 Compatible Instruction Set ...................................................... 18
1.2.2. Improved Throughput................................................................................ 18
1.2.3. Additional Features ................................................................................... 18
1.2.4. On-Chip Debug Circuitry ........................................................................... 18
1.3. On-Chip Memory ............................................................................................... 20
1.4. Operating Modes ............................................................................................... 21
1.5. 12-Bit Analog to Digital Converter ..................................................................... 22
1.6. Programmable Comparator ............................................................................... 23
1.7. Voltage Regulator.............................................................................................. 23
1.8. Serial Port.......................................................................................................... 23
1.9. Port Input/Output ............................................................................................... 24
2. Electrical Characteristics ........................................................................................ 25
2.1. Absolute Maximum Ratings............................................................................... 25
2.2. Electrical Characteristics ................................................................................... 26
3. Pinout and Package Definitions ............................................................................. 35
4. 12-Bit ADC (ADC0) ................................................................................................... 52
4.1. Analog Multiplexer ............................................................................................. 52
4.2. Temperature Sensor.......................................................................................... 53
4.3. ADC0 Operation ................................................................................................ 54
4.3.1. Starting a Conversion................................................................................ 54
4.3.2. Tracking Modes......................................................................................... 54
4.3.3. Timing ....................................................................................................... 55
4.3.4. Burst Mode................................................................................................ 57
4.3.5. Output Conversion Code........................................................................... 59
4.3.6. Settling Time Requirements...................................................................... 60
4.4. Selectable Gain ................................................................................................. 60
4.4.1. Calculating the Gain Value........................................................................ 61
4.4.2. Setting the Gain Value .............................................................................. 62
4.5. Programmable Window Detector....................................................................... 69
4.5.1. Window Detector In Single-Ended Mode .................................................. 71
5. Voltage Reference.................................................................................................... 72
6. Voltage Regulator (REG0) ....................................................................................... 74
7. Comparator ............................................................................................................. 76
8. CIP-51 Microcontroller............................................................................................. 81
8.1. Instruction Set.................................................................................................... 82
8.1.1. Instruction and CPU Timing ...................................................................... 82
8.1.2. MOVX Instruction and Program Memory .................................................. 83
8.2. Register Descriptions ........................................................................................ 86
8.3. Power Management Modes............................................................................... 89
8.3.1. Idle Mode .................................................................................................. 90
Rev. 1.4
3
C8051F52x/F53x
8.3.2. Stop Mode................................................................................................. 90
8.3.3. Suspend Mode .......................................................................................... 90
9. Memory Organization and SFRs............................................................................. 92
9.1. Program Memory............................................................................................... 92
9.2. Data Memory ..................................................................................................... 93
9.3. General Purpose Registers ............................................................................... 93
9.4. Bit Addressable Locations ................................................................................. 93
9.5. Stack
............................................................................................................ 93
9.6. Special Function Registers................................................................................ 93
10. Interrupt Handler.................................................................................................... 98
10.1. MCU Interrupt Sources and Vectors................................................................ 98
10.2. Interrupt Priorities ............................................................................................ 98
10.3. Interrupt Latency.............................................................................................. 98
10.4. Interrupt Register Descriptions ...................................................................... 100
10.5. External Interrupts ......................................................................................... 104
11. Reset Sources ...................................................................................................... 106
11.1. Power-On Reset ............................................................................................ 107
11.2. Power-Fail Reset / VDD Monitors (VDDMON0 and VDDMON1) .................. 108
11.2.1. VDD Monitor Thresholds and Minimum VDD........................................ 108
11.3. External Reset ............................................................................................... 110
11.4. Missing Clock Detector Reset ....................................................................... 110
11.5. Comparator Reset ......................................................................................... 110
11.6. PCA Watchdog Timer Reset ......................................................................... 110
11.7. Flash Error Reset .......................................................................................... 110
11.8. Software Reset .............................................................................................. 111
12. Flash Memory....................................................................................................... 113
12.1. Programming The Flash Memory .................................................................. 113
12.1.1. Flash Lock and Key Functions .............................................................. 113
12.1.2. Flash Erase Procedure ......................................................................... 114
12.1.3. Flash Write Procedure .......................................................................... 114
12.2. Flash Write and Erase Guidelines ................................................................. 115
12.2.1. V
DD
Maintenance and the V
DD
monitor ................................................ 115
12.2.2. PSWE Maintenance .............................................................................. 115
12.2.3. System Clock ........................................................................................ 116
12.3. Non-volatile Data Storage ............................................................................. 117
12.4. Security Options ............................................................................................ 117
13. Port Input/Output ................................................................................................. 120
13.1. Priority Crossbar Decoder ............................................................................. 122
13.2. Port I/O Initialization ...................................................................................... 126
13.3. General Purpose Port I/O .............................................................................. 128
14. Oscillators ............................................................................................................ 135
14.1. Programmable Internal Oscillator .................................................................. 135
14.1.1. Internal Oscillator Suspend Mode ......................................................... 136
14.2. External Oscillator Drive Circuit..................................................................... 139
14.2.1. Clocking Timers Directly Through the External Oscillator..................... 139
4
Rev. 1.4
C8051F52x/F53x
14.2.2. External Crystal Example...................................................................... 139
14.2.3. External RC Example............................................................................ 141
14.2.4. External Capacitor Example.................................................................. 141
14.3. System Clock Selection................................................................................. 143
15. UART0 ................................................................................................................... 144
15.1. Enhanced Baud Rate Generation.................................................................. 145
15.2. Operational Modes ........................................................................................ 146
15.2.1. 8-Bit UART ............................................................................................ 146
15.2.2. 9-Bit UART ............................................................................................ 147
15.3. Multiprocessor Communications ................................................................... 148
16. Enhanced Serial Peripheral Interface (SPI0) ..................................................... 151
16.1. Signal Descriptions........................................................................................ 152
16.1.1. Master Out, Slave In (MOSI)................................................................. 152
16.1.2. Master In, Slave Out (MISO)................................................................. 152
16.1.3. Serial Clock (SCK) ................................................................................ 152
16.1.4. Slave Select (NSS) ............................................................................... 152
16.2. SPI0 Master Mode Operation ........................................................................ 153
16.3. SPI0 Slave Mode Operation .......................................................................... 154
16.4. SPI0 Interrupt Sources .................................................................................. 155
16.5. Serial Clock Timing........................................................................................ 156
16.6. SPI Special Function Registers ..................................................................... 156
17. LIN (C8051F520/0A/3/3A/6/6A and C8051F530/0A/3/3A/6/6A) .......................... 164
17.1. Software Interface with the LIN Peripheral .................................................... 165
17.2. LIN Interface Setup and Operation................................................................ 165
17.2.1. Mode Definition ..................................................................................... 165
17.2.2. Baud Rate Options: Manual or Autobaud ............................................. 165
17.2.3. Baud Rate Calculations—Manual Mode ............................................... 165
17.2.4. Baud Rate Calculations—Automatic Mode ........................................... 168
17.3. LIN Master Mode Operation .......................................................................... 169
17.4. LIN Slave Mode Operation ............................................................................ 170
17.5. Sleep Mode and Wake-Up ............................................................................ 171
17.6. Error Detection and Handling ........................................................................ 171
17.7. LIN Registers................................................................................................. 172
17.7.1. LIN Direct Access SFR Registers Definition ......................................... 172
17.7.2. LIN Indirect Access SFR Registers Definition....................................... 174
18. Timers ................................................................................................................... 182
18.1. Timer 0 and Timer 1 ...................................................................................... 182
18.1.1. Mode 0: 13-bit Counter/Timer ............................................................... 182
18.1.2. Mode 1: 16-bit Counter/Timer ............................................................... 184
18.1.3. Mode 2: 8-bit Counter/Timer with Auto-Reload..................................... 184
18.1.4. Mode 3: Two 8-bit Counter/Timers (Timer 0 Only)................................ 185
18.2. Timer 2 .......................................................................................................... 190
18.2.1. 16-bit Timer with Auto-Reload............................................................... 190
18.2.2. 8-bit Timers with Auto-Reload............................................................... 191
18.2.3. External Capture Mode ......................................................................... 192
Rev. 1.4
5