![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
single/dual battery, 0. 9?3.6 v, 16?8 kb, smartclock, 12/10-bit adc mcu c8051f91x-c8051f90x rev. 1.3 11/13 copyright ? 2013 by silicon laboratories c8051f91x-c8051f90x ultra-low power - 160 a/mhz in active mode (24.5 mhz clock) - 2 s wake-up time (two-cell mode) - 10 na sleep mode with memory retention - 50 na sleep mode with brownout detector - 300 na sleep mode with lfo (?f912/02 only) - 600 na sleep mode with external crystal supply voltage 0.9 to 3.6 v - one-cell mode supports 0.9 to 1.8 v operation (?f9 11/01). ?f912 and ?f902 devices can operate from 0.9 to 3.6 v continuously - two-cell mode supports 1.8 to 3.6 v operation - built-in dc-dc converter with 1.8 to 3.3 v output for use in on e-cell mode - built-in ldo regulator allows a high analog supply voltage and low digital core voltage - 2 built-in supply monitors (brownout detectors) 12-bit or 10-bit analog to digital converter - 1 lsb inl (10-bit mode); 1.5 lsb inl (12-bit mode, ?f912/02 only) no missing codes - programmable throughput up to 300 ksps (10-bit mode) or 75 ksps (12-bit mode, ?f912/02 only) - up to 15 external inputs - on-chip voltage reference - on-chip pga allows measuring voltages up to twice the reference voltage - 16-bit auto-averaging accumulator with burst mode provides increased adc resolution - data dependent windowed interrupt generator - built-in temperature sensor two comparators - programmable hysteresis and response time - configurable as wake-up or reset source - up to 15 capacitive touch sense inputs 6-bit programmable current reference - up to 500 a. can be used as a bias or for gen erating a custom reference voltage - pwm enhanced mode on ?f912/02 devices high-speed 8051 c core - pipelined instruction architecture; executes 70% of instructions in 1 or 2 system clocks - up to 25 mips th roughput with 25 mhz clock - expanded interrupt handler memory - 768 bytes ram - 16 kb (?f912/1) or 8 kb (?f902/1) flash; in-system prog rammable digital peripherals - 16 port i/o; all 5 v tolerant with high sink current an d programmable drive strength - hardware smbus? (i 2 c? compatible), 2 x spi?, and uart serial ports available concurrently - four general purpose 16-bit counter/timers - programmable 16-bit counte r/timer array with six capture/compare modules and watchdog timer clock sources - internal oscillators: 24.5 mhz, 2% accuracy supp orts uart operation; 20 mhz low power oscil lator requires very little bias current - external oscillator: crystal, rc, c, or cmos clock - smartclock oscillator: 32 khz crystal or internal lo w frequency oscillator (?f912/02) or self-oscillate mode - can switch between clock s ources on-the-fly; useful in implementing various power saving modes on-chip debug - on-chip debug circuitry fac ilitates full-speed, non- intrusive in-system debug (no emulator required) - provides 4 breakpoints, single stepping - inspect/modify memory and registers - complete development kit packages - 24-pin qfn (4x4 mm) - 24-pin qsop (easy to hand-solder) - tested die available temperature range: ?40 to +85 c analog peripherals 12/10-bit 75/300 ksps adc 16/8 kb isp flash 768 b sram por debug circuitry flexible interrupts 8051 cpu (25 mips) temp sensor digital i/o 24.5 mhz precision internal oscillator high-speed controller core a m u x crossbar voltage comparators + ? wdt uart smbus pca timer 0 timer 1 timer 2 timer 3 port 0 2 x spi iref port 1 port 2 + ? vreg 20 mhz low power internal oscillator vref crc hardware smartclock external oscillator
c8051f91x-c8051f90x 2 rev. 1.3 c8051f91x-c8051f90x rev. 1.3 3 table of contents 1. system overview............ ............................................................................. ........... 20 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. port input/output....... ............................................................................. ........... 24 1.3. serial ports ............ ................................................................................ ........... 25 1.4. programmable counter array ... ............................................................. ........... 25 1.5. sar adc with 16-bit auto-averaging accumulator and autonomous low power burst mode26 1.6. programmable current reference (iref0) ..... .............. ............... ........... ......... 27 1.7. comparators .......................................................................................... ........... 27 2. ordering information...... ............................................................................. ........... 30 3. pinout and package definitions..... ............... ............................................. ........... 31 4. electrical characteristics.......... .................................................................. ........... 42 4.1. absolute maximum specificati ons ...................... ................................. ............. 42 4.2. electrical characterist ics.................. ........................................................ ......... 43 5. sar adc with 16-bit auto-averaging accumulator and autonomous low power burst mode68 5.1. output code formatting ......... ............................................................... ........... 69 5.2. modes of operation ............. .................................................................. ........... 70 5.2.1. starting a conversion....... ............................................................. ........... 70 5.2.2. tracking modes................ ............................................................. ........... 71 5.2.3. burst mode ........... ......................................................................... ........... 72 5.2.4. settling time r equirements ................ .......................................... ........... 74 5.2.5. gain setting........ ........................................................................... ........... 75 5.3. 8-bit mode.......... .................................................................................. ............. 75 5.4. 12-bit mode (c8051f912/02 only) . ................. .............. ............... ........... ......... 75 5.5. low power mode (c8051f912/902 only) .............................................. ........... 75 5.6. programmable window detector ........................................................... ........... 83 5.6.1. window detector in sing le-ended mode .......... ............................ ........... 85 5.6.2. adc0 specifications......... ............................................................. ........... 85 5.7. adc0 analog multiplexer........ ............................................................... ........... 86 5.8. temperature sensor ............ .................................................................. ........... 88 5.8.1. calibration .......... ........................................................................... ........... 89 5.9. voltage and ground reference options............... ................................. ........... 91 5.10.external voltage references.... ............................................................. ........... 92 5.11.internal voltage references ..... ............................................................. ........... 92 5.12.analog ground referenc e................................................................... ............. 92 5.13.temperature sensor enable .... ............................................................. ........... 92 5.14.voltage reference electrical specifications .. .......................................... ......... 93 6. programmable current reference (iref0) ....... .......................................... ......... 94 6.1. pwm enhanced mode .............. ............................................................. ........... 94 c8051f91x-c8051f90x 4 rev. 1.3 6.2. iref0 specifications............ .................................................................. ........... 95 7. comparators ................ ................................................................................ ........... 96 7.1. comparator inputs .... ............................................................................. ........... 96 7.2. comparator outputs ............ .................................................................. ........... 97 7.3. comparator response time................. ................................................. ........... 98 7.4. comparator hysteresis ............... ........................................................... ........... 98 7.5. comparator register descripti ons...................... ................................. ............. 99 7.6. comparator0 and comparator1 analog multiple xers........................... ........... 103 8. cip-51 microcontroller .............. .................................................................. ......... 106 8.1. performance .......................................................................................... ......... 106 8.2. programming and debugging suppor t ................................................ ........... 107 8.3. instruction set ........... ............................................................................. ......... 107 8.3.1. instruction and cpu timing .. ........................................................ ......... 107 8.4. cip-51 register descriptions.... ............................................................. ......... 112 9. memory organization..... ............................................................................. ......... 115 9.1. program memory ................. .................................................................. ......... 116 9.1.1. movx instruction and program memory ... ................................. ........... 116 9.2. data memory ............ ............................................................................. ......... 116 9.2.1. internal ram ........ ......................................................................... ......... 116 9.2.2. external ram ....... ......................................................................... ......... 117 10. on-chip xram......... .................................................................................. ........... 118 10.1.accessing xram.......... ......................................................................... ......... 118 10.1.1.16-bit movx example ....... ........................................................... ......... 118 10.1.2.8-bit movx example ......... ........................................................... ......... 118 10.2.special function registers..... ............................................................... ......... 119 11. special function registers ...... .................................................................. ......... 120 11.1.sfr paging .............. ............................................................................. ......... 121 12. interrupt handler ............ ............................................................................. ......... 127 12.1.enabling interrupt sources ..... ............................................................... ......... 127 12.2.mcu interrupt source s and vectors.............. ................................................. 127 12.3.interrupt priorities ..... ............................................................................. ......... 128 12.4.interrupt latency....... ............................................................................. ......... 128 12.5.interrupt register de scriptions ............. ................................................. ......... 130 12.6.external interrupts int0 and int1 ................. ................................................. 137 13. flash memory ................. ............................................................................. ......... 139 13.1.programming the flash memory .......................................................... ......... 139 13.1.1.flash lock and key functi ons ................ .............. ............... .................. 139 13.1.2.flash erase procedure ...... ........................................................... ......... 140 13.1.3.flash write procedure ..... ............................................................. ......... 140 13.2.non-volatile data storage ... .................................................................. ......... 140 13.3.security options ....... ............................................................................. ......... 141 13.4.determining the devi ce part number at run time ..... ................................... 143 13.5.flash write and erase guidelines ............... .......................................... ......... 143 13.5.1.vdd maintenance and the vd d monitor .......... ............................ ......... 143 13.5.2.pswe maintenance ......... ............................................................. ......... 144 c8051f91x-c8051f90x rev. 1.3 5 13.5.3.system clock ....... ......................................................................... ......... 144 13.6.minimizing flash read current .. ........................................................... ......... 145 14. power management........ ............................................................................. ......... 149 14.1.normal mode ............ ............................................................................. ......... 150 14.2.idle mode............... ................................................................................ ......... 151 14.3.stop mode ......... .................................................................................. ........... 151 14.4.suspend mode ............. ......................................................................... ......... 152 14.5.sleep mode .............. ............................................................................. ......... 152 14.6.configuring wakeup sources... ............................................................. ......... 153 14.7.determining the event that caused the last wakeup... ............... .................. 154 14.8.power management spec ifications ........ ............................................... ......... 157 15. cyclic redundancy check unit ( crc0) .............. .............. ............... .................. 158 15.1.crc algorithm............ ........................................................................... ......... 158 15.2.32-bit crc algorithm.. ........................................................................... ......... 160 15.3.preparing for a crc ca lculation .......... ................................................. ......... 161 15.4.performing a crc calculation . ............................................................. ......... 161 15.5.accessing the crc0 result ..... ............................................................. ......... 161 15.6.crc0 bit reverse feat ure.............. ............................................................... 165 16. on-chip dc-dc converter (dc0) .............. ................................................. ......... 166 16.1.startup behavior....... ............................................................................. ......... 167 16.2. high power applications ......... ........................................................... ......... 168 16.3.pulse skipping mode........... .................................................................. ......... 168 16.4.enabling the dc-dc c onverter ............ ................................................. ......... 169 16.5.minimizing power supply nois e ............................................................ ......... 170 16.6.selecting the optimum switch size............. .......................................... ......... 170 16.7.dc-dc converter clocking opti ons ................ .............. ............... .................. 170 16.8.dc-dc converter behavior in sleep mode .......... ................................. ......... 171 16.9.bypass mode (c8051f912/02 only) .. .................................................. ........... 171 16.10.low power mode (c8051f912/02 only) ........... ................................. ........... 172 16.11.passive diode mode (c8051f912/02 only)........ ................................. ......... 172 16.12.dc-dc converter register descriptions ....... .............. ............... .................. 173 16.13.dc-dc converter specif ications ................. ................................................. 175 17. voltage regulator (vreg0) ...... .................................................................. ......... 176 17.1.voltage regulator elec trical specifications ............... ............................ ......... 176 18. reset sources.......... .................................................................................. ........... 177 18.1.power-on (vbat supply monitor) reset ...... ................................................. 178 18.2.power-fail (vdd/dc+ supply monitor) reset...... ................................. ......... 179 18.3.external reset .......... ............................................................................. ......... 182 18.4.missing clock detector reset ... ............... ............................................. ......... 182 18.5.comparator0 reset ............. .................................................................. ......... 182 18.6.pca watchdog timer reset ..... ............... ............................................. ......... 182 18.7.flash error reset ..... ............................................................................. ......... 183 18.8.smartclock (real time clock) reset ................ ................................. ......... 183 18.9.software reset ......... ............................................................................. ......... 183 19. clocking sources ........... ............................................................................. ......... 185 c8051f91x-c8051f90x 6 rev. 1.3 19.1.programmable precision inte rnal oscillator ....... ................................. ........... 186 19.2.low power internal oscillator. ............................................................... ......... 186 19.3.external oscillator drive circuit................ ............................................. ......... 186 19.3.1.external crystal mode...... ............................................................. ......... 186 19.3.2.external rc mode... ...................................................................... ......... 188 19.3.3.external capacitor mode.. ............................................................. ......... 189 19.3.4.external cmos clock mode ................. ................................................. 189 19.4.special function registers for select ing and configuring the system clock 190 20. smartclock (real time clock) .. ............................................................... ......... 193 20.1.smartclock interface .... ...................................................................... ......... 194 20.1.1.smartclock lock and key functions......... ................................. ......... 194 20.1.2.using rtc0adr and rtc0dat to a ccess smartclock internal registers 195 20.1.3.rtc0adr short stro be feature............. .............. ............... .................. 195 20.1.4.smartclock interface auto read feature .................. ................. ........... 195 20.1.5.rtc0adr autoincrement feature.......... .............. ............... .................. 196 20.2.smartclock clocking sources . ........................................................... ......... 199 20.2.1.using the smartclock oscillator with a crystal or external cmos clock . 199 20.2.2.using the smartclock o scillator in self-oscillate mo de............. ......... 200 20.2.3.using the low fr equency oscillator (lfo) ........... ............... .................. 200 20.2.4.programmable load capacitance.............. ................................. ........... 201 20.2.5.automatic gain control (cryst al mode only) and smartclock bias dou- bling ............ ................................................................................ ......... 202 20.2.6.missing smartclock detect or ............... .............. ............... .................. 204 20.2.7.smartclock oscillator cryst al valid detector .......... ................. ........... 204 20.3.smartclock timer and alarm function .............. ................................. ......... 204 20.3.1.setting and reading the smartclock timer value ..... ................ ......... 204 20.3.2.setting a smartclock alar m ............................... ............... .................. 205 20.3.3.software considerat ions for using the smartclock timer and alarm . 205 21. port input/output............ ............................................................................. ......... 210 21.1.port i/o modes of operation .................................................................. ......... 211 21.1.1.port pins configured for analog i/o............. ................................. ......... 211 21.1.2.port pins configured for digital i/o...... ................................................. 211 21.1.3.interfacing port i/o to 5 v and 3.3 v logic... ................................. ......... 212 21.1.4.increasing port i/ o drive strength ... ............................................. ......... 212 21.2.assigning port i/o pins to analog and digital functions.. ............ .................. 212 21.2.1.assigning port i/o pins to analog functions ...... ................................... 212 21.2.2.assigning port i/o pins to digital func tions............. ............ .................. 213 21.2.3.assigning port i/o pi ns to external digital ev ent capture functions .... 213 21.3.priority crossbar decoder ... .................................................................. ......... 214 21.4.port match ............. ................................................................................ ......... 220 21.5.special function register s for accessing and configuring port i/ o .............. 222 22. smbus ................. ......................................................................................... ......... 230 22.1.supporting documents ............. ............................................................. ......... 231 c8051f91x-c8051f90x rev. 1.3 7 22.2.smbus configuration... ............... ........................................................... ......... 231 22.3.smbus operation ....... ........................................................................... ......... 232 22.3.1.transmitter vs. receiver.. ............................................................. ......... 232 22.3.2.arbitration......... ............................................................................. ......... 233 22.3.3.clock low extension........ ............................................................. ......... 233 22.3.4.scl low timeout.... ...................................................................... ......... 233 22.3.5.scl high (smbus free) ti meout .............. ................................. ........... 233 22.4.using the smbus........ ........................................................................... ......... 234 22.4.1.smbus configuration regist er................ .............. ............... .................. 235 22.4.2.smb0cn control register . ........................................................... ......... 238 22.4.3.hardware slave address recognition ........... ............................... ......... 241 22.4.4.data register ....... ......................................................................... ......... 243 22.5.smbus transfer modes... ...................................................................... ......... 244 22.5.1.write sequence (master) ...... ........................................................ ......... 244 22.5.2.read sequence (master) ...... ........................................................ ......... 245 22.5.3.write sequence (slave) ........ ........................................................ ......... 246 22.5.4.read sequence (slave) ........ ........................................................ ......... 247 22.6.smbus status decoding ........................................................................ ......... 247 23. uart0................ ........................................................................................... ......... 252 23.1.enhanced baud rate g eneration.................. ................................................. 253 23.2.operational modes ....... ......................................................................... ......... 254 23.2.1.8-bit uart ........... ......................................................................... ......... 254 23.2.2.9-bit uart ........... ......................................................................... ......... 255 23.3.multiprocessor communications ... ........................................................ ......... 255 24. enhanced serial peripheral interface (spi0 and spi1)........ ............ .................. 260 24.1.signal descriptions....... ......................................................................... ......... 261 24.1.1.master out, slave in (mos i)...................... ................................. ........... 261 24.1.2.master in, slave out (miso)............... .......................................... ......... 261 24.1.3.serial clock (sck) ........... ............................................................. ......... 261 24.1.4.slave select (nss) .......... ............................................................. ......... 261 24.2.spi master mode oper ation ........................................................................... 262 24.3.spi slave mode operation ..... ............................................................... ......... 264 24.4.spi interrupt sources .......... .................................................................. ......... 264 24.5.serial clock phase and polari ty ............. ............................................... ......... 265 24.6.spi special function registers . ............... ............................................. ......... 267 25. timers................ ............................................................ ............... .............. ........... 27 4 25.1.timer 0 and ti mer 1 ............... ............................................................... ......... 276 25.1.1.mode 0: 13-bit counter/timer ................. .............. ............... .................. 276 25.1.2.mode 1: 16-bit counter/timer ................. .............. ............... .................. 277 25.1.3.mode 2: 8-bit counter/tim er with auto-reload.......... ................. ........... 278 25.1.4.mode 3: two 8-bit counter /timers (timer 0 only)..... ................. ........... 279 25.2.timer 2 ............. .................................................................................. ........... 284 25.2.1.16-bit timer with auto-rel oad............... ................................................. 284 25.2.2.8-bit timers with auto-rel oad............... ................................................. 285 25.2.3.comparator 0/smartclo ck capture mode ............... ................. ........... 286 c8051f91x-c8051f90x 8 rev. 1.3 25.3.timer 3 ............. .................................................................................. ........... 290 25.3.1.16-bit timer with auto-rel oad............... ................................................. 290 25.3.2.8-bit timers with auto-rel oad............... ................................................. 291 25.3.3.comparator 1/external oscillator capture mode ....... ................. ........... 292 26. programmable counter array ....... ............................................................. ......... 296 26.1.pca counter/timer ............. .................................................................. ......... 297 26.2.pca0 interrupt sources....... .................................................................. ......... 298 26.3.capture/compare modules ...... ............................................................. ......... 300 26.3.1.edge-triggered captur e mode................. .............. ............... .................. 301 26.3.2.software timer (compare) mode................. ................................. ......... 302 26.3.3.high-speed output mode ..... ........................................................ ......... 303 26.3.4.frequency output mode ....... ........................................................ ......... 304 26.3.5. 8-bit, 9-bit, 10-bi t and 11-bit pulse width modulator modes ............... 305 26.3.6. 16-bit pulse width m odulator mode........... ................................. ......... 307 26.4.watchdog timer mode .... ...................................................................... ......... 308 26.4.1.watchdog timer operation ... ........................................................ ......... 308 26.4.2.watchdog timer usage ........ ........................................................ ......... 309 26.5.register descriptions for pca0 ............................................................. ......... 310 27. c2 interface ................ .................................................................................. ......... 316 27.1.c2 interface registers......... .................................................................. ......... 316 27.2.c2 pin sharing ......... ............................................................................. ......... 319 document change list............... ...................................................................... ........ 320 contact information.......... ................................................................................ ........ 322 c8051f91x-c8051f90x rev. 1.3 9 list of figures figure 1.1. c8051f912 block diagr am ...................... ................................. ............. 21 figure 1.2. c8051f911 block diagr am ...................... ................................. ............. 21 figure 1.3. c8051f902 block diagr am ...................... ................................. ............. 22 figure 1.4. c8051f901 block diagr am ...................... ................................. ............. 22 figure 1.5. port i/o functional block diagram .... .......................................... ........... 24 figure 1.6. pca block dia gram................. .................................................. ............. 25 figure 1.7. adc0 functional bl ock diagram.............. ................................. ............. 26 figure 1.8. adc0 multiplexer bl ock diagram ............. ................................. ............. 27 figure 1.9. comparator 0 func tional block diagram ............... ............ ........... ......... 28 figure 1.10. comparator 1 func tional block diagram .. ................................ ........... 28 figure 3.1. qfn-24 pinout diagr am (top view) .......... ................................. ........... 34 figure 3.2. qsop-24 pi nout diagram f912 (top view) ....... ............... ........... ......... 35 figure 3.3. qfn-24 package mark ing diagram ........... ................................. ........... 36 figure 3.4. qsop-24 pa ckage marking diagram ... .............. ............... ........... ......... 37 figure 3.5. qfn-24 package drawin g ................ .......................................... ........... 38 figure 3.6. typical qfn-24 landi ng diagram.............. ................................. ........... 39 figure 3.7. qsop-24 pa ckage diagram ............. .......................................... ........... 40 figure 3.8. qsop-24 land ing diagram ............. .......................................... ......... 41 figure 4.1. active mode curr ent (external cmos clock) ..... ............... ........... ......... 48 figure 4.2. idle mode current (exter nal cmos clock) ......... ............... ........... ......... 49 figure 4.3. typical dc-dc converter effici ency (high current, vdd/dc+ = 2 v) ... 50 figure 4.4. typical dc-dc converter effici ency (high current, vdd/dc+ = 3 v) ... 51 figure 4.5. typical dc-dc converter effici ency (low current, vdd/dc+ = 2 v).... 52 figure 4.6. typical one-cell suspend mode current... ................................. ........... 53 figure 4.7. typical voh curves, 1.8?3.6 v ............... ................................. ............. 55 figure 4.8. typical voh curves, 0.9?1.8 v ............... ................................. ............. 56 figure 4.9. typical vol curves, 1.8?3.6 v ......... .......................................... ........... 57 figure 4.10. typical vol curves, 0.9?1.8 v .............. ................................. ............. 58 figure 5.1. adc0 functional bl ock diagram.............. ................................. ............. 68 figure 5.2. 10-bit adc tr ack and conversion example timing (bursten = 0).... 71 figure 5.3. burst mode tracking example wit h repeat count set to 4 .......... ......... 73 figure 5.4. adc0 equivalent i nput circuits ............. .............. ............... ........... ......... 74 figure 5.5. adc window co mpare example: right-justi fied single-ended data ... 85 figure 5.6. adc window co mpare example: left-justif ied single-ended data...... 85 figure 5.7. adc0 multiplexer bl ock diagram ............. ................................. ............. 86 figure 5.8. temperature sensor transfer function .............. ............... ........... ......... 88 figure 5.9. temperature sensor error with 1-point calibration (v ref = 1.68 v) ..... 89 figure 5.10. voltage re ference functional block diagram.. ........................... ......... 91 figure 7.1. comparator 0 func tional block diagram ............... ............ ........... ......... 96 figure 7.2. comparator 1 func tional block diagram ............... ............ ........... ......... 97 figure 7.3. comparator hysteres is plot ........... ............................................. ........... 98 figure 7.4. cpn multiplexer blo ck diagram................ ................................. ........... 103 figure 8.1. cip-51 block diagram.. ............................................................... ......... 106 c8051f91x-c8051f90x 10 rev. 1.3 figure 9.1. c8051f91x-c8051f90x memory map .. .............. ............... .................. 115 figure 9.2. flash program memory map............. .......................................... ......... 116 figure 13.1. flash program me mory map (16 kb and 8 kb dev ices).......... ........... 141 figure 14.1. c8051f91x-c8051f90x power distribution........... ................. ........... 150 figure 15.1. crc0 block diagram .. ............... ............................................... ......... 158 figure 15.2. bit reverse register ................................................................. ......... 165 figure 16.1. dc-dc conv erter block diagram...... ................................................. 166 figure 16.2. dc-dc conv erter configuration options ........ ................................... 169 figure 18.1. reset sources......... .................................................................. ......... 177 figure 18.2. power-fail reset timing diagram ........... ................................. ......... 178 figure 18.3. power-fail reset timing diagram ........... ................................. ......... 179 figure 19.1. clocking sources bl ock diagram ............. ................................. ......... 185 figure 19.2. 25 mhz external cr ystal example.......... ................................. ........... 187 figure 20.1. smartclock block di agram............. ................................................. 193 figure 20.2. interpreting oscillation robustness (duty cycle) test results.......... 202 figure 21.1. port i/o functional block diagram ................ ............................ ......... 210 figure 21.2. port i/o cell block diagram ............ .......................................... ......... 211 figure 21.3. crossbar priority decoder with no pins skipped ................. .............. 215 figure 21.4. crossbar priority decoder with crystal pins sk ipped ............. ........... 216 figure 22.1. smbus block diagram .. ............... ............................................. ......... 230 figure 22.2. typical smbus configuration .......... .......................................... ......... 231 figure 22.3. smbus transaction .... ............................................................... ......... 232 figure 22.4. typical smbus scl generation......................................................... 235 figure 22.5. typical master wr ite sequence ............... ................................. ......... 244 figure 22.6. typical ma ster read sequence ........ ................................................. 245 figure 22.7. typical sl ave write sequence ... ............................................... ......... 246 figure 22.8. typical slave read sequence ................. ................................. ......... 247 figure 23.1. uart0 block diagram ............. ................................................. ......... 252 figure 23.2. uart0 baud rate logi c ........................................................... ......... 253 figure 23.3. uart interconnect di agram ............. ................................................. 254 figure 23.4. 8-bit uart timing diagram...................................................... ......... 254 figure 23.5. 9-bit uart timing diagram...................................................... ......... 255 figure 23.6. uart multi-proc essor mode interconne ct diagram .......... ................ 256 figure 24.1. spi block di agram .............. ............................................................... 260 figure 24.2. multiple-master mode connection diagram .............................. ......... 263 figure 24.3. 3-wire single master and 3-wire single slave mode connection diagram 263 figure 24.4. 4-wire single master mode and 4-wire slave mode connection diagram 263 figure 24.5. master mode data/ clock timing .............. ................................. ......... 265 figure 24.6. slave mode data/clock timing (ckpha = 0) ... ............... .................. 266 figure 24.7. slave mode da ta/clock timing (ckpha = 1) ... ............... .................. 266 figure 24.8. spi master timing (ckpha = 0)..... .......................................... ......... 271 figure 24.9. spi master timing (ckpha = 1)..... .......................................... ......... 271 figure 24.10. spi slave timing (c kpha = 0).............. ................................. ......... 272 c8051f91x-c8051f90x rev. 1.3 11 figure 24.11. spi slave timing (c kpha = 1).............. ................................. ......... 272 figure 25.1. t0 mode 0 bl ock diagram............... .......................................... ......... 277 figure 25.2. t0 mode 2 bl ock diagram............... .......................................... ......... 278 figure 25.3. t0 mode 3 bl ock diagram............... .......................................... ......... 279 figure 25.4. timer 2 16-bit mode block diagram ........ ................................. ......... 284 figure 25.5. timer 2 8-bit mode block diagram ................... ............... .................. 285 figure 25.6. timer 2 capture mode block diagram .............. ............... .................. 286 figure 25.7. timer 3 16-bit mode block diagram ........ ................................. ......... 290 figure 25.8. timer 3 8-bit mode block diagram ................... ............... .................. 291 figure 25.9. timer 3 capture mode block diagram .............. ............... .................. 292 figure 26.1. pca block diagram.... ............................................................... ......... 296 figure 26.2. pca counter/timer block diagram.......... ................................. ......... 298 figure 26.3. pca interrupt blo ck diagram ................. ................................. ........... 299 figure 26.4. pca capture mode dia gram............. ................................................. 301 figure 26.5. pca software time r mode diagram ........ ................................. ......... 302 figure 26.6. pca high-speed out put mode diagram....... ............................ ......... 303 figure 26.7. pca frequen cy output mode ........... ................................................. 304 figure 26.8. pca 8-bit pwm mode diagram ................................................ ......... 305 figure 26.9. pca 9, 10 and 11-bi t pwm mode diagram .. ............................ ......... 306 figure 26.10. pca 16-bit pwm mode ........................................................... ......... 307 figure 26.11. pca module 5 with watchdog ti mer enabled ..... ................. ........... 308 figure 27.1. typical c2 pin shar ing............. ................................................. ......... 319 c8051f91x-c8051f90x 12 rev. 1.3 c8051f91x-c8051f90x rev. 1.3 12 list of tables table 2.1. product selecti on guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 table 3.1. pin definitions for the c8051f91x-c8051f90x . . . . . . . . . . . . . . . . . . . 31 table 3.2. qfn-24 package di mensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 table 3.3. pcb land pattern ......... ............................................................... ........... 39 table 3.4. qsop-24 package dimens ions ................. ................................. ........... 40 table 3.5. pcb land pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 4.1. absolute maximum rati ngs ................... .............. ............... ........... ......... 42 table 4.2. global electrical char acteristics ............ .............. ............... ........... ......... 43 table 4.3. port i/ o dc electrical char acteristics ......... ................................. ........... 54 table 4.4. reset electric al characteristics ...... ............................................. ........... 59 table 4.5. power managem ent electrical specifications .... ............................ ......... 60 table 4.6. flash electrical char acteristics ...... ............................................. ........... 60 table 4.7. internal precision o scillator electrical characteri stics ........... ................ 60 table 4.8. internal low-power oscillator electrical characteri stics ........... ............. 60 table 4.9. smartclock characterist ics ............. .......................................... ........... 61 table 4.10. adc0 electric al characteristics ....... .......................................... ........... 61 table 4.11. temperature sensor electrical char acteristics ............. .............. ......... 62 table 4.12. voltage reference elec trical characteristics ....... ............ ........... ......... 63 table 4.13. iref0 electrical char acteristics .......... .............. ............... ........... ......... 64 table 4.14. comparator electrical characteristics .... ................................. ............. 65 table 4.15. vreg0 electric al characteristics .... .......................................... ........... 66 table 4.16. dc-dc converter ( dc0) electrical characteristi cs ................. ............. 67 table 5.1. representative conversion times and energy consumption for the sar adc with 1.65 v high-s peed vref . . . . . . . . . . . . . . . . . . . . . . . . . . 76 table 8.1. cip-51 instruct ion set summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 table 11.1. special f unction register (sfr) memory m ap (page 0x0) . . . . . . . . 120 table 11.2. special f unction register (sfr) memory m ap (page 0xf) . . . . . . . . 121 table 11.3. special f unction registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 table 12.1. interrupt summar y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 table 13.1. flash security summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 table 14.1. power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 table 15.1. example 16-bit crc out puts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 table 15.2. example 32-bit crc ou tputs ............ ................................................. 161 table 16.1. ipeak inductor current limit settings . . . . . . . . . . . . . . . . . . . . . . . . . 167 table 19.1. recommended xfcn settings for crys tal mode . . . . . . . . . . . . . . . . 187 table 19.2. recommended xfcn se ttings for rc and c modes . . . . . . . . . . . . . 188 table 20.1. smartclock internal registers ............. ................................. ........... 194 table 20.2. smartclock lo ad capacitance settings . . . . . . . . . . . . . . . . . . . . . 201 table 20.3. smartclock bias settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 table 21.1. port i/o a ssignment for analog functi ons . . . . . . . . . . . . . . . . . . . . . 212 table 21.2. port i/o assi gnment for digital functions . . . . . . . . . . . . . . . . . . . . . . 213 table 21.3. port i/o assignmen t for external digital event capture functions . . 213 table 22.1. smbus clock source sele ction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 c8051f91x-c8051f90x 13 rev. 1.3 table 22.2. minimum sda setup and hold times . . . . . . . . . . . . . . . . . . . . . . . . 236 table 22.3. sources for hardware changes to smb0cn . . . . . . . . . . . . . . . . . . . 240 table 22.4. hardware address recognition ex amples (ehack = 1) . . . . . . . . . . 241 table 22.5. smbus status decoding wi th hardware ack generation disabled (ehack = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 table 22.6. smbus status decoding wi th hardware ack generation enabled (ehack = 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 table 23.1. timer settings for standard baud rates using the internal 24.5 mhz o scillator . . . . . . . . . . . . . . . . . . . . . . . 259 table 23.2. timer settings for standard baud rates using an external 22.1184 mhz oscillator . . . . . . . . . . . . . . . . . . . . . 259 table 24.1. spi slave timing paramete rs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 table 25.1. timer 0 running modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 table 26.1. pca timebase input opti ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 table 26.2. pca0cpm and pc a0pwm bit settings for pca capture/compare mod- ules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 table 26.3. watchdog timer timeout in tervals . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 c8051f91x-c8051f90x rev. 1.3 14 list of registers sfr definition 5.1. adc0cn : adc0 control ........... .......................................... ........... 73 sfr definition 5.2. adc0cf: adc0 configuration ........ ................................. ............. 74 sfr definition 5.3. adc0 ac: adc0 accumulator configuratio n ................. ................ 75 sfr definition 5.4. adc0pwr: adc0 burst mode power-up time ............... ............. 76 sfr definition 5.5. adc0tk: adc0 burst mode track time ....... ............ ........... ......... 77 sfr definition 5.6. adc0h: adc0 data word high byte ......... ............... ........... ......... 78 sfr definition 5.7. adc0l: adc0 data word low byte ....... ............................ ........... 78 sfr definition 5.8. adc0gth: adc0 greater-than high byte ... ............ ........... ......... 79 sfr definition 5.9. adc0gtl: adc0 greater-than low byte .... ............ ........... ......... 79 sfr definition 5.10. adc0lth: adc0 less-than high byte ...... ............ ........... ......... 80 sfr definition 5.11. adc0ltl: ad c0 less-than low byte ........ ............ ........... ......... 80 sfr definition 5.12. adc0 mx: adc0 input channel select .... ........................... ......... 83 sfr definition 5.13. toffh: temperature sensor offset high by te .............. ............. 86 sfr definition 5.14. toffl : temperature sensor offset low byte ............ ................ 86 sfr definition 5.15. ref0cn: volt age reference control .......... ............ ........... ......... 89 sfr definition 6.1. iref 0cn: current reference control .... ............................ ........... 90 sfr definition 6.2. iref0cf: cu rrent reference configuration .. ............ ........... ......... 91 sfr definition 7.1. cpt0cn: comparator 0 control ................. ............... ........... ......... 95 sfr definition 7.2. cpt0 md: comparator 0 mode selection .. ........................... ......... 96 sfr definition 7.3. cpt1cn: comparator 1 control ................. ............... ........... ......... 97 sfr definition 7.4. cpt1 md: comparator 1 mode selection .. ........................... ......... 98 sfr definition 7.5. cpt0 mx: comparator0 input channel sele ct ............... .............. 100 sfr definition 7.6. cpt1 mx: comparator1 input channel sele ct ............... .............. 101 sfr definition 8.1. dpl: data po inter low byte ......... .............. ............... .................. 108 sfr definition 8.2. dph: data pointer high byte . ............................................. ......... 108 sfr definition 8.3. sp: sta ck pointer ................. ............................................... ......... 109 sfr definition 8.4. acc: accumulator ........ ............................................................... 109 sfr definition 8.5. b: b r egister ............... ........................................................ ......... 109 sfr definition 8.6. psw: program status word ..... .......................................... ......... 110 sfr definition 10.1. emi0 cn: external memory interface co ntrol .............. .............. 115 sfr definition 11.1. sfr page: sfr page ............. .......................................... ......... 118 sfr definition 12.1. ie: in terrupt enable .............. ............................................. ......... 127 sfr definition 12.2. ip: inte rrupt priority ............ ............................................... ......... 128 sfr definition 12.3. eie1 : extended interrupt enable 1 ......... ................................... 129 sfr definition 12.4. eip1 : extended interrupt priority 1 ....... ............................ ......... 130 sfr definition 12.5. eie2 : extended interrupt enable 2 ......... ................................... 131 sfr definition 12.6. eip2 : extended interrupt priority 2 ....... ............................ ......... 132 sfr definition 12.7. it01cf: int0 /int1 configuration .... ................................. ......... 134 sfr definition 13.1. psctl: prog ram store r/w control ................................ ......... 142 sfr definition 13.2. flk ey: flash lock and key ..... ................................................. 143 sfr definition 13.3. flscl: flash scale ............. ............................................. ......... 144 sfr definition 13.4. flwr: flash wr ite only ............. .............. ............... .................. 144 sfr definition 14.1. pmu0cf: powe r management unit configuration 1,2 ................ 151 c8051f91x-c8051f90x 15 rev. 1.3 sfr definition 14.2. pmu0md: po wer management unit mode .... ................. ........... 152 sfr definition 14.3. pcon: powe r management control register ................ ........... 153 sfr definition 15.1. crc0cn : crc0 control ........ .......................................... ......... 158 sfr definition 15.2. crc0in: crc0 data input ............ ................................. ........... 159 sfr definition 15.3. crc0da t: crc0 data output ............. ............................ ......... 159 sfr definition 15.4. crc0auto: crc0 automatic control ........ ............ .................. 160 sfr definition 15.5. crc0cnt: crc0 automatic flash sector count .......... ........... 160 sfr definition 15.6. crc0flip: crc0 bit flip .............. ................................. ........... 161 sfr definition 16.1. dc0cn: dc-dc converter control ............. ............ .................. 169 sfr definition 16.2. dc0cf: dc- dc converter configuration .... ............ .................. 170 sfr definition 16.3. dc0md: dc-dc mode .................. ................................. ........... 171 sfr definition 17.1. reg0cn: vo ltage regulator control .......... ............ .................. 172 sfr definition 18.1. vdm0cn: v dd/dc+ supply monitor control ................. ........... 177 sfr definition 18.2. rstsrc : reset source ......... .......................................... ......... 180 sfr definition 19.1. clksel: clock select ............ .......................................... ......... 186 sfr definition 19.2. oscicn: inte rnal oscillator control ......... ............... .................. 187 sfr definition 19.3. oscicl: intern al oscillator calibration .... ............... .................. 187 sfr definition 19.4. oscx cn: external oscillator control ................. .............. ......... 188 sfr definition 20.1. rtc0key: smartclock lock and key ........ ................. ........... 193 sfr definition 20.2. rtc0adr: smartclock address .. ................................. ......... 194 sfr definition 20.3. rtc0dat: sm artclock data ........ ................................. ......... 194 internal register definition 20. 4 . rtc0cn: smartclock control ............................. 202 internal register definition 20.5. rtc0xcn: smartclock oscillator control ........... 203 internal register definition 20.6. rtc0xcf: smartclock o scillator configuration . 204 internal register definition 20.7. rtc0pin: smartclock pin configuration ............ 204 internal register definition 20.8. capturen: smartclock ti mer capture .. ........... 205 internal register definition 20.9. alar mn: smartclock alarm programmed value 205 sfr definition 21.1. xbr0: port i/o crossbar register 0 ..... ............................ ......... 213 sfr definition 21.2. xbr1: port i/o crossbar register 1 ..... ............................ ......... 214 sfr definition 21.3. xbr2: port i/o crossbar register 2 ..... ............................ ......... 215 sfr definition 21.4. p0mask: port 0 mask register ...... ................................. ........... 216 sfr definition 21.5. p0mat: port0 match register ....... ................................. ........... 216 sfr definition 21.6. p1mask: port 1 mask register ...... ................................. ........... 217 sfr definition 21.7. p1mat: port1 match register ....... ................................. ........... 217 sfr definition 21.8. p0: port0 ....... .................................................................. ........... 219 sfr definition 21.9. p0skip: port0 skip .............. ............................................. ......... 219 sfr definition 21.10. p0mdin: port 0 input mode ............ ................................. ......... 220 sfr definition 21.11. p0md out: port0 output mode ................. ............ .................. 220 sfr definition 21.12. p0drv: port0 drive strength .................... ............ .................. 221 sfr definition 21.13. p1: po rt1 ............ ............................................................. ......... 222 sfr definition 21.14. p1skip: port1 skip ............ ............................................. ......... 222 sfr definition 21.15. p1mdin: port 1 input mode ............ ................................. ......... 223 sfr definition 21.16. p1md out : port1 output mode ................. ............ .................. 223 sfr definition 21.17. p1drv: port1 drive strength .................... ............ .................. 224 sfr definition 21.18. p2: po rt2 ............ ............................................................. ......... 224 c8051f91x-c8051f90x rev. 1.3 16 sfr definition 21.19. p2md out: port2 output mode ................. ............ .................. 225 sfr definition 21.20. p2drv: port2 drive strength .................... ............ .................. 225 sfr definition 22.1. smb0cf: smbu s clock/configuration ........ ............ .................. 233 sfr definition 22.2. smb0cn: smbu s control .............. ................................. ........... 235 sfr definition 22.3. smb0 adr: smbus slave address ......... ................................... 238 sfr definition 22.4. smb0adm: smbus slave address mask .... ............ .................. 238 sfr definition 22.5. smb0dat: smbu s data ................ ................................. ........... 239 sfr definition 23.1. scon0: serial port 0 control ..... .............. ............... .................. 253 sfr definition 23.2. sbuf0: seri al (uart0) port data buffer . ............... .................. 254 sfr definition 24.1. spincf g: spi configuration .. .......................................... ......... 264 sfr definition 24.2. spincn: spi co ntrol .............. .......................................... ......... 265 sfr definition 24.3. spinckr: spi clock rate ...... .......................................... ......... 266 sfr definition 24.4. spindat: spi data ............. ............................................. ......... 266 sfr definition 25.1. ckcon: clock control ........... .......................................... ......... 271 sfr definition 25.2. tcon: timer c ontrol .............. .......................................... ......... 276 sfr definition 25.3. tmod: timer m ode ................ .......................................... ......... 277 sfr definition 25.4. tl0: timer 0 low byte ......... ............................................. ......... 278 sfr definition 25.5. tl1: timer 1 low byte ......... ............................................. ......... 278 sfr definition 25.6. th0: timer 0 high byte .............. .............. ............... .................. 279 sfr definition 25.7. th1: timer 1 high byte .............. .............. ............... .................. 279 sfr definition 25.8. tmr2cn: timer 2 control ............. ................................. ........... 283 sfr definition 25.9. tmr2rll: ti mer 2 reload register low byte ............... ........... 284 sfr definition 25.10. tmr2 rlh: timer 2 reload re gister high byte . ..................... 284 sfr definition 25.11. tmr2l: timer 2 low byte .... .......................................... ......... 285 sfr definition 25.12. tmr2h timer 2 high byte ........... ................................. ........... 285 sfr definition 25.13. tmr3 cn: timer 3 control .... .......................................... ......... 289 sfr definition 25.14. tmr3 rll: timer 3 reload re gister low byte ... ..................... 290 sfr definition 25.15. tmr3 rlh: timer 3 reload re gister high byte . ..................... 290 sfr definition 25.16. tmr3l: timer 3 low byte .... .......................................... ......... 291 sfr definition 25.17. tmr3h timer 3 high byte ........... ................................. ........... 291 sfr definition 26.1. pca0cn : pca control ........... .......................................... ......... 306 sfr definition 26.2. pca0md: pca mo de ............. .......................................... ......... 307 sfr definition 26.3. pca0pwm: pca pwm configuration ......... ............ .................. 308 sfr definition 26.4. pc a0cpmn: pca capture/compare mode ................ .............. 309 sfr definition 26.5. pca 0l: pca counter/timer low byte ................. ..................... 310 sfr definition 26.6. pca0h: pca counter/timer high byte ....... ............ .................. 310 sfr definition 26.7. pca0cpln: pca capture module low byte . ................. ........... 311 sfr definition 26.8. pca0cphn: pca capture module high byte ................ ........... 311 c2 register definition 27.1. c2ad d: c2 addr ess ....... .............. ............... .................. 312 c2 register definition 27.2. devi ceid: c2 device id .............. ............... .................. 313 c2 register definition 27.3. revi d: c2 revision id ............... ................................... 313 c2 register definition 27.4. fp ctl: c2 flash programming cont rol ............. ........... 314 c2 register definition 27.5. fp dat: c2 flash programming data ................. ........... 314 sfr definition 5.1. adc0cn: adc0 control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 sfr definition 5.2. adc0cf: adc0 c onfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 c8051f91x-c8051f90x 17 rev. 1.3 sfr definition 5.3. adc0 ac: adc0 accumulator configuration . . . . . . . . . . . . . . . . . 79 sfr definition 5.4. adc0 pwr: adc0 burst mode power-up time . . . . . . . . . . . . . . 80 sfr definition 5.5. adc0tk : adc0 burst mode track time . . . . . . . . . . . . . . . . . . . . 81 sfr definition 5.6. adc0h: adc0 data word high byte . . . . . . . . . . . . . . . . . . . . . . 82 sfr definition 5.7. adc0l: adc0 data word low byte . . . . . . . . . . . . . . . . . . . . . . . 82 sfr definition 5.8. adc0gth: a dc0 greater-than high byte . . . . . . . . . . . . . . . . . . 83 sfr definition 5.9. adc0gtl: ad c0 greater-than low byte . . . . . . . . . . . . . . . . . . 83 sfr definition 5.10. adc0lth: ad c0 less-than high byte . . . . . . . . . . . . . . . . . . . 84 sfr definition 5.11. adc0ltl: adc0 less-than low byte . . . . . . . . . . . . . . . . . . . . 84 sfr definition 5.12. adc0mx : adc0 input channel sele ct . . . . . . . . . . . . . . . . . . . . 87 sfr definition 5.13. toffh: temper ature sensor offset high byte . . . . . . . . . . . . . . 90 sfr definition 5.14. toffl : temperature sensor offset low by te . . . . . . . . . . . . . . 90 sfr definition 5.15. ref0cn : voltage reference contro l . . . . . . . . . . . . . . . . . . . . . 93 sfr definition 6.1. iref0c n: current reference control . . . . . . . . . . . . . . . . . . . . . . 94 sfr definition 6.2. iref0c f: current reference configuration . . . . . . . . . . . . . . . . . 95 sfr definition 7.1. cpt0cn: comparator 0 control . . . . . . . . . . . . . . . . . . . . . . . . . . 99 sfr definition 7.2. cpt0 md: comparator 0 mode se lection . . . . . . . . . . . . . . . . . . 100 sfr definition 7.3. cpt1cn : comparator 1 control . . . . . . . . . . . . . . . . . . . . . . . . . 101 sfr definition 7.4. cpt1 md: comparator 1 mode se lection . . . . . . . . . . . . . . . . . . 102 sfr definition 7.5. cpt0 mx: comparator0 input channel select . . . . . . . . . . . . . . . 104 sfr definition 7.6. cpt1 mx: comparator1 input channel select . . . . . . . . . . . . . . . 105 sfr definition 8.1. dpl: da ta pointer low byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 sfr definition 8.2. dph: data pointer high byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 sfr definition 8.3. sp: stack pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 sfr definition 8.4. acc: a ccumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 sfr definition 8.5. b: b regi ster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 sfr definition 8.6. psw: pr ogram status word . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 sfr definition 10.1. emi0 cn: external memory interface cont rol . . . . . . . . . . . . . . 119 sfr definition 11.1. sfr page: sfr page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 sfr definition 12.1. ie: interrupt enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 sfr definition 12.2. ip: interr upt prior ity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 sfr definition 12.3. eie1: extended interrupt enable 1 . . . . . . . . . . . . . . . . . . . . . . 133 sfr definition 12.4. eip1: extended interrupt priority 1 . . . . . . . . . . . . . . . . . . . . . . 134 sfr definition 12.5. eie2: extended interrupt enable 2 . . . . . . . . . . . . . . . . . . . . . . 135 sfr definition 12.6. eip2: extended interrupt priority 2 . . . . . . . . . . . . . . . . . . . . . . 136 sfr definition 12.7. it01cf: int0 /int1 configuration . . . . . . . . . . . . . . . . . . . . . . . 138 sfr definition 13.1. psctl: program store r/w control . . . . . . . . . . . . . . . . . . . . . 146 sfr definition 13.2. flkey: flash lock and key . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 sfr definition 13.3. flscl: flash scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 sfr definition 13.4. flwr: flash write only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 sfr definition 14.1. pmu0cf: powe r management unit configuration 1,2 . . . . . . . . . . . 155 sfr definition 14.2. pmu0md: powe r management unit mode . . . . . . . . . . . . . . . . 156 sfr definition 14.3. pcon: powe r management control register . . . . . . . . . . . . . . 157 sfr definition 15.1. crc0cn: crc0 c ontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 sfr definition 15.2. crc0in: crc0 da ta input . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 c8051f91x-c8051f90x rev. 1.3 18 sfr definition 15.3. crc0da t: crc0 data output . . . . . . . . . . . . . . . . . . . . . . . . . 163 sfr definition 15.4. crc0 auto: crc0 automatic control . . . . . . . . . . . . . . . . . . . 164 sfr definition 15.5. crc0cnt: crc0 automatic flash sector count . . . . . . . . . . . 164 sfr definition 15.6. crc0flip: crc0 bi t flip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 sfr definition 16.1. dc0cn: dc-dc converter control . . . . . . . . . . . . . . . . . . . . . . 173 sfr definition 16.2. dc0cf: dc- dc converter configuration . . . . . . . . . . . . . . . . . 174 sfr definition 16.3. dc0md: dc-dc mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 sfr definition 17.1. reg0cn: volt age regulator control . . . . . . . . . . . . . . . . . . . . 176 sfr definition 18.1. vdm0cn: v dd/dc+ supply monitor control . . . . . . . . . . . . . . 181 sfr definition 18.2. rstsrc: reset source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 sfr definition 19.1. clksel: clock select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 sfr definition 19.2. oscicn: inter nal oscillator control . . . . . . . . . . . . . . . . . . . . . 191 sfr definition 19.3. oscicl: intern al oscillator calibration . . . . . . . . . . . . . . . . . . . 191 sfr definition 19.4. oscxcn: external oscillator c ontrol . . . . . . . . . . . . . . . . . . . . 192 sfr definition 20.1. rtc0key: smartclock lock and key . . . . . . . . . . . . . . . . . . 197 sfr definition 20.2. rtc0 adr: smartclock address . . . . . . . . . . . . . . . . . . . . . . 198 sfr definition 20.3. rtc0da t: smartclock data . . . . . . . . . . . . . . . . . . . . . . . . . 198 internal register definition 20. 4. rtc0cn: smartclock control . . . . . . . . . . . . . . . 206 internal register definition 20.5. rtc0xcn: smartclock oscillator control . . . . . . 207 internal register definition 20.6. rtc0xcf: smartclock o scillator configuration . 208 internal register definition 20.7. rtc0pin: smartclock pin configuration . . . . . . 208 internal register definition 20.8. capturen: smartclock ti mer capture . . . . . . . 209 internal register definition 20.9. alar mn: smartclock alarm programmed value 209 sfr definition 21.1. xbr0: port i/o crossbar regist er 0 . . . . . . . . . . . . . . . . . . . . . 217 sfr definition 21.2. xbr1: port i/o crossbar regist er 1 . . . . . . . . . . . . . . . . . . . . . 218 sfr definition 21.3. xbr2: port i/o crossbar regist er 2 . . . . . . . . . . . . . . . . . . . . . 219 sfr definition 21.4. p0mask : port0 mask register . . . . . . . . . . . . . . . . . . . . . . . . . 220 sfr definition 21.5. p0mat: port0 ma tch register . . . . . . . . . . . . . . . . . . . . . . . . . . 220 sfr definition 21.6. p1mask : port1 mask register . . . . . . . . . . . . . . . . . . . . . . . . . 221 sfr definition 21.7. p1mat: port1 ma tch register . . . . . . . . . . . . . . . . . . . . . . . . . . 221 sfr definition 21.8. p0: port0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 sfr definition 21.9. p0ski p: port0 skip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 sfr definition 21.10. p0mdin : port0 input mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 sfr definition 21.11. p0mdout: port 0 output mode . . . . . . . . . . . . . . . . . . . . . . . . 224 sfr definition 21.12. p0drv: port0 drive strength . . . . . . . . . . . . . . . . . . . . . . . . . 225 sfr definition 21.13. p1: port1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 sfr definition 21.14. p1 skip: port1 skip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 sfr definition 21.15. p1mdin : port1 input mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 sfr definition 21.16. p1mdout: port 1 output mode . . . . . . . . . . . . . . . . . . . . . . . . 227 sfr definition 21.17. p1drv: port1 drive strength . . . . . . . . . . . . . . . . . . . . . . . . . 228 sfr definition 21.18. p2: port2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 sfr definition 21.19. p2mdout: port 2 output mode . . . . . . . . . . . . . . . . . . . . . . . . 229 sfr definition 21.20. p2drv: port2 drive strength . . . . . . . . . . . . . . . . . . . . . . . . . 229 sfr definition 22.1. smb0cf: smbus clock/configuration . . . . . . . . . . . . . . . . . . . 237 sfr definition 22.2. smb0cn : smbus control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 c8051f91x-c8051f90x 19 rev. 1.3 sfr definition 22.3. smb0a dr: smbus slave address . . . . . . . . . . . . . . . . . . . . . . 242 sfr definition 22.4. smb0adm: sm bus slave address mask . . . . . . . . . . . . . . . . . 242 sfr definition 22.5. smb0dat: smbus data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 sfr definition 23.1. scon0: serial port 0 control . . . . . . . . . . . . . . . . . . . . . . . . . . 257 sfr definition 23.2. sbuf0: serial (uart0) port data buffer . . . . . . . . . . . . . . . . . 258 sfr definition 24.1. spincf g: spi configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 sfr definition 24.2. spincn: spi control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 sfr definition 24.3. spinckr: spi clock rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 sfr definition 24.4. spindat: spi data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 sfr definition 25.1. ckcon: clock control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 sfr definition 25.2. tcon: timer cont rol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 sfr definition 25.3. tmod: ti mer mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 sfr definition 25.4. tl0: timer 0 low byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 sfr definition 25.5. tl1: timer 1 low byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 sfr definition 25.6. th0: timer 0 hi gh byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 sfr definition 25.7. th1: timer 1 hi gh byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 sfr definition 25.8. tmr2cn: timer 2 control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 sfr definition 25.9. tmr2rll: ti mer 2 reload register low byte . . . . . . . . . . . . . 288 sfr definition 25.10. tmr2 rlh: timer 2 reload re gister high byte . . . . . . . . . . . 288 sfr definition 25.11. tmr2l: timer 2 low byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 sfr definition 25.12. tmr2h timer 2 high byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 sfr definition 25.13. tmr3cn: timer 3 control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 sfr definition 25.14. tmr3 rll: timer 3 reload regi ster low byte . . . . . . . . . . . . 294 sfr definition 25.15. tmr3 rlh: timer 3 reload re gister high byte . . . . . . . . . . . 294 sfr definition 25.16. tmr3l: timer 3 low byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 sfr definition 25.17. tmr3h timer 3 high byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 sfr definition 26.1. pca0cn: pca control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 sfr definition 26.2. pca0md: pca mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 sfr definition 26.3. pca0pwm: pc a pwm configuration . . . . . . . . . . . . . . . . . . . . 312 sfr definition 26.4. pc a0cpmn: pca capture/compare mode . . . . . . . . . . . . . . . 313 sfr definition 26.5. pca0l: pca counter/timer low byte . . . . . . . . . . . . . . . . . . . 314 sfr definition 26.6. pca0h: pca counter/timer high byte . . . . . . . . . . . . . . . . . . . 314 sfr definition 26.7. pca0cpln: pca capture module low byte . . . . . . . . . . . . . . . 315 sfr definition 26.8. pca0cphn: pca capture module high byte . . . . . . . . . . . . . . 315 c2 register definition 27.1. c2add: c2 address . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 c2 register definition 27.2. device id: c2 device id . . . . . . . . . . . . . . . . . . . . . . . . 317 c2 register definition 27.3. revid: c2 revision id . . . . . . . . . . . . . . . . . . . . . . . . . 317 c2 register definition 27.4. fp ctl: c2 flash programming cont rol . . . . . . . . . . . . 318 c2 register definition 27.5. fp dat: c2 flash programming data . . . . . . . . . . . . . . 318 c8051f91x-c8051f90x rev. 1.3 20 1. system overview c8051f91x-c8051f90x devices are fully integrated mixed-signal system-on-a- chip mcus. highlighted features are listed below. refer to ta b l e 2.1 for specific product feature sele ction and part ordering numbers. ? single/dual battery operation with on-chip dc-dc boost converter ? high-speed pipelined 8051-compatible microcontroller core (up to 25 mips) ? in-system, full-speed, non-intrusive debug interface (on-chip) ? 10-bit 300 ksps or 12-bit 75 ksps single-ended adc with analog multiplexer ? 6-bit programmable current reference. re solution can be increased with pwm ? precision programmable 24.5 mhz internal oscillator with spread s pectrum technology ?16 kb or 8 kb of on-chip flash memory ? 768 bytes of on-chip ram ?smbus/i 2 c, enhanced uart, and two enhanced 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 func tion ? on-chip power-on reset, v dd monitor, and temperature sensor ? two on-chip voltage comparators with 15 capacitive touch sense inputs. ? 16 port i/o (5 v tolerant) with on-chip power-on reset, v dd monitor, watchdog timer, and clock oscillator, the c8051f91x- c8051f90x devices are truly stand-alone system-o n-a-chip solutions. the flash memory can be reprogrammed even in-circuit, providing non-volatile da ta storage, and also allowing field upgrades of the 8051 firmware. user software has complete control of all peripherals, and may individually shut down any or all peripherals for power savings. the on-chip silicon labs 2- wire (c2) d evelopment interface allo ws 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 analog and digita l peripherals are fully functional while debugging using c2. the two c2 interface pins can be shared with user functions, a llowing in-system debugging without occupying package pins. each device is specified for 0.9 to 1.8 v, 0.9 to 3.6 v, or 1.8 to 3.6 v operation over the industrial tem perature range (?40 to +85 c). the port i/o and rst pins are tolerant of input signals up to 5 v. the c80 51f91x-c8051f90x devices are available in 24-p in qfn or qsop packages. both package options are lead-free and rohs compliant. see table 2.1 for ordering information. block diagrams are included in figure 1.1 through figure 1.4 . c8051f91x-c8051f90x 21 rev. 1.3 figure 1.1. c8051f912 block diagram figure 1.2. c8051f911 block diagram port 0 drivers digital peripherals uart timers 0, 1, 2, 3 pca/ wdt smbus priority crossbar decoder p0.0/vref p0.1/agnd p0.2/xtal1/rtcout p0.3/xtal2/wakeout p0.4/tx p0.5/rx p0.6/cnvstr p0.7/iref0 crossbar control port i/o configuration cip-51 8051 controller core 16k byte isp flash program memory 256 byte sram sfr bus 512 byte xram port 1 drivers p1.0 p1.1 p1.2 p1.3 p1.4 p1.5 port 2 drivers spi 0,1 analog peripherals comparators + - power net vdd/dc+ gnd/dc- xtal1 sysclk system clock configuration external oscillator circuit precision 24.5 mhz oscillator debug / programming hardware power on reset/pmu reset c2d c2ck/rst wake 12/10-bit 75/300ksps adc a m u x temp sensor external vref internal vref vdd xtal2 low power 20 mhz oscillator 6-bit iref vref gnd p1.6 iref0 cp0, cp0a p2.7/c2d + - cp1, cp1a smartclock oscillator xtal3 xtal4 dc/dc converter gnd vreg digital power analog power crc engine vbat dcen port 0 drivers digital peripherals uart timers 0, 1, 2, 3 pca/ wdt smbus priority crossbar decoder p0.0/vref p0.1/agnd p0.2/xtal1 p0.3/xtal2 p0.4/tx p0.5/rx p0.6/cnvstr p0.7/iref0 crossbar control port i/o configuration cip-51 8051 controller core 16k byte isp flash program memory 256 byte sram sfr bus 512 byte xram port 1 drivers p1.0 p1.1 p1.2 p1.3 p1.4 p1.5 port 2 drivers spi 0,1 analog peripherals comparators + - power net vdd/dc+ gnd/dc- xtal1 sysclk system clock configuration external oscillator circuit precision 24.5 mhz oscillator debug / programming hardware power on reset/pmu reset c2d c2ck/rst wake 10-bit 300ksps adc a m u x temp sensor external vref internal vref vdd xtal2 low power 20 mhz oscillator 6-bit iref vref gnd p1.6 iref0 cp0, cp0a p2.7/c2d + - cp1, cp1a smartclock oscillator xtal3 xtal4 dc/dc converter gnd vreg digital power analog power crc engine vbat dcen c8051f91x-c8051f90x rev. 1.3 22 figure 1.3. c8051f902 block diagram figure 1.4. c8051f901 block diagram port 0 drivers digital peripherals uart timers 0, 1, 2, 3 pca/ wdt smbus priority crossbar decoder p0.0/vref p0.1/agnd p0.2/xtal1/rtcout p0.3/xtal2/wakeout p0.4/tx p0.5/rx p0.6/cnvstr p0.7/iref0 crossbar control port i/o configuration cip-51 8051 controller core 8k byte isp flash program memory 256 byte sram sfr bus 512 byte xram port 1 drivers p1.0 p1.1 p1.2 p1.3 p1.4 p1.5 port 2 drivers spi 0,1 analog peripherals comparators + - power net vdd/dc+ gnd/dc- xtal1 sysclk system clock configuration external oscillator circuit precision 24.5 mhz oscillator debug / programming hardware power on reset/pmu reset c2d c2ck/rst wake 12/10-bit 75/300ksps adc a m u x temp sensor external vref internal vref vdd xtal2 low power 20 mhz oscillator 6-bit iref vref gnd p1.6 iref0 cp0, cp0a p2.7/c2d + - cp1, cp1a smartclock oscillator xtal3 xtal4 dc/dc converter gnd vreg digital power analog power crc engine vbat dcen port 0 drivers digital peripherals uart timers 0, 1, 2, 3 pca/ wdt smbus priority crossbar decoder p0.0/vref p0.1/agnd p0.2/xtal1 p0.3/xtal2 p0.4/tx p0.5/rx p0.6/cnvstr p0.7/iref0 crossbar control port i/o configuration cip-51 8051 controller core 8k byte isp flash program memory 256 byte sram sfr bus 512 byte xram port 1 drivers p1.0 p1.1 p1.2 p1.3 p1.4 p1.5 port 2 drivers spi 0,1 analog peripherals comparators + - power net vdd/dc+ gnd/dc- xtal1 sysclk system clock configuration external oscillator circuit precision 24.5 mhz oscillator debug / programming hardware power on reset/pmu reset c2d c2ck/rst wake 10-bit 300ksps adc a m u x temp sensor external vref internal vref vdd xtal2 low power 20 mhz oscillator 6-bit iref vref gnd p1.6 iref0 cp0, cp0a p2.7/c2d + - cp1, cp1a smartclock oscillator xtal3 xtal4 dc/dc converter gnd vreg digital power analog power crc engine vbat dcen c8051f91x-c8051f90x 23 rev. 1.3 1.1. cip-51? microcontroller core 1.1.1. fully 8051 compatible the c8051f91x-c8051f90x family utilizes silicon labs' proprietary cip-51 microcontroller core. the cip- 51 is fully compatible with the mc s-51? instruction set; standard 803x/805x assemblers and compilers can be used to develop software. the cip-51 core offers all the peripherals included with a standard 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 instructions except for mul and div take 12 or 24 system clock cycles to execute with a maximum system clock of 12-to-24 mhz. by contrast, the cip-51 cor e executes 70% of its instructions in one or two sy stem clock cycles, with only four instructions taking more than four system clock cycles. the cip-51 has a total of 109 instructions. the table be low shows the total number of instructions that require each execution time. with the cip-51's maximum system clock at 25 mhz, it has a peak throughput of 25 mips. 1.1.3. additional features the c8051f91x-c8051f90x soc family includes several key enhancements to the cip-51 core and peripherals to improve performance and ease of use in end applications. the extended interrupt handler provides multiple int errupt sources into t he cip-51 allowing numerous analog and digital peripherals to interrupt the cont roller. an interrupt driv en system requires less intervention by the mcu, giving it more effective throughput. the extra interrupt sources are very useful when building multi-task ing, real-time systems. eight reset sources are available: power-on reset circuitry (por), an on-chip v dd monitor (forces reset when power supply voltage drops below safe leve ls), a watchdog timer, a missing clock detector, smartclock oscillator fail or alarm, a voltage level det ection from comparator0, a forced software reset, an external reset pin, and an illegal flash access protection circuit. each reset source exce pt for the por, reset input pin, or flash error may be disabled by the user in software. the wdt may be permanently disabled in software after a powe r-on reset during mcu initialization. the internal oscillator factory calibra ted to 24.5 mhz and is accurate to 2% over the full temperature and supply range. the internal os cillator period can also be adjusted by user fi rmware. an ad ditional 20 mhz low power oscillator is also available which facilitat es low-power operation. an external oscillator drive circuit is included, allowing an external crystal, cerami c resonator, capacitor, rc, or cmos clock source to generate the system clock. if desired, the system cloc k source may be switched on-the-fly between both internal and external oscillator circ uits. an external oscilla tor can also be extremely useful in low power applications, allowing the mcu to run from a slow (pow er saving) source, while pe riodically switching to the fast (up to 25 mhz) internal oscillator as needed. clocks to execute 1 2 2/3 3 3/4 4 4/5 5 8 number of instructions 26 50 5 14 7 3 1 2 1 c8051f91x-c8051f90x rev. 1.3 24 1.2. port input/output digital and analog resources are available through 16 i/o pins. port pins are organized as three byte-wide ports. port pins p0.0?p1.6 can be de fined as digital or analog i/o. digital i/o pins can be assigned to one of the internal digital resources or used as general purpose i/o (gpio). analog i/o pins are used by the internal analog resources. p2.7 can be used as gpio and is shared with the c2 interface data signal (c2d). see section ?27. c2 interface? on page 316 for more details. the designer has complete control over which digital an d analog functions are as signed to individual port pins, limited only by the nu mber of physical i/o pins. this resour ce assignment flexibility is achieved through the use of a priority crossbar decoder. see section ?21.3. priority crossbar decoder? on page 214 for more information on the crossbar. all port i/os are 5 v tolerant when used as digital inputs or open-d rain outputs. for port i/os configured as push-pull outputs, current is sourced from the vdd/dc+ supply. port i/os used for analog functions can operate up to the vdd/dc+ supply voltage. see section ?21.1. port i/o modes of operation? on page 211 for more information on port i/o operating modes and th e electrical specifications chapter for detailed electrical specifications. figure 1.5. port i/o functional block diagram xbr0, xbr1, xbr2, pnskip registers digital crossbar priority decoder 2 p0 i/o cells p0.0 p0.7 8 port match p0mask, p0mat p1mask, p1mat uart (internal digital signals) highest priority lowest priority sysclk 2 smbus t0, t1 2 7 pca 4 cp0 cp1 outputs spi0 spi1 4 p1 i/o cells p1.0 p1.6 7 (port latches) p0 (p0.0-p0.7) (p1.0-p1.6) 8 7 p1 p2 i/o cell p2 (p2.7) 1 1 pnmdout, pnmdin registers p2.7 to analog peripherals (adc0, cp0, and cp1 inputs, vref, iref0, agnd) external interrupts ex0 and ex1 c8051f91x-c8051f90x 25 rev. 1.3 1.3. serial ports the c8051f91x-c8051f90x family includes an smbus/i 2 c interface, a full-duplex uart with enhanced baud rate configuration, and two en hanced spi interfaces. each of the se rial buses is fully implemented in hardware and makes extensive use of the cip-51's inte rrupts, thus requiring very little cpu intervention. 1.4. programmable counter array an on-chip programmable counter/timer array (pca) is included in addition to the four 16-bit general purpose counter/timers. the pca c onsists of a dedicated 16-bit c ounter/timer time base with six programmable capture/compare module s. the pca clock is derived from one of six sources: the system clock divided by 12, the system clock divided by 4, ti mer 0 overflows, an external clock input (eci), the system clock, or the external oscilla tor clock source divided by 8. ?f9 12 and ?f902 device s also support a smartclock divided by 8 clock source. each capture/compare module can be configured to oper ate in a va riety of modes: edge-triggered capture, software timer, high-speed output, pulse width modulator (8, 9, 10, 11, or 16-bit), or frequency output. additionally, capture/compare module 5 offers watchd og timer (wdt) capabilit ies. following a system reset, module 5 is configured and enabled in wdt mode. the pca capture/compare module i/o and external clock input may be routed to port i/o via the digital crossbar. figure 1.6. pca block diagram capture/compare module 1 capture/compare module 0 capture/compare module 2 cex1 eci crossbar cex2 cex0 port i/o 16-bit counter/timer pca clock mux sysclk/12 sysclk/4 timer 0 overflow eci sysclk external clock/8 capture/compare module 4 capture/compare module 3 capture/compare module 5 / wdt cex4 cex5 cex3 smartclock/8* * only available on ?f912 and ?f902 devices. c8051f91x-c8051f90x rev. 1.3 26 1.5. sar adc with 16-bit auto-averag ing accumulator and autonomous low power burst mode c8051f91x-c8051f90x devices have a 300 ksps, 10-bit or 75 ksps 12-bit successive-approximation- r egister (sar) adc with integrated track-and-hold an d programmable window detector. adc0 also has an autonomous low power burst mode which can automatically enable adc0, capture and accumulate samples, then place adc0 in a low power shutdown mode without cpu intervention. it also has a 16-bit accumulator that can automatically average the adc re sults, providing an effective 11, 12, or 13 bit adc result without any additional cpu intervention. the adc can sample the voltage at any of the gpio pi n s (with the exception of p2.7) and has an on-chip attenuator that allows it to measure voltages up to twice the voltage reference. additional adc inputs include an on-chip temperature sensor, the vdd/dc+ supply voltage, the vbat supply voltage, and the internal digital supply voltage. figure 1.7. adc0 functional block diagram adc0cf amp0gn ad0tm ad08be ad0sc0 ad0sc1 ad0sc2 ad0sc3 ad0sc4 10/12-bit sar adc ref sysclk adc0h 32 adc0cn ad0cm0 ad0cm1 ad0cm2 ad0wint ad0busy ad0int bursten ad0en timer 0 overflow timer 2 overflow timer 3 overflow start conversion 000 ad0busy (w) vdd adc0lth ad0wint 001 010 011 100 cnvstr input window compare logic adc0ltl adc0gth adc0gtl adc0l ain+ from amux0 burst mode logic adc0tk adc0pwr 16-bit accumulator c8051f91x-c8051f90x 27 rev. 1.3 figure 1.8. adc0 multiplexer block diagram 1.6. programmable current reference (iref0) c8051f91x-c8051f90x devices include an on-chip prog rammable current reference (source or sink) with two output current settings: low power mode and high current mode. the maximum current output in low power mode is 63 a (1 a steps) and the maximum current ou tp ut in high current mode is 504 a (8 a step s). 1.7. comparators c8051f91x-c8051f90x devices include two on-chip programmable voltage comparators: comparator 0 (cpt0) which is shown in figure 1.9 ; comparator 1 (cpt1) which is shown in figure 1.10 . the two comparators operate identically but ma y dif fer in their ability to be used as reset or wake-up sources. see section ?18. reset sources? on page 177 and the section ?14. power management? on page 149 for details on reset sources and low power mode wake-up source s, respec tively. the comparator offers programmable response time a nd hysteresis, an analog in put multiplexer, and two outputs that are optionally available at the port pins : a synchronous ?latched? output (cp0, cp1), or an asynchronous ?raw? output (cp0a, cp1a). the asyn chronous cp0a signal is available even when the system clock is not active. this allows the comparator to operate and generate an output when the device is in some low power modes. the comparator inputs may be connected to port i/o pins or to o ther internal signals. port pins may also be used to directly sense capacitive touch switches. adc0 temp sensor amux vbat adc0mx ad0mx4 ad0mx3 ad0mx2 ad0mx1 am0mx0 ain+ p0.0 p1.6 digital supply vdd/dc+ programmable attenuator gain = 0. 5 or 1 c8051f91x-c8051f90x rev. 1.3 28 figure 1.9. comparator 0 functional block diagram figure 1.10. comparator 1 functional block diagram vdd cpt0cn reset decision tree + - crossbar interrupt logic q q set clr d q q set clr d (synchronizer) gnd cp0 + px.x cp0en cp0out cp0rif cp0fif cp0hyp1 cp0hyp0 cp0hyn1 cp0hyn0 cpt0md cp0rie cp0fie cp0md1 cp0md0 cp0 cp0a cp0 rising-edge cp0 falling-edge cp0 interrupt px.x px.x px.x cp0 - (asynchronous) analog input multiplexer vdd cpt0cn reset decision tree + - crossbar interrupt logic q q set clr d q q set clr d (synchronizer) gnd cp1 + px.x cp1en cp1out cp1rif cp1fif cp1hyp1 cp1hyp0 cp1hyn1 cp1hyn0 cpt0md cp1rie cp1fie cp1md1 cp1md0 cp1 cp1a cp1 rising-edge cp1 falling-edge cp1 interrupt px.x px.x px.x cp1 - (asynchronous) analog input multiplexer c8051f91x-c8051f90x 29 rev. 1.3 c8051f91x-c8051f90x rev. 1.3 30 2. ordering information table 2.1. product selection guide ordering part number 1 mips (peak) flash memory (kb) ram (bytes) smartclock real time clock smbus/i 2 c uart enhanced spi timers (16-bit) programmable counter array digital port i/os 10-bit 300ksps adc programmable current reference internal voltage reference temperature sensor analog comparators lead-free (rohs compliant) c8051f9xx plus features 2 package c8051f912-d-gm 25 16 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? ? qfn-24 c8051f912-d-gu 25 16 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? ? qsop-24 c8051f912-d-gdi 25 16 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? ? tested die c8051f911-d-gm 25 16 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? qfn-24 c8051f911-d-gu 25 16 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? qsop-24 c8051f911-d-gdi 25 16 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? tested die c8051f902-d-gm 25 8 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? ? qfn-24 c8051f902-d-gu 25 8 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? ? qsop-24 c8051f902-d-gdi 25 8 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? ? tested die c8051f901-d-gm 25 8 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? qfn-24 c8051f901-d-gu 25 8 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? qsop-24 C8051F901-D-GDI 25 8 768 ? 1 1 2 4 ? 16 ? ? ? ? 2 ? tested die 1. s tarting with silicon revision c, the ordering part numbers have been updated to include the silicon revision and use this format: "c8051f912-c-gm". package marking diagrams are included as figure 3.3 and figure 3.4 to help identify the silicon revision. 2. t he 'f9xx plus features are a set of enhancements that allow greater power ef ficiency and increased functionality. they include 12-bit adc mode, pwm enhanced iref, ultr a-low power smartclock lfo, vbat input voltage from 0.9 to 3.6 v, and vbat battery low indicator. the 'f9xx pl us features are described in detail in "an431: f93x-f90x software porting guide." c8051f91x-c8051f90x 31 rev. 1.3 c8051f91x-c8051f90x rev. 1.3 31 3. pinout and package definitions table 3.1. pin definitions for the c8051f91x-c8051f90x name pin numbers type description ?f912-gm ?f902-gm ?f911-gm ?f901-gm ?f912-gu ?f902-gu ?f911-gu ?f901-gu vbat 5 8 p in battery supply voltage. c8051f911/01 devices: must be 0.9 to 1.8 v in single-cell battery mode and 1.8 to 3.6 v in dua l-cell battery mode. c8051f912/02 devices: must be 0.9 to 3.6 v in single-cell battery mode and 1.8 to 3.6 v in dua l-cell battery mode. v dd / dc+ 3 6 p in p out power supply voltage. must be 1.8 to 3.6 v. this supply voltage is not re quired in low power sleep mode. this voltage must always be > vbat. positive output of the dc-dc converter. in single-cell battery mode, a 1 f ceramic capacitor is required between dc+ and dc?. this pin can supply power to external devices when operating in single- cell battery mode. dc? / gnd 1 4 p in g dc-dc converter return current path . in single-cell battery mode, this pin is typically not connected to ground. in dual-cell battery mode, this pi n must be connected directly to ground. gnd 2 5 g required ground. dcen 4 7 p in g dc-dc enable pin. in single-cell battery mode, this pin must be conne cted to vbat through a 0.68 h inductor. in dual-cell battery mode, this pi n must be connected directly to ground. rst / c2ck 6 9 d i/o d i/o device reset. open-drain out put of internal por or v dd monitor. an external source can initiate a system reset by driving this pin low for at least 15 s. a 1 k to 5 k pullup to v dd is recom - mended. see section ?18. reset sources? on page 177 for a com - plete description. clock signal for the c2 debug interface. p2.7/ c2d 7 10 d i/o d i/o port 2.7. this pin can only be used as gpio. the crossbar cannot route signa ls to this pin and it cannot be configured as an analog input. see port i/o section for a complete description. bi-directional data signal for the c2 debug interface. *note: a vailable only on the c8051f912/02. c8051f91x-c8051f90x 32 rev. 1.3 xtal3 9 12 a in smartclock oscillator crystal input. see section 20 for a complete description. xtal4 8 11 a out smartclock oscillator crystal output. see section 20 for a complete description. p0.0 v ref 24 3 d i/o or a i n a in a out port 0.0. see port i/o secti on for a complete description. external v ref input. internal v ref output. external v ref decoupling capacitors are recommended. see section ?5.9. voltage and ground reference options? on page 91 . p0.1 agnd 23 2 d i/o or a i n g port 0.1. see port i/o secti on for a complete description. optional analog ground. see section ?5.9. voltage and ground reference options? on page 91 . p0.2 xtal1 rtcout* 22 1 d i/o or a i n a in port 0.2. see port i/o secti on for a complete description. external clock input. this pin is the external oscillator return for a cryst al or resonator. see section ?19. clocking sources? on page 185 . buffered smartclock oscillator output. p0.3 xtal2 wakeout* 21 24 d i/o or a i n a out d in a in port 0.3. see section ?21. port input/output? on page 210 for a complete description. external clock output. this pin is the excitation driver for an exter - nal crystal or resonator. external clock input. this pin is the external clock input in external cmos clock m ode. external clock input. this pin is the external clock input in capaci - tor or rc oscillator configurations. see section ?19. clocking sources? on page 185 for complete details. wake-up request signal to wake up external devices (e.g. an external dc-dc converter). p0.4 tx 20 23 d i/o or a i n d out port 0.4. see section ?21. port input/output? on page 210 for a complete description. uart tx pin. see section ?21. port input/output? on page 210 . p0.5 rx 19 22 d i/o or a i n d in port 0.5. see section ?21. port input/output? on page 210 for a complete description. uart rx pin. see section ?21. port input/output? on page 210 . table 3.1. pin definitions for the c8051f91x-c8051f90x (continued) name pin numbers type description ?f912-gm ?f902-gm ?f911-gm ?f901-gm ?f912-gu ?f902-gu ?f911-gu ?f901-gu *note: available only on the c8051f912/02. c8051f91x-c8051f90x rev. 1.3 33 p0.6 cnvstr 18 21 d i/o or a i n d in port 0.6. see section ?21. port input/output? on page 210 for a complete description. external convert start input for adc0. see section ?5.7. adc0 analog multiplexer? on page 86 for a complete description. p0.7 iref0 17 20 d i/o or a i n a out port 0.7. see section ?21. port input/output? on page 210 for a complete description. iref0 output. see iref section for complete description. p1.0 16 19 d i/o or a in port 1.0. see section ?21. port input/output? on page 210 for a complete description. may also be used as sck for spi1. p1.1 15 18 d i/o or a in port 1.1. see section ?21. port input/output? on page 210 for a complete description. may also be used as miso for spi1. p1.2 14 17 d i/o or a in port 1.2. see section ?21. port input/output? on page 210 for a complete description. may also be used as mosi for spi1. p1.3 13 16 d i/o or a in port 1.3. see section ?21. port input/output? on page 210 for a complete description. may also be used as nss for spi1. p1.4 12 15 d i/o or a in port 1.4. see section ?21. port input/output? on page 210 for a complete description. p1.5 11 14 d i/o or a in port 1.5. see section ?21. port input/output? on page 210 for a complete description. p1.6 10 13 d i/o or a in port 1.6. see section ?21. port input/output? on page 210 for a complete description. table 3.1. pin definitions for the c8051f91x-c8051f90x (continued) name pin numbers type description ?f912-gm ?f902-gm ?f911-gm ?f901-gm ?f912-gu ?f902-gu ?f911-gu ?f901-gu *note: available only on the c8051f912/02. c8051f91x-c8051f90x 34 rev. 1.3 figure 3.1. qfn-24 pinout diagram (top view) p2.7/c2d xtal4 xtal3 p1.6 p1.5 p1.4 10 11 12 8 7 9 gnd/dc? gnd vdd/dc+ dcen vbat rst/c2ck 4 5 6 2 1 3 p0.5/rx p0.4/tx p0.3/xtal2/wakeout* p0.2/xtal1/rtcout* p0.1/agnd p0.0/vref 22 23 24 20 19 21 c8051f912/02-gm c8051f911/01-gm top view gnd (optional connection) p1.3 p1.2 p1.1 p1.0 p0.7/iref0 p0.6/cnvstr 15 14 13 17 18 16 *note: signal only available on 'f912 and 'f902 devices. c8051f91x-c8051f90x rev. 1.3 35 figure 3.2. qsop-24 pinout diagram f912 (top view) p0.2/xtal1/rtcout* p0.3/xtal2/wakeout* p0.4/tx p0.5/rx p0.6/cnvstr p0.7/iref0 p1.0 p1.1 p1.2 p1.3 c8051f912/02 ? gu c8051f911/01 ? gu p0.1/agnd p0.0/vref gnd vdd/dc+ dcen vbat p2.7/c2d p1.4 1 2 3 4 5 6 7 8 9 10 24 23 22 21 20 19 18 17 16 15 xtal4 xtal3 11 12 p1.5 p1.6 14 13 gnd/dc- rst/c2ck *note: signal only available on 'f912 and 'f902 devices. c8051f91x-c8051f90x 36 rev. 1.3 figure 3.3. qfn-24 package marking diagram first character of the trace code identifies the silicon revision c8051f91x-c8051f90x rev. 1.3 37 figure 3.4. qsop-24 package marking diagram first character of the trace code identifies the silicon revision c8051f91x-c8051f90x 38 rev. 1.3 figure 3.5. qfn-24 package drawing table 3.2. qfn-24 package dimensions dimension min typ max dimension min typ max a 0.70 0.75 0.80 l 0.30 0.40 0.50 a1 0.00 0.02 0.05 l1 0.00 ? 0.15 b 0.18 0.25 0.30 aaa ? ? 0.15 d 4.00 bsc bbb ? ? 0.10 d2 2.55 2.70 2.80 ddd ? ? 0.05 e 0.50 bsc eee ? ? 0.08 e 4.00 bsc z ? 0.24 ? e2 2.55 2.70 2.80 y ? 0.18 ? notes: 1. al l dimensions shown are in millimeters (mm) unless otherwise noted. 2. d imensioning and tolerancing per ansi y14.5m-1994. 3. t his drawing conforms to the jedec solid state outline mo-220, variation wggd except for custom features d2, e2, z, y, and l which are toleranced per supplier designation. 4. r ecommended card reflow profile is per the jedec/ipc j-std-020 specification for small body components. c8051f91x-c8051f90x rev. 1.3 39 figure 3.6. typical qfn-24 landing diagram table 3.3. pcb land pattern dimension min max dimension min max c1 3.90 4.00 x1 0.20 0.30 c2 3.90 4.00 x2 2.70 2.80 e 0.50 bsc y1 0.65 0.75 y2 2.70 2.80 notes: general 1. al l dimensions shown are in millim eters (mm) unless otherwise noted. 2. t his land pattern design is based on the ipc-7351 guidelines. solder mask design 1. al l metal pads are to be non-solder mask defined (nsmd). clearance between the solder mask and the metal pad is to be 60 m minimum, all the way around the pad. stencil design 1. a st ainless steel, laser-cut and electro-polished stencil with trapezoidal walls should be used to assure good solder paste release. 2. the stencil thickness should be 0.125 mm (5 mils). 3. t he ratio of stencil aperture to land pad size should be 1:1 for all perimeter pads. 4. a 2 x 2 array of 1.0 x 1.0 mm square openings on 1.30 mm pitch should be used for the ce nter ground pad. card assembly 1. a no-cl ean, type-3 solder paste is recommended. 2. t he recommended card reflow profile is per the jedec/ipc j-std-020 specification for small body components. c8051f91x-c8051f90x 40 rev. 1.3 figure 3.7. qsop-24 package diagram table 3.4. qsop-24 package dimensions dimension min nom max dimension min nom max a ? ? 1.75 e 0.635 bsc a1 0.10 ? 0.25 l 0.40 ? 1.27 b 0.20 ? 0.30 0 ? 8 c 0.10 ? 0.25 aaa 0.20 d 8.65 bsc bbb 0.18 e 6.00 bsc ccc 0.10 e1 3.90 bsc ddd 0.10 notes: 1. al l dimensions shown are in millimeters (mm) unless otherwise noted. 2. dimensi oning and tolerancing per ansi y14.5m-1994. 3. thi s drawing conforms to jedec outline mo-137, variation ae. 4. recommend ed card reflow profile is per the jede c/ipc j-std-020 specification for small body components. c8051f91x-c8051f90x rev. 1.3 41 figure 3.8. qsop-24 landing diagram table 3.5. pcb land pattern dimension min max c 5.20 5.30 e 0.635 bsc x 0.30 0.40 y 1.50 1.60 notes: general 1. all dimensions shown are in mil limeters (mm) unless otherwise noted. 2. t his land pattern is based on the ipc-7351 guidelines. solder mask design 1. all metal pads are to be non-solder mask defined (nmsd). clearance between the solder mask and the metal pad is to be 60 m minimum, all the way around the pad. stencil design 1. a st ainless steel, laser-cut and electro-polished stenc il with trapezoidal walls should be used to assure good solder paste release. 2. t he stencil thickne ss should be 0.125 mm (5 mils). 3. t he ratio of stencil aperture to land pad size should be 1:1 for all perimeter pads. card assembly 1. a no-cl ean, type 3 solder paste is recommended. 2. t he recommended card reflow profile is per the je dec/ipc j-std-020 specification for small body components. c8051f91x-c8051f90x 42 rev. 1.3 c8051f91x-c8051f90x rev. 1.3 42 4. electrical characteristics throughout the electrical characteristics chapter , ?vdd? refers to the vdd/dc+ supply voltage. blue ind icates a feature only available on ?f912 and ?f902 devices. 4.1. absolute maximum specifications table 4.1. absolute maximum ratings parameter conditions min typ max units ambient temperature under bias ?55 ? 125 c storage temperature ?65 ? 150 c voltage on any port i/o pin or rst with respect to gnd vdd > 2.2 v vdd < 2.2 v ?0.3 ?0.3 ? ? 5.8 vdd + 3.6 v voltage on vbat with respect to gnd one-cell mode (f912/02 one-cell mode (f911/01) two-cell mode ?0.3 ?0.3 ?0.3 ? ? ? 4.0 2.0 4.0 v voltage on vdd/dc+ with respect to gnd ?0.3 ? 4.0 v maximum total current through vbat, dcen, vdd/dc+ or gnd ?? 500ma maximum current through rst or any port pin ?? 100ma maximum total current through all port pins ?? 200ma dc-dc converter output power ? ? 110 mw note: stresses above those listed under ?absolute maximum ra tings? may cause permanent damage to the device. this is a stress rating only and functi onal operation of the devices at those or any other condit ions above those indicated in the operation listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. c8051f91x-c8051f90x 43 rev. 1.3 4.2. electrical characteristics table 4.2. global electrical characteristics ?40 to +85 c, 25 mhz system clock unless otherwise specified. see "a n358: optimizing low po wer operatio n of the ?f9xx" for details on how to achieve the supply current specifications listed in this table. parameter conditions min typ max units battery supply voltage (vbat) one-cell mode (f912/02) one-cell mode (f911/01) two-cell mode 0.9 0.9 1.8 1.2 1.2 2.4 3.6 1.8 3.6 v supply voltage (vdd/dc+) one-cell mode two-cell mode 1.8 1.8 1.9 2.4 3.6 3.6 v minimum ram data retention voltage 1 vdd (not in sleep mode) vbat (in sleep mode) ? ? 1.4 0.3 ? 0.5 v sysclk (system clock) 2 0?25mhz t sysh (sysclk high time) 18 ? ? ns t sysl (sysclk low time) 18 ? ? ns specified operating temperature range ?40 ? +85 c notes: 1. based on device characterization data; not production tested. 2. sysclk m ust be at least 32 khz to enable debugging. 3. dig ital supply current depends upon the particular code being executed. the values in this table are obtained with the cpu executing an ?sjmp $? lo op, which is the compiled form of a while(1) loop in c. one iteration requires 3 cpu clock cycles, and the flas h memory is read on each cycle. t he supply current will vary slightly based on the physical location of the sjmp instruction and the number of flash addr ess lines that toggle as a result. in the worst case, current can increase by up to 30% if the sjmp loop straddles a 64-byte flash address boundary (e.g., 0x007f to 0x0080). real-world code wi th larger loops and longer linear sequences will have few transitions across the 64-byte address boundaries. 4. includ es oscillator and regulator supply current. 5. idd ca n be estimated for frequencies < 14 mhz by simply multiplying the frequency of interest by the fre quency sensitivity number for that range, then adding an offset of 90 a. when using these numbers to estimate i dd for >14 mhz, the estimate shou ld be the current at 25 mhz minus the difference in current ind icated by the frequency sensitivity number. for example: v dd = 3.0 v; f = 20 mhz, i dd = 4 ma ? (25 mhz ? 20 mhz) x 0.102 ma/mhz = 3.5 ma assuming the same oscil lator setting. 6. th e supply current specifications in table 4.2 are fo r two cell mode. the vbat current in one-cell mode can be estimated using the following equation: the vbat voltage is the voltage at the vbat pin, typically 0.9 to 1.8 v. the supply current (two-cell mode) is the da t a sheet specification for supply current. the supply voltage is the voltage at the vdd/dc+ p in, typically 1.8 to 3.3 v (default = 1.9 v). the dc-dc converter efficiency can be estimated using figure 4.3 ? figure 4.5 . 7. idle idd can be estimated by t aking the current at 25 mhz minus the difference in current indicated by the fre quency sensitivity number. for example: v dd = 3.0 v; f = 5 mhz, idle i dd = 2.1 ma ? (25 mhz ? 5 mhz) x 0.079 ma/mhz = 0.52 ma. 8. inte rnal lfo only available on ?f912 and ?f902 devices. 9. abil ity to disable vbat supply monitor only available on ?f912 and ?f902 devices. vbat current (one-cell mode) supply voltage supply current (two-cell mode) dc-dc converter efficiency vbat voltage ---------------------------------------------------------------------------------------------------------------------------------- - = c8051f91x-c8051f90x rev. 1.3 44 digital supply current?cpu active (normal mode, fetching instructions from flash) i dd 3, 4, 5, 6 v dd = 1.8?3.6 v, f = 24.5 mhz (includes precision oscillator current) ?4.05.0 ma v dd = 1.8?3.6 v, f = 20 mhz (includes low power oscillator current) ?3.4? ma v dd = 1.8 v, f = 1 mhz v dd = 3.6 v, f = 1 mhz (includes external oscillator/gpio current) ? ? 265 305 ? ? a a v dd = 1.8?3.6 v, f = 32.768 khz (includes smartclock oscillator current) ?84? a i dd frequency sensitivity 3, 5, 6 v dd = 1.8?3.6 v, t = 25 c, f < 14 mhz (flash oneshot active, see section 13.6) ?191?a/mhz v dd = 1.8?3.6 v, t = 25 c, f > 14 mhz (flash oneshot bypassed, see section 13.6) ?102?a/mhz table 4.2. global electrical characteristics (continued) ?40 to +85 c, 25 mhz system clock un less otherwise specified. see "an358: op timizing low power operation of the ?f9xx" for details on how to achieve the supply current specifications listed in this table. parameter conditions min typ max units notes: 1. based on device characterization data; not production tested. 2. sysclk must be at least 32 khz to enable debugging. 3. digital supply current depends upon the particular code being executed. the values in this table are obtained with the cpu executing an ?sjmp $? lo op, which is the compiled form of a while(1) loop in c. one iteration requires 3 cpu clock cycles, and the flas h memory is read on each cycle. t he supply current will vary slightly based on the physical location of the sjmp instruction and the number of flash addr ess lines that toggle as a result. in the worst case, current can increase by up to 30% if the sjmp loop straddles a 64-byte flash address boundary (e.g., 0x007f to 0x0080). real-world code wi th larger loops and longer linear sequences will have few transitions across the 64-byte address boundaries. 4. includes oscillator and regulator supply current. 5. idd can be estimated for frequencies < 14 mhz by simply multiplying the frequency of interest by the frequency sensitivity number for that range, then adding an offset of 90 a. when using these numbers to estimate i dd for >14 mhz, the estimate should be the current at 25 mhz minus the difference in current indicated by the frequency sensitivity number. for example: v dd = 3.0 v; f = 20 mhz, i dd = 4 ma ? (25 mhz ? 20 mhz) x 0.102 ma/mhz = 3.5 ma assuming the same oscillator setting. 6. the supply current specifications in table 4.2 are fo r two cell mode. the vbat current in one-cell mode can be estimated using the following equation: the vbat voltage is the voltage at the vbat pin, typically 0.9 to 1.8 v. the supply current (two-cell mode) is the da ta sheet specification for supply current. the supply voltage is the voltage at the vdd/dc+ pin, typically 1.8 to 3.3 v (default = 1.9 v). the dc-dc converter efficiency can be estimated using figure 4.3?figure 4.5. 7. idle idd can be estimated by taking t he current at 25 mhz minus the differ ence in current indicated by the frequency sensitivity number. for example: v dd = 3.0 v; f = 5 mhz, idle i dd = 2.1 ma ? (25 mhz ? 5 mhz) x 0.079 ma/mhz = 0.52 ma. 8. internal lfo only available on ?f912 and ?f902 devices. 9. ability to disable vbat supply monitor only available on ?f912 and ?f902 devices. vbat current (one-cell mode) supply voltage supply current (two-cell mode) dc-dc converter efficiency vbat voltage ---------------------------------------------------------------------------------------------------------------------------------- - = c8051f91x-c8051f90x 45 rev. 1.3 digital supply current?cpu inactive (idle mo de, not fetching instructions from flash) i dd 4, 6, 7 v dd = 1.8?3.6 v, f = 24.5 mhz (includes precision oscillator current) ?2.13.0 ma v dd = 1.8?3.6 v, f = 20 mhz (includes low power oscillator current) ?1.6? ma v dd = 1.8 v, f = 1 mhz v dd = 3.6 v, f = 1 mhz (includes external oscillator/gpio current) ? ? 160 185 ? ? a a v dd = 1.8?3.6 v, f = 32.768 khz (includes smartclock oscillator current) ?82? a i dd frequency sensitivity 1,6, 7 v dd = 1.8?3.6 v, t = 25 c ? 79 ? a/mhz table 4.2. global electrical characteristics (continued) ?40 to +85 c, 25 mhz system clock un less otherwise specified. see "an358: op timizing low power operation of the ?f9xx" for details on how to achieve the supply current specifications listed in this table. parameter conditions min typ max units notes: 1. based on device characterization data; not production tested. 2. sysclk must be at least 32 khz to enable debugging. 3. digital supply current depends upon the particular code being executed. the values in this table are obtained with the cpu executing an ?sjmp $? lo op, which is the compiled form of a while(1) loop in c. one iteration requires 3 cpu clock cycles, and the flas h memory is read on each cycle. t he supply current will vary slightly based on the physical location of the sjmp instruction and the number of flash addr ess lines that toggle as a result. in the worst case, current can increase by up to 30% if the sjmp loop straddles a 64-byte flash address boundary (e.g., 0x007f to 0x0080). real-world code wi th larger loops and longer linear sequences will have few transitions across the 64-byte address boundaries. 4. includes oscillator and regulator supply current. 5. idd can be estimated for frequencies < 14 mhz by simply multiplying the frequency of interest by the frequency sensitivity number for that range, then adding an offset of 90 a. when using these numbers to estimate i dd for >14 mhz, the estimate should be the current at 25 mhz minus the difference in current indicated by the frequency sensitivity number. for example: v dd = 3.0 v; f = 20 mhz, i dd = 4 ma ? (25 mhz ? 20 mhz) x 0.102 ma/mhz = 3.5 ma assuming the same oscillator setting. 6. the supply current specifications in table 4.2 are fo r two cell mode. the vbat current in one-cell mode can be estimated using the following equation: the vbat voltage is the voltage at the vbat pin, typically 0.9 to 1.8 v. the supply current (two-cell mode) is the da ta sheet specification for supply current. the supply voltage is the voltage at the vdd/dc+ pin, typically 1.8 to 3.3 v (default = 1.9 v). the dc-dc converter efficiency can be estimated using figure 4.3?figure 4.5. 7. idle idd can be estimated by taking t he current at 25 mhz minus the differ ence in current indicated by the frequency sensitivity number. for example: v dd = 3.0 v; f = 5 mhz, idle i dd = 2.1 ma ? (25 mhz ? 5 mhz) x 0.079 ma/mhz = 0.52 ma. 8. internal lfo only available on ?f912 and ?f902 devices. 9. ability to disable vbat supply monitor only available on ?f912 and ?f902 devices. vbat current (one-cell mode) supply voltage supply current (two-cell mode) dc-dc converter efficiency vbat voltage ---------------------------------------------------------------------------------------------------------------------------------- - = c8051f91x-c8051f90x rev. 1.3 46 digital supply current?suspend and sleep mode digital supply current 6 (suspend mode) v dd = 1.8?3.6 v, two-cell mode ? 77 ? a digital supply current (sleep mode, smartclock run- ning, 32.768 khz crystal) 1.8 v, t = 25 c 3.0 v, t = 25 c 3.6 v, t = 25 c 1.8 v, t = 85 c 3.0 v, t = 85 c 3.6 v, t = 85 c (includes smartclock oscillator and vbat supply monitor) ? ? ? ? ? ? 0.60 0.75 0.85 1.30 1.60 1.90 ? ? ? ? ? ? a digital supply current 8 (sleep mode, smartclock run- ning, internal lfo ) 1.8 v, t = 25 c (includes smartclock oscillator and vbat supply monitor) ?0.3? a table 4.2. global electrical characteristics (continued) ?40 to +85 c, 25 mhz system clock un less otherwise specified. see "an358: op timizing low power operation of the ?f9xx" for details on how to achieve the supply current specifications listed in this table. parameter conditions min typ max units notes: 1. based on device characterization data; not production tested. 2. sysclk must be at least 32 khz to enable debugging. 3. digital supply current depends upon the particular code being executed. the values in this table are obtained with the cpu executing an ?sjmp $? lo op, which is the compiled form of a while(1) loop in c. one iteration requires 3 cpu clock cycles, and the flas h memory is read on each cycle. t he supply current will vary slightly based on the physical location of the sjmp instruction and the number of flash addr ess lines that toggle as a result. in the worst case, current can increase by up to 30% if the sjmp loop straddles a 64-byte flash address boundary (e.g., 0x007f to 0x0080). real-world code wi th larger loops and longer linear sequences will have few transitions across the 64-byte address boundaries. 4. includes oscillator and regulator supply current. 5. idd can be estimated for frequencies < 14 mhz by simply multiplying the frequency of interest by the frequency sensitivity number for that range, then adding an offset of 90 a. when using these numbers to estimate i dd for >14 mhz, the estimate should be the current at 25 mhz minus the difference in current indicated by the frequency sensitivity number. for example: v dd = 3.0 v; f = 20 mhz, i dd = 4 ma ? (25 mhz ? 20 mhz) x 0.102 ma/mhz = 3.5 ma assuming the same oscillator setting. 6. the supply current specifications in table 4.2 are fo r two cell mode. the vbat current in one-cell mode can be estimated using the following equation: the vbat voltage is the voltage at the vbat pin, typically 0.9 to 1.8 v. the supply current (two-cell mode) is the da ta sheet specification for supply current. the supply voltage is the voltage at the vdd/dc+ pin, typically 1.8 to 3.3 v (default = 1.9 v). the dc-dc converter efficiency can be estimated using figure 4.3?figure 4.5. 7. idle idd can be estimated by taking t he current at 25 mhz minus the differ ence in current indicated by the frequency sensitivity number. for example: v dd = 3.0 v; f = 5 mhz, idle i dd = 2.1 ma ? (25 mhz ? 5 mhz) x 0.079 ma/mhz = 0.52 ma. 8. internal lfo only available on ?f912 and ?f902 devices. 9. ability to disable vbat supply monitor only available on ?f912 and ?f902 devices. vbat current (one-cell mode) supply voltage supply current (two-cell mode) dc-dc converter efficiency vbat voltage ---------------------------------------------------------------------------------------------------------------------------------- - = c8051f91x-c8051f90x 47 rev. 1.3 digital supply current (sleep mode) 1.8 v, t = 25 c 3.0 v, t = 25 c 3.6 v, t = 25 c 1.8 v, t = 85 c 3.0 v, t = 85 c 3.6 v, t = 85 c (includes vbat supply monitor) ? ? ? ? ? ? 0.05 0.08 0.12 0.75 0.90 1.20 ? ? ? ? ? ? a digital supply current (sleep mode, vbat supply monitor disabled ) 9 1.8 v, t = 25 c ? 0.01 ? a table 4.2. global electrical characteristics (continued) ?40 to +85 c, 25 mhz system clock un less otherwise specified. see "an358: op timizing low power operation of the ?f9xx" for details on how to achieve the supply current specifications listed in this table. parameter conditions min typ max units notes: 1. based on device characterization data; not production tested. 2. sysclk must be at least 32 khz to enable debugging. 3. digital supply current depends upon the particular code being executed. the values in this table are obtained with the cpu executing an ?sjmp $? lo op, which is the compiled form of a while(1) loop in c. one iteration requires 3 cpu clock cycles, and the flas h memory is read on each cycle. t he supply current will vary slightly based on the physical location of the sjmp instruction and the number of flash addr ess lines that toggle as a result. in the worst case, current can increase by up to 30% if the sjmp loop straddles a 64-byte flash address boundary (e.g., 0x007f to 0x0080). real-world code wi th larger loops and longer linear sequences will have few transitions across the 64-byte address boundaries. 4. includes oscillator and regulator supply current. 5. idd can be estimated for frequencies < 14 mhz by simply multiplying the frequency of interest by the frequency sensitivity number for that range, then adding an offset of 90 a. when using these numbers to estimate i dd for >14 mhz, the estimate should be the current at 25 mhz minus the difference in current indicated by the frequency sensitivity number. for example: v dd = 3.0 v; f = 20 mhz, i dd = 4 ma ? (25 mhz ? 20 mhz) x 0.102 ma/mhz = 3.5 ma assuming the same oscillator setting. 6. the supply current specifications in table 4.2 are fo r two cell mode. the vbat current in one-cell mode can be estimated using the following equation: the vbat voltage is the voltage at the vbat pin, typically 0.9 to 1.8 v. the supply current (two-cell mode) is the da ta sheet specification for supply current. the supply voltage is the voltage at the vdd/dc+ pin, typically 1.8 to 3.3 v (default = 1.9 v). the dc-dc converter efficiency can be estimated using figure 4.3?figure 4.5. 7. idle idd can be estimated by taking t he current at 25 mhz minus the differ ence in current indicated by the frequency sensitivity number. for example: v dd = 3.0 v; f = 5 mhz, idle i dd = 2.1 ma ? (25 mhz ? 5 mhz) x 0.079 ma/mhz = 0.52 ma. 8. internal lfo only available on ?f912 and ?f902 devices. 9. ability to disable vbat supply monitor only available on ?f912 and ?f902 devices. vbat current (one-cell mode) supply voltage supply current (two-cell mode) dc-dc converter efficiency vbat voltage ---------------------------------------------------------------------------------------------------------------------------------- - = c8051f91x-c8051f90x rev. 1.3 48 figure 4.1. active mode current (external cmos clock) 0 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 frequency (mhz) supply current (ua) f < 14 mhz oneshot enabled f > 14 mhz oneshot bypassed < 160 ua/mhz 185 ua/mhz 215 ua/mhz 300 ua/mhz 200 ua/mhz c8051f91x-c8051f90x 49 rev. 1.3 figure 4.2. idle mode current (external cmos clock) 0 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 frequency (mhz) supply current (ua) c8051f91x-c8051f90x rev. 1.3 50 figure 4.3. typical dc-dc converter efficiency (high current, vdd/dc+ = 2 v) load current (ma) efficiency (%) 9 % $ 7 9 9 % $ 7 9 9 % $ 7 9 9 % $ 7 9 9 % $ 7 9 9 % $ 7 9 9 % $ 7 9 6 : 6 ( / 6 : 6 ( / x + , q g x f w r u s d f n d j h ( 6 5 2 k p v 9 ' ' ' & |