C8051F340/1/2/3/4/5/6/7
Full Speed USB Flash MCU Family
Analog Peripherals
-
10-Bit ADC
•
•
•
•
•
-
Two comparators
-
Internal voltage reference
-
Brown-out detector and POR Circuitry
USB Function Controller
-
USB specification 2.0 compliant
-
Full speed (12 Mbps) or low speed (1.5 Mbps) operation
-
Integrated clock recovery; no external crystal required for
-
-
-
On-Chip Debug
-
On-chip debug circuitry facilitates full speed, non-intru-
-
-
sive in-system debug (No emulator required)
Provides breakpoints, single stepping,
inspect/modify memory and registers
Superior performance to emulation systems using
ICE-chips, target pods, and sockets
full speed or low speed
Supports eight flexible endpoints
1 kB USB buffer memory
Integrated transceiver; no external resistors required
Up to 200 ksps
Built-in analog multiplexer with single-ended and
differential mode
VREF from external pin, internal reference, or V
DD
Built-in temperature sensor
External conversion start input option
HIgh Speed 8051 µC Core
-
Pipelined instruction architecture; executes 70% of
-
-
Memory
-
4352 or 2304 Bytes RAM
-
64 or 32 kB Flash; In-system programmable in 512-byte
sectors
Instructions in 1 or 2 system clocks
48 MIPS and 25 MIPS versions available.
Expanded interrupt handler
Digital Peripherals
-
40/25 Port I/O; All 5 V tolerant with high sink current
-
Hardware enhanced SPI™, SMBus™, and one or two
-
-
enhanced UART serial ports
Four general purpose 16-bit counter/timers
16-bit programmable counter array (PCA) with five cap-
ture/compare modules
External Memory Interface (EMIF)
-
Clock Sources
-
Internal Oscillator: 0.25% accuracy with clock recovery
-
enabled. Supports all USB and UART modes
External Oscillator: Crystal, RC, C, or clock (1 or 2 Pin
modes)
Low Frequency (80 kHz) Internal Oscillator
Can switch between clock sources on-the-fly
Voltage Supply Input: 2.7 to 5.25 V
-
Voltages from 3.6 to 5.25 V supported using On-Chip
Voltage Regulator
-
-
Packages
-
48-pin TQFP (C8051F340/1/4/5)
-
32-pin LQFP (C8051F342/3/6/7)
Temperature Range: –40 to +85 °C
ANALOG
PERIPHERALS
A
M
U
X
DIGITAL I/O
CROSSBAR
UART0
UART1
SPI
SMBus
PCA
4 Timers
Port 0
Ext. Memory I/F
Port 1
Port 2
Port 3
Port 4
10-bit
200 ksps
ADC
VREF
+
-
+
-
TEMP
SENSOR
VREG
48 Pin Only
PRECISION INTERNAL
OSCILLATORS
USB Controller /
Transceiver
HIGH-SPEED CONTROLLER CORE
64/32 kB
ISP FLASH
FLEXIBLE
INTERRUPTS
8051 CPU
(48/25 MIPS)
DEBUG
CIRCUITRY
4/2 kB RAM
POR
WDT
Rev. 1.0 8/06
Copyright © 2006 by Silicon Laboratories
C8051F34x
This information applies to a product under development. Its characteristics and specifications are subject to change without notice.
C8051F340/1/2/3/4/5/6/7
N
OTES
:
2
Rev. 1.0
C8051F340/1/2/3/4/5/6/7
Table of Contents
1. System Overview.................................................................................................... 19
1.1. CIP-51™ Microcontroller Core.......................................................................... 23
1.1.1. Fully 8051 Compatible.............................................................................. 23
1.1.2. Improved Throughput ............................................................................... 23
1.1.3. Additional Features .................................................................................. 23
1.2. On-Chip Memory............................................................................................... 25
1.3. Universal Serial Bus Controller ......................................................................... 26
1.4. Voltage Regulator ............................................................................................. 27
1.5. On-Chip Debug Circuitry................................................................................... 27
1.6. Programmable Digital I/O and Crossbar ........................................................... 28
1.7. Serial Ports ....................................................................................................... 29
1.8. Programmable Counter Array ........................................................................... 29
1.9. 10-Bit Analog to Digital Converter..................................................................... 30
1.10.Comparators..................................................................................................... 31
2. Absolute Maximum Ratings .................................................................................. 32
3. Global DC Electrical Characteristics .................................................................... 33
4. Pinout and Package Definitions............................................................................ 36
5. 10-Bit ADC (ADC0).................................................................................................. 45
5.1. Analog Multiplexer ............................................................................................ 46
5.2. Temperature Sensor ......................................................................................... 47
5.3. Modes of Operation .......................................................................................... 49
5.3.1. Starting a Conversion............................................................................... 49
5.3.2. Tracking Modes........................................................................................ 50
5.3.3. Settling Time Requirements ..................................................................... 51
5.4. Programmable Window Detector ...................................................................... 56
5.4.1. Window Detector In Single-Ended Mode ................................................. 58
5.4.2. Window Detector In Differential Mode...................................................... 59
6. Voltage Reference .................................................................................................. 61
7. Comparators ........................................................................................................... 63
8. Voltage Regulator (REG0)...................................................................................... 73
8.1. Regulator Mode Selection................................................................................. 73
8.2. VBUS Detection ................................................................................................ 73
9. CIP-51 Microcontroller ........................................................................................... 77
9.1. Instruction Set ................................................................................................... 78
9.1.1. Instruction and CPU Timing ..................................................................... 78
9.1.2. MOVX Instruction and Program Memory ................................................. 79
9.2. Memory Organization........................................................................................ 83
9.2.1. Program Memory...................................................................................... 83
9.2.2. Data Memory............................................................................................ 84
9.2.3. General Purpose Registers ...................................................................... 84
9.2.4. Bit Addressable Locations........................................................................ 84
9.2.5. Stack ....................................................................................................... 84
9.2.6. Special Function Registers....................................................................... 85
Rev. 1.0
3
C8051F340/1/2/3/4/5/6/7
9.2.7. Register Descriptions ............................................................................... 89
9.3. Interrupt Handler ............................................................................................... 91
9.3.1. MCU Interrupt Sources and Vectors ........................................................ 91
9.3.2. External Interrupts .................................................................................... 91
9.3.3. Interrupt Priorities ..................................................................................... 92
9.3.4. Interrupt Latency ...................................................................................... 92
9.3.5. Interrupt Register Descriptions................................................................. 93
9.4. Power Management Modes ............................................................................ 100
9.4.1. Idle Mode................................................................................................ 100
9.4.2. Stop Mode .............................................................................................. 100
10. Prefetch Engine .................................................................................................... 103
11. Reset Sources....................................................................................................... 105
11.1.Power-On Reset ............................................................................................. 106
11.2.Power-Fail Reset / VDD Monitor .................................................................... 107
11.3.External Reset ................................................................................................ 108
11.4.Missing Clock Detector Reset ........................................................................ 108
11.5.Comparator0 Reset ........................................................................................ 108
11.6.PCA Watchdog Timer Reset .......................................................................... 108
11.7.Flash Error Reset ........................................................................................... 108
11.8.Software Reset ............................................................................................... 109
11.9.USB Reset...................................................................................................... 109
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 .......................................................................... 113
12.1.3.Flash Write Procedure ........................................................................... 114
12.2.Non-volatile Data Storage .............................................................................. 115
12.3.Security Options ............................................................................................. 115
13. External Data Memory Interface and On-Chip XRAM........................................ 121
13.1.Accessing XRAM............................................................................................ 121
13.1.1.16-Bit MOVX Example ........................................................................... 121
13.1.2.8-Bit MOVX Example ............................................................................. 121
13.2.Accessing USB FIFO Space .......................................................................... 122
13.3.Configuring the External Memory Interface .................................................... 123
13.4.Port Configuration........................................................................................... 123
13.5.Multiplexed and Non-multiplexed Selection.................................................... 126
13.5.1.Multiplexed Configuration....................................................................... 126
13.5.2.Non-multiplexed Configuration............................................................... 127
13.6.Memory Mode Selection................................................................................. 127
13.6.1.Internal XRAM Only ............................................................................... 128
13.6.2.Split Mode without Bank Select.............................................................. 128
13.6.3.Split Mode with Bank Select................................................................... 129
13.6.4.External Only.......................................................................................... 129
13.7.Timing .......................................................................................................... 129
13.7.1.Non-multiplexed Mode ........................................................................... 131
4
Rev. 1.0
C8051F340/1/2/3/4/5/6/7
13.7.2.Multiplexed Mode ................................................................................... 134
14. Oscillators ............................................................................................................. 139
14.1.Programmable Internal High-Frequency (H-F) Oscillator ............................... 140
14.1.1.Internal H-F Oscillator Suspend Mode ................................................... 140
14.2.Programmable Internal Low-Frequency (L-F) Oscillator ................................ 141
14.2.1.Calibrating the Internal L-F Oscillator..................................................... 141
14.3.External Oscillator Drive Circuit...................................................................... 143
14.3.1.Clocking Timers Directly Through the External Oscillator...................... 143
14.3.2.External Crystal Example....................................................................... 143
14.3.3.External RC Example............................................................................. 144
14.3.4.External Capacitor Example................................................................... 144
14.4.4x Clock Multiplier .......................................................................................... 146
14.5.System and USB Clock Selection .................................................................. 147
14.5.1.System Clock Selection ......................................................................... 147
14.5.2.USB Clock Selection .............................................................................. 147
15. Port Input/Output.................................................................................................. 151
15.1.Priority Crossbar Decoder .............................................................................. 153
15.2.Port I/O Initialization ....................................................................................... 155
15.3.General Purpose Port I/O ............................................................................... 158
16. Universal Serial Bus Controller (USB0).............................................................. 167
16.1.Endpoint Addressing ...................................................................................... 168
16.2.USB Transceiver ............................................................................................ 168
16.3.USB Register Access ..................................................................................... 170
16.4.USB Clock Configuration................................................................................ 174
16.5.FIFO Management ......................................................................................... 175
16.5.1.FIFO Split Mode ..................................................................................... 175
16.5.2.FIFO Double Buffering ........................................................................... 176
16.5.3.FIFO Access .......................................................................................... 176
16.6.Function Addressing....................................................................................... 177
16.7.Function Configuration and Control................................................................ 177
16.8.Interrupts ........................................................................................................ 180
16.9.The Serial Interface Engine ............................................................................ 184
16.10.Endpoint0 ..................................................................................................... 184
16.10.1.Endpoint0 SETUP Transactions .......................................................... 185
16.10.2.Endpoint0 IN Transactions................................................................... 185
16.10.3.Endpoint0 OUT Transactions............................................................... 186
16.11.Configuring Endpoints1-3 ............................................................................. 188
16.12.Controlling Endpoints1-3 IN.......................................................................... 188
16.12.1.Endpoints1-3 IN Interrupt or Bulk Mode............................................... 188
16.12.2.Endpoints1-3 IN Isochronous Mode..................................................... 189
16.13.Controlling Endpoints1-3 OUT...................................................................... 191
16.13.1.Endpoints1-3 OUT Interrupt or Bulk Mode........................................... 191
16.13.2.Endpoints1-3 OUT Isochronous Mode................................................. 192
17. SMBus ................................................................................................................... 197
17.1.Supporting Documents ................................................................................... 198
Rev. 1.0
5