MicroConverter , Dual-Channel a 16-Bit ADCs with Embedded Flash MCU ADuC816 FUNCTIONAL BLOCK DIAGRAM FEATURES High-Resolution Sigma-Delta ADCs AVDD AVDD Dual 16-Bit Independent ADCs ADuC816 Programmable Gain Front End AIN1 PRIMARY AIN2 PGA BUF 16-Bit No Missing Codes, Primary ADC MUX 16-BIT - ADC CURRENT IEXC1 SOURCE 13-Bit p-p Resolution 20 Hz, 20 mV Range IEXC2 MUX AGND 16-Bit p-p Resolution 20 Hz, 2.56 V Range AIN3 12-BIT AIN4 Memory AUXILIARY MUX VOLTAGE O/P DAC BUF 16-BIT - ADC AIN5 DAC 8 Kbytes On-Chip Flash/EE Program Memory 640 Bytes On-Chip Flash/EE Data Memory 8051-BASED MCU WITH ADDITIONAL TEMP PERIPHERALS Flash/EE, 100 Year Retention, 100 Kcycles Endurance SENSOR 8 KBYTES FLASH/EE PROGRAM MEMORY 256 Bytes On-Chip Data RAM 640 BYTES FLASH/EE DATA MEMORY INTERNAL PROG. 256 BYTES USER RAM 8051-Based Core BANDGAP CLOCK 3 16 BIT ON-CHIP MONITORS VREF DIVIDER 8051-Compatible Instruction Set (12.58 MHz Max) TIMER/COUNTERS POWER SUPPLY 1 TIME INTERVAL MONITOR 32 kHz External Crystal, On-Chip Programmable PLL COUNTER WATCHDOG TIMER EXTERNAL OSC Three 16-Bit Timer/Counters 2 I C-COMPATIBLE VREF & 4 PARALLEL UART AND SPI DETECT PLL PORTS 26 Programmable I/O Lines SERIAL I/O 11 Interrupt Sources, Two Priority Levels REFIN REFIN+ XTAL1 XTAL2 Power Specified for 3 V and 5 V Operation intended for the measurement of wide dynamic range, low Normal: 3 mA 3 V (Core CLK = 1.5 MHz) frequency signals, such as those in weigh scale, strain gauge, Power-Down: 20 A (32 kHz Crystal Running) pressure transducer, or temperature measurement applications. On-Chip Peripherals The ADC output data rates are programmable and the ADC On-Chip Temperature Sensor output resolution will vary with the programmed gain and 12-Bit Voltage Output DAC output rate. Dual Excitation Current Sources Reference Detect Circuit The device operates from a 32 kHz crystal with an on-chip PLL Time Interval Counter (TIC) generating a high-frequency clock of 12.58 MHz. This clock is, UART Serial I/O in turn, routed through a programmable clock divider from which 2 I C -Compatible and SPI Serial I/O the MCU core clock operating frequency is generated. The Watchdog Timer (WDT), Power Supply Monitor (PSM) microcontroller core is an 8052 and therefore 8051-instruction- set-compatible. The microcontroller core machine cycle consists APPLICATIONS of 12 core clock periods of the selected core operating frequency. Intelligent Sensors (IEEE1451.2-Compatible) 8 Kbytes of nonvolatile Flash/EE program memory are provided Weigh Scales on-chip. 640 bytes of nonvolatile Flash/EE data memory and Portable Instrumentation 256 bytes RAM are also integrated on-chip. Pressure Transducers 420 mA Transmitters The ADuC816 also incorporates additional analog functionality with a 12-bit DAC, current sources, power supply monitor, GENERAL DESCRIPTION and a bandgap reference. On-chip digital peripherals include a The ADuC816 is a complete smart transducer front-end, inte- watchdog timer, time interval counter, three timers/counters, 2 grating two high-resolution sigma-delta ADCs, an 8-bit MCU, and three serial I/O ports (SPI, UART, and I C-compatible). and program/data Flash/EE Memory on a single chip. This low On-chip factory firmware supports in-circuit serial download and power device accepts low-level signals directly from a transducer. debug modes (via UART), as well as single-pin emulation mode The two independent ADCs (Primary and Auxiliary) include a via the EA pin. A functional block diagram of the ADuC816 is temperature sensor and a PGA (allowing direct measurement of shown above with a more detailed block diagram shown in low-level signals). The ADCs with on-chip digital filtering are Figure 12. The part operates from a single 3 V or 5 V supply. When operatingThe part operates from a single 3 V or 5 V supply. When operating MicroConverter is a registered trademark of Analog Devices, Inc. from 3 V supplies, the power dissipation for the part is belowfrom 3 V supplies, the power dissipation for the part is below SPI is a registered trademark of Motorola, Inc. 10 mW. The ADuC816 is housed in 52-lead MQFP and 56-lead 10 mW. The ADuC816 is housed in a 52-lead MQFP package. 2 I C is a registered trademark of Philips Semiconductors, Inc. LFCSP packages. 0 World Wide Web Site: http:/ 3ADuC816 TABLE OF CONTENTS Using the Flash/EE Memory Interface 40 FEATURES 1 Erase-All 40 GENERAL DESCRIPTION . 1 Program a Byte . 40 SPECIFICATIONS 3 USER INTERFACE TO OTHER ON-CHIP ADuC816 TIMING SPECIFICATIONS 8 PERIPHERALS . 41 ABSOLUTE MAXIMUM RATINGS . 18 DAC . 41 ORDERING GUIDE 18 On-Chip PLL 42 PIN FUNCTION DESCRIPTIONS 19 Time Interval Counter (TIC) 43 ADuC816 BLOCK DIAGRAM 21 Watchdog Timer 46 MEMORY ORGANIZATION . 22 Power Supply Monitor 47 OVERVIEW OF MCU-RELATED SFRS 23 SERIAL PERIPHERAL INTERFACE . 48 Accumulator SFR . 23 MISO (Master In, Slave Out Data I/O Pin), Pin 14 . 48 B SFR 23 MOSI (Master Out, Slave In Pin), Pin 27 . 48 Stack Pointer SFR . 23 SCLOCK (Serial Clock I/O Pin), Pin 26 48 Data Pointer . 23 SS (Slave Select Input Pin), Pin 13 48 Program Status Word SFR 23 Using the SPI Interface . 49 Power Control SFR 23 SPI InterfaceMaster Mode . 49 SPECIAL FUNCTION REGISTERS . 24 SPI InterfaceSlave Mode 49 SFR INTERFACE TO THE PRIMARY AND 2 I C-COMPATIBLE INTERFACE 50 AUXILIARY ADCs 25 8051-COMPATIBLE ON-CHIP PERIPHERALS 51 ADCSTAT (ADC Status Register) 25 Parallel I/O Ports 03 . 51 ADCMODE (ADC Mode Register) . 26 Timers/Counters 51 ADC0CON (Primary ADC Control Register) 27 TIMER/COUNTER 0 AND 1 OPERATING MODES 54 ADC1CON (Auxiliary ADC Control Register) . 28 Mode 0 (13-Bit Timer/Counter) 54 SF (Sinc Filter Register) 28 Mode 1 (16-Bit Timer/Counter) 54 ICON (Current Sources Control Register) 29 Mode 2 (8-Bit Timer/Counter with Autoreload) 54 ADC0H/ADC0M (Primary ADC Conversion Result Mode 3 (Two 8-Bit Timer/Counters) 54 Registers) 29 Timer/Counter 2 Data Registers 55 ADC1H/ADC1L (Auxiliary ADC Conversion Result TH2 and TL2 55 Registers) 29 RCAP2H and RCAP2L . 55 OF0H/OF0M (Primary ADC Offset Calibration Timer/Counter 2 Operating Modes 56 Registers) 30 16-Bit Autoreload Mode 56 OF1H/OF1L (Auxiliary ADC Offset Calibration 16-Bit Capture Mode . 56 Registers) 30 UART SERIAL INTERFACE . 57 GN0H/GN0M (Primary ADC Gain Calibration SBUF . 57 Registers) 30 Mode 0: 8-Bit Shift Register Mode 58 GN1H/GN1L (Auxiliary ADC Gain Calibration Mode 1: 8-Bit UART, Variable Baud Rate 58 Registers) 30 Mode 2: 9-Bit UART with Fixed Baud Rate . 58 PRIMARY AND AUXILIARY ADC CIRCUIT Mode 3: 9-Bit UART with Variable Baud Rate . 58 DESCRIPTION OVERVIEW 31 UART Serial Port Baud Rate Generation . 58 Primary ADC . 31 Timer 1 Generated Baud Rates . 59 Auxiliary ADC 32 Timer 2 Generated Baud Rates . 59 PRIMARY AND AUXILIARY ADC NOISE INTERRUPT SYSTEM 60 PERFORMANCE . 33 Interrupt Priority 61 Analog Input Channels . 33 ADuC816 HARDWARE DESIGN CONSIDERATIONS 62 Primary and Auxiliary ADC Inputs 33 Clock Oscillator . 62 Analog Input Ranges . 33 External Memory Interface 62 Programmable Gain Amplifier 34 Power-On Reset Operation 63 Bipolar/Unipolar Inputs . 34 Power Supplies . 63 Burnout Currents 34 Power Consumption . 64 Excitation Currents 34 Power-Saving Modes . 64 Reference Input . 34 Grounding and Board Layout Recommendations . 64 Reference Detect 35 ADuC816 System Self-Identification . 65 Sigma-Delta Modulator . 35 OTHER HARDWARE CONSIDERATIONS . 65 Digital Filter . 35 In-Circuit Serial Download Access 65 ADC Chopping . 36 Embedded Serial Port Debugger 65 Calibration . 36 Single-Pin Emulation Mode 65 NONVOLATILE FLASH/EE MEMORY 37 Enhanced-Hooks Emulation Mode 66 Flash/EE Memory Overview . 37 Typical System Configuration 66 Flash/EE Memory and the ADuC816 37 QUICKSTART DEVELOPMENT SYSTEM . 67 ADuC816 Flash/EE Memory Reliability 37 DownloadIn-Circuit Serial Downloader . 67 Using the Flash/EE Program Memory 38 DeBugIn-Circuit Debugger 67 Flash/EE Program Memory Security . 38 ADSIMWindows Simulator 67 Using the Flash/EE Data Memory . 39 OUTLINE DIMENSIONS 68 ECONFlash/EE Memory Control SFR 39 Flash/EE Memory Timing . 40 Rev. B 2