C8051F52x/F52xA/F53x/F53xA
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 1.8 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
Temperature Range: –40 to +125 °C
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.3 4/11
Copyright © 2011 by Silicon Laboratories
C8051F52x/52xA/53x/53xA
C8051F52x/F52xA/F53x/F53xA
2
Rev. 1.3
C8051F52x/F52xA/F53x/F53xA
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 ............................................................................... 22
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.3
3
C8051F52x/F52xA/F53x/F53xA
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 Monitor ................................................................... 107
11.3. External Reset ............................................................................................... 109
11.4. Missing Clock Detector Reset ....................................................................... 109
11.5. Comparator Reset ......................................................................................... 109
11.6. PCA Watchdog Timer Reset ......................................................................... 110
11.7. Flash Error Reset .......................................................................................... 110
11.8. Software Reset .............................................................................................. 110
12. Flash Memory....................................................................................................... 112
12.1. Programming The Flash Memory .................................................................. 112
12.1.1. Flash Lock and Key Functions .............................................................. 112
12.1.2. Flash Erase Procedure ......................................................................... 113
12.1.3. Flash Write Procedure .......................................................................... 113
12.2. Flash Write and Erase Guidelines ................................................................. 114
12.2.1. V
DD
Maintenance and the V
DD
monitor ................................................ 114
12.2.2. PSWE Maintenance .............................................................................. 114
12.2.3. System Clock ........................................................................................ 115
12.3. Non-volatile Data Storage ............................................................................. 116
12.4. Security Options ............................................................................................ 116
13. Port Input/Output ................................................................................................. 119
13.1. Priority Crossbar Decoder ............................................................................. 121
13.2. Port I/O Initialization ...................................................................................... 125
13.3. General Purpose Port I/O .............................................................................. 127
14. Oscillators ............................................................................................................ 134
14.1. Programmable Internal Oscillator .................................................................. 134
14.1.1. Internal Oscillator Suspend Mode ......................................................... 135
14.2. External Oscillator Drive Circuit..................................................................... 138
14.2.1. Clocking Timers Directly Through the External Oscillator..................... 138
14.2.2. External Crystal Example...................................................................... 138
4
Rev. 1.3
C8051F52x/F52xA/F53x/F53xA
14.2.3. External RC Example............................................................................ 140
14.2.4. External Capacitor Example.................................................................. 140
14.3. System Clock Selection................................................................................. 142
15. UART0 ................................................................................................................... 143
15.1. Enhanced Baud Rate Generation.................................................................. 144
15.2. Operational Modes ........................................................................................ 145
15.2.1. 8-Bit UART ............................................................................................ 145
15.2.2. 9-Bit UART ............................................................................................ 146
15.3. Multiprocessor Communications ................................................................... 147
16. Enhanced Serial Peripheral Interface (SPI0) ..................................................... 150
16.1. Signal Descriptions........................................................................................ 151
16.1.1. Master Out, Slave In (MOSI)................................................................. 151
16.1.2. Master In, Slave Out (MISO)................................................................. 151
16.1.3. Serial Clock (SCK) ................................................................................ 151
16.1.4. Slave Select (NSS) ............................................................................... 151
16.2. SPI0 Master Mode Operation ........................................................................ 152
16.3. SPI0 Slave Mode Operation .......................................................................... 153
16.4. SPI0 Interrupt Sources .................................................................................. 154
16.5. Serial Clock Timing........................................................................................ 155
16.6. SPI Special Function Registers ..................................................................... 155
17. LIN (C8051F520/0A/3/3A/6/6A and C8051F530/0A/3/3A/6/6A) .......................... 163
17.1. Software Interface with the LIN Peripheral .................................................... 164
17.2. LIN Interface Setup and Operation................................................................ 164
17.2.1. Mode Definition ..................................................................................... 164
17.2.2. Baud Rate Options: Manual or Autobaud ............................................. 164
17.2.3. Baud Rate Calculations—Manual Mode ............................................... 164
17.2.4. Baud Rate Calculations—Automatic Mode ........................................... 167
17.3. LIN Master Mode Operation .......................................................................... 168
17.4. LIN Slave Mode Operation ............................................................................ 169
17.5. Sleep Mode and Wake-Up ............................................................................ 170
17.6. Error Detection and Handling ........................................................................ 170
17.7. LIN Registers................................................................................................. 171
17.7.1. LIN Direct Access SFR Registers Definition ......................................... 171
17.7.2. LIN Indirect Access SFR Registers Definition....................................... 173
18. Timers ................................................................................................................... 181
18.1. Timer 0 and Timer 1 ...................................................................................... 181
18.1.1. Mode 0: 13-bit Counter/Timer ............................................................... 181
18.1.2. Mode 1: 16-bit Counter/Timer ............................................................... 183
18.1.3. Mode 2: 8-bit Counter/Timer with Auto-Reload..................................... 183
18.1.4. Mode 3: Two 8-bit Counter/Timers (Timer 0 Only)................................ 184
18.2. Timer 2 .......................................................................................................... 189
18.2.1. 16-bit Timer with Auto-Reload............................................................... 189
18.2.2. 8-bit Timers with Auto-Reload............................................................... 190
18.2.3. External Capture Mode ......................................................................... 191
19. Programmable Counter Array (PCA0)................................................................ 194
Rev. 1.3
5