19-4384; Rev 0; 11/08 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface Features The MAXQ7670 is a highly integrated solution for measuring multiple analog signals and outputting the results on a control area network (CAN) bus. The device operates from a single 5V supply and incorporates a highperformance, 16-bit reduced instruction set computing (RISC) core, a SAR ADC, and a CAN 2.0B controller, supporting transfer rates up to 1Mbps. The 10-bit SAR ADC includes an amplifier with programmable gains of 1V/V or 16V/V, 8 input channels, and conversion rates up to 250ksps. The eight single-ended ADC inputs can be configured as four unipolar or bipolar, fully differential inputs. For single-supply operation, the external 5V supply powers the digital I/Os and two separate integrated linear regulators that supply the 2.5V digital core and the 3.3V analog circuitry. Each supply rail has a dedicated power-supply supervisor that provides brownout detection and power-on reset (POR) functions. The 16-bit RISC microcontroller (µC) includes 64KB (32K x 16) of nonvolatile program/data flash and 2KB (1K x 16) of data RAM. Other features of the MAXQ7670 include a 4-wire SPI™ interface, a JTAG interface for in-system programming and debugging, an integrated 15MHz RC oscillator, external crystal oscillator support, a timer/counter with pulse-width modulation (PWM) capability, and seven GPIO pins with interrupt and wake-up capability. The system-on-a-chip (SoC) MAXQ7670 is a µC-based, smart data acquisition system. As a member of the MAXQ® family of 16-bit, RISC µCs, the MAXQ7670 is ideal for low-cost, low-power, embedded-applications such as automotive, industrial controls, and building automation. The flexible, modular architecture used in the MAXQ µCs allows development of targeted products for specific applications with minimal effort. The MAXQ7670 is available in a 40-pin, 5mm x 5mm TQFN package, and is specified to operate over the -40°C to +125°C automotive temperature range. ♦ High-Performance, Low-Power, 16-Bit RISC Core 0.166MHz to 16MHz Operation, Approaching 1MIPs/MHz Low Power (< 1mA/MIPS, VDVDD = +2.5V) 16-Bit Instruction Word, 16-Bit Data Bus 33 Instructions, Most Require Only One Clock Cycle 16-Level Hardware Stack 16 x 16-Bit, General-Purpose Working Registers Three Independent Data Pointers with AutoIncrement/Decrement Low-Power, Divide-by-256, Power-Management Modes (PMM) and Stop Mode ♦ Program and Data Memory 64KB Internal Nonvolatile Program/Data Flash 2KB Internal Data RAM ♦ SAR ADC 8 Single-Ended/4 Differential Channels, 10-Bit Resolution with No Missing Codes PGA Gain = 1V/V or 16V/V 250ksps (150.9ksps with PGA Gain = 16V/V) ♦ Timer/Digital I/O Peripherals CAN 2.0B Controller (15 Message Centers) Serial Peripheral Interface (SPI) JTAG Interface (Extensive Debug and Emulation Support) Single 16-Bit/Dual 8-Bit Timer/PWM Seven General-Purpose, Digital I/O Pins with External Interrupt/Wake-Up Features ♦ Oscillator/Clock Module Internal Oscillator Supports External Crystal (8MHz or 16MHz) Integrated 15MHz RC Oscillator External Clock Source Operation Programmable Watchdog Timer ♦ Power-Management Module Power-On Reset Power-Supply Supervisor/Brownout Detection Integrated +2.5V and +3.3V Linear Regulators Applications Ordering Information Automotive Steering Angle and Torque Sensors CAN-Based Automotive Sensor Applications Industrial Control Building Automation SPI is a trademark of Motorola, Inc. MAXQ is a registered trademark of Maxim Integrated Products, Inc. PART TEMP RANGE PIN-PACKAGE MAXQ7670ATL+ -40°C to +125°C 40 TQFN-EP* +Denotes a lead-free/RoHS-compliant package. *EP = Exposed pad. Typical Application Circuit and Pin Configuration appear at end of data sheet. Note: Some revisions of this device may incorporate deviations from published specifications known as errata. Multiple revisions of any device may be simultaneously available through various sales channels. For information about device errata, go to: http://www.maxim-ic.com/errata. ________________________________________________________________ Maxim Integrated Products For pricing, delivery, and ordering information, please contact Maxim Direct at 1-888-629-4642, or visit Maxim’s website at www.maxim-ic.com. 1 MAXQ7670 General Description MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface ABSOLUTE MAXIMUM RATINGS DVDD to DGND ........................................................-0.3V to +3V DVDDIO to GNDIO ................................................-0.3V to +5.5V AVDD to AGND ........................................................-0.3V to +4V DGND to GNDIO. ..................................................-0.3V to +0.3V GNDIO to AGND. ..................................................-0.3V to +0.3V AGND to DGND.....................................................-0.3V to +0.3V Analog Inputs to AGND..........................-0.3V to (VAVDD + 0.3V) RESET, Digital Inputs/Outputs to GNDIO ............................................-0.3V to (VDVDDIO + 0.3V) XIN, XOUT to DGND ..............................-0.3V to (VDVDD + 0.3V) Continuous Power Dissipation (TA = +70°C) 40-Pin TQFN (derate 36mW/°C above +70°C) ..........2857mW Continuous Current into Any Pin.......................................±50mA Operating Temperature Range .........................-40°C to +125°C Junction Temperature ......................................................+150°C Storage Temperature Range .............................-65°C to +150°C Lead Temperature (soldering, 10s) ................................+300°C Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. ELECTRICAL CHARACTERISTICS (VDVDDIO = +5.0V, VAVDD = +3.3V, VDVDD = +2.5V, VREFADC = +3.3V, system clock = 16MHz. TA = TMIN to TMAX, unless otherwise noted. Typical values are at TA = +25°C.) (Note 1) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS POWER REQUIREMENTS Supply Voltage Ranges DVDD REGEN2 = DVDDIO, DVDD ≤ AVDD, DVDD ≤ DVDDIO 2.25 2.5 2.75 AVDD LRAPD = 1, AVDD ≤ DVDDIO 3.0 3.3 3.6 4.5 5.0 5.25 Shutdown (Note 2) 3 10 µA All analog functions enabled 6 7 mA DVDDIO AVDD Supply Current Analog Module Incremental Subfunction Supply Current IAVDD ∆IAVDD ADC, 50ksps, 4MHz ADCCLK 5200 ADC, 250ksps, 4MHz ADCCLK 5600 AVDD brownout interrupt monitor PGA enabled DVDD Supply Current IDVDD Digital Peripheral Incremental Subfunction Supply Current DVDDIO Supply Current 2 ∆IDVDD IDVDDIO µA 3 5500 CPU in stop mode, all peripherals disabled 25 200 High speed/2MHz mode (Note 3) 2.0 2.5 High speed/16MHz mode (Note 4) 11.3 Low speed/625kHz mode (Note 5) 0.95 Program flash erase or write V 14 µA mA 23 DVDDIO brownout reset monitor 1 HF crystal oscillator 60 Internal fixed-frequency oscillator 50 All digital I/Os static at GNDIO or DVDDIO 2 20 µA 0.2 0.3 mA CAN transmitting, timer output switching (Note 6) _______________________________________________________________________________________ µA Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface (VDVDDIO = +5.0V, VAVDD = +3.3V, VDVDD = +2.5V, VREFADC = +3.3V, system clock = 16MHz. TA = TMIN to TMAX, unless otherwise noted. Typical values are at TA = +25°C.) (Note 1) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS MEMORY SECTION Flash Memory Size Program or data storage 64 KB Flash Page Size 16-bit word size 256 Words Flash Erase/Write Endurance Program or data (Note 7) Flash Data Retention (Note 7) Flash Erase Time 100 All flash, TA = +85°C 15 Flash page erase 20 50 Entire flash mass erase 200 500 Entire flash programming Years ms 20 40 µs 0.66 1.31 s RAM Memory Size Utility ROM Size Cycles All flash, TA = +25°C Flash single word programming Flash Programming Time 10,000 16-bit word size 2 KB 4 KWords ANALOG SENSE PATH (Includes PGA and ADC) Resolution NADC No missing codes 10 Bits PGA gain = 16V/V, bipolar mode, VIN = ±100mV, 150.9ksps ±0.5 ±1 PGA gain = 1V/V, unipolar mode, VIN = +1.0V, 250ksps ±0.4 ±1 PGA gain = 1V/V or 16V/V ±0.4 ±1 LSB10 Input-Referred Offset Error Test at TA = +25°C, PGA gain = 1V/V or 16V/V ±1 ±10 mV Offset-Error Temperature Coefficient PGA gain = 16V/V, bipolar mode ±2 Gain Error PGA gain = 16V/V, bipolar mode, excludes offset and reference error, test at TA = +25°C Gain-Error Temperature Coefficient PGA gain = 16V/V, bipolar mode Integral Nonlinearity Differential Nonlinearity Conversion Clock Frequency Sample Rate DNLADC fADCCLK fSAMPLE Channel Select, Track-andHold Acquisition Time Conversion Time INLADC tACQ tCONV fSYSCLK = 8MHz or 16MHz LSB10 -2 µV/°C +2 ±5 0.5 ppm/°C 4.0 PGA gain = 16V/V, fADCCLK = 4MHz 150.9 PGA gain = 1V/V, fADCCLK = 4MHz 250 PGA gain = 16V/V, 13.5 ADCCLK cycles at 4MHz 3.375 PGA gain = 1V/V, three ADCCLK cycles at 4MHz 0.75 13 ADCCLK cycles at 4MHz 3.25 % MHz ksps µs µs _______________________________________________________________________________________ 3 MAXQ7670 ELECTRICAL CHARACTERISTICS (continued) MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface ELECTRICAL CHARACTERISTICS (continued) (VDVDDIO = +5.0V, VAVDD = +3.3V, VDVDD = +2.5V, VREFADC = +3.3V, system clock = 16MHz. TA = TMIN to TMAX, unless otherwise noted. Typical values are at TA = +25°C.) (Note 1) PARAMETER SYMBOL Channel Select Plus Conversion Time Turn-On Time tACQ + tCONV CONDITIONS MIN PGA gain = 16V/V, 26.5 ADCCLK cycles at 4MHz TYP MAX UNITS 6.625 µs PGA gain = 1V/V, 16 ADCCLK cycles at 4MHz 4 tRECOV 10 µs Aperture Delay 60 ns Aperture Jitter 100 psP-P Differential Input Voltage Range At AIN0–AIN7, unipolar mode, PGA gain = 1V/V 0 VREFADC At AIN0–AIN7, unipolar mode, PGA gain = 16V/V 0 0.125 At AIN0–AIN7, bipolar mode, PGA gain = 1V/V -VREFADC /2 +VREFADC /2 At AIN0–AIN7, bipolar mode, PGA gain = 16V/V -VREFADC /32 +VREFADC /32 0 VAVDD V Absolute Input Voltage Range At AIN0–AIN7 Input Leakage Current At AIN0–AIN7 Input-Referred Noise Small-Signal Bandwidth (-3dB) Large-Signal Bandwidth (-3dB) ±0.1 At AIN0–AIN7, PGA gain = 16V/V 50 At AIN0–AIN7, PGA gain = 1V/V 400 VIN = 12mVP-P, PGA gain = 16V/V 33 VIN = 200mVP-P, PGA gain = 1V/V 23 VIN = 150mVP-P, PGA gain =16V/V 33 VIN = 2.5VP-P, PGA gain = 1V/V 19 Single-ended, any AIN0–AIN7, PGA gain = 16V/V 16 Single-ended, any AIN0–AIN7, PGA gain = 1V/V 13 V µA µVRMS MHz MHz pF Input Capacitance (Note 8) Input Common-Mode Rejection Ratio CMRR AIN0–AIN7, VCM = differential input range 75 dB Power-Supply Rejection Ratio PSRR AVDD = 3.0V to 3.6V 90 dB EXTERNAL REFERENCE INPUTS REFADC Input Voltage Range 1.0 3.3 VAVDD V REFADC Leakage Current ADC disabled 1 µA Input Capacitance (Note 9) 20 pF +3.3V (AVDD) LINEAR REGULATOR AVDD Output Voltage LRAPD = 0 No-Load Quiescent Current LRAPD = 0, all internal analog peripherals disabled 4 3.15 3.3 10 _______________________________________________________________________________________ 3.45 V µA Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface (VDVDDIO = +5.0V, VAVDD = +3.3V, VDVDD = +2.5V, VREFADC = +3.3V, system clock = 16MHz. TA = TMIN to TMAX, unless otherwise noted. Typical values are at TA = +25°C.) (Note 1) PARAMETER SYMBOL CONDITIONS MIN TYP MAX 50 UNITS Output Current Capability LRAPD = 0 Output Short-Circuit Current LRAPD = 0, AVDD shorted to AGND 100 mA mA Maximum AVDD Bypass Capacitor to AGND LRAPD = 0 0.47 µF +2.5V (DVDD) LINEAR REGULATOR DVDD Output Voltage REGEN2 = GNDIO No-Load Quiescent Current REGEN2 = GNDIO, all internal digital peripherals disabled Output Current Capability REGEN2 = GNDIO Output Short-Circuit Current REGEN2 = GNDIO, DVDD shorted to DGND 100 mA Maximum DVDD Bypass Capacitor to DGND REGEN2 = GNDIO 0.47 µF 2.38 2.5 2.62 15 V µA 50 mA SUPPLY-VOLTAGE SUPERVISORS AND BROWNOUT DETECTION DVDD Reset Threshold Asserts RESET if VDVDD is below this threshold 2.1 2.25 V DVDD Interrupt Threshold Generates an interrupt if VDVDD falls below this threshold 2.25 2.38 V Minimum DVDD Interrupt and Reset Threshold Difference 0.14 V AVDD Interrupt Threshold Generates an interrupt if VAVDD falls below this threshold 3.0 3.15 V DVDDIO Interrupt Threshold Generates an interrupt if VDVDDIO falls below this threshold 4.5 4.75 V DVDD 1 2.75 AVDD 1 3.6 DVDDIO 1 5.25 Operational Range Supervisor Hysteresis ±0.7 V % CAN INTERFACE CAN Baud Rate fCANCLK = 8MHz CANCLK Mean Frequency Error 8MHz or 16MHz, 50ppm external crystal CANCLK Total Frequency Error 8MHz or 16MHz, 50ppm external crystal; measured over a 12ms interval; mean plus peak cycle jitter 1 Mbps 60 ppm < 0.5 % _______________________________________________________________________________________ 5 MAXQ7670 ELECTRICAL CHARACTERISTICS (continued) MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface ELECTRICAL CHARACTERISTICS (continued) (VDVDDIO = +5.0V, VAVDD = +3.3V, VDVDD = +2.5V, VREFADC = +3.3V, system clock = 16MHz. TA = TMIN to TMAX, unless otherwise noted. Typical values are at TA = +25°C.) (Note 1) PARAMETER SYMBOL CONDITIONS MIN TYP MAX 8 or 16 16 UNITS HIGH-FREQUENCY CRYSTAL OSCILLATOR Using external crystal Clock Frequency External input (Note 10) Stability Excluding crystal drift Startup Time fSYSCLK cycles XIN Input Low Voltage Driven with external clock source XIN Input High Voltage Driven with external clock source 0.166 16.67 MHz 25 ppm 65,535 Cycles 0.3 x VDVDD 0.7 x VDVDD V V INTERNAL FIXED-FREQUENCY OSCILLATOR Frequency fIFFCLK TA = TMIN to TMAX Tolerance TA = +25°C Temperature Drift TA = TMIN to TMAX Power-Supply Rejection TA = +25°C, DVDD = 2.25V to 2.75V 13.8 15 16.35 MHz ±0.4 % 5 % ±1.5 % 55 kΩ RESET (RESET) RESET Internal Pullup Resistance Pulled up to DVDDIO RESET Output Low Voltage RESET asserted, no external load RESET Output High Voltage RESET deasserted, no external load RESET Input Low Voltage Driven with external clock source RESET Input High Voltage Driven with external clock source 0.4 0.9 x VDVDDIO V V 0.3 x VDVDD 0.7 x VDVDDIO V V DIGITAL INPUTS (P0._, CANRXD, MISO, MOSI, SS, SCLK, TCK, TDI, TMS) Input Low Voltage 0.8 Input High Voltage 2.1 Input Hysteresis Input Leakage Current 500 VIN = GNDIO or VDVDDIO, pullup disabled -10 V V ±0.01 mV +10 µA Input Pullup Resistance 55 kΩ Input Pulldown Resistance 55 kΩ Input Capacitance 15 pF DIGITAL OUTPUTS (P0._, CANTXD, MOSI, SCLK, SS, TDO) Output Low Voltage Output High Voltage 6 ISINK = 0.5mA ISOURCE = 0.5mA 0.4 VDVDDIO - 0.5 _______________________________________________________________________________________ V V Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface (VDVDDIO = +5.0V, VAVDD = +3.3V, VDVDD = +2.5V, VREFADC = +3.3V, system clock = 16MHz. TA = TMIN to TMAX, unless otherwise noted. Typical values are at TA = +25°C.) (Note 1) PARAMETER SYMBOL Output Capacitance Maximum Output Impedance CONDITIONS MIN TYP I/O pins three-state 15 PD0._ = 0 880 PD0._ = 1 450 MAX UNITS pF Ω SYSTEM CLOCK System Clock Frequency fSYSCLK From any clock source 0 16.67 MHz 8 MHz fSYSCLK/8 MHz SPI INTERFACE TIMING SPI Master Operating Frequency fMCLK SPI Slave Mode Operating Frequency fSCLK SCLK Output Pulse-Width High/Low tMCH, tMCL 0.5 x fSYSCLK tSYSCLK - 25 ns SCLK Input Pulse-Width High/Low tSCH, tSCL MOSI Output Hold Time After SCLK Sample Edge tMOH tSYSCLK - 25 ns MOSI Output Setup Time to SCLK Sample Edge tMOS tSYSCLK - 25 ns MISO Input Setup Time to SCLK Sample Edge tMIS 30 ns MISO Input Hold Time After SCLK Sample Edge tMIH 0 ns SCLK Inactive to MOSI Inactive tMLH tSYSCLK - 25 ns MOSI Input Setup Time to SCLK Sample Edge tSIS 30 ns MOSI Input Hold Time After SCLK Sample Edge tSIH tSYSCLK + 25 ns MISO Output Valid After SCLK Shift Edge Transition tSOV 3 tSYSCLK + 25 ns MISO Output Disabled After SS Edge Rise tSLH 2 tSYSCLK + 50 ns SS Falling Edge to MISO Active tSOE tSYSCLK 2 tSYSCLK + 2.5 ns ns _______________________________________________________________________________________ 7 MAXQ7670 ELECTRICAL CHARACTERISTICS (continued) MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface ELECTRICAL CHARACTERISTICS (continued) (VDVDDIO = +5.0V, VAVDD = +3.3V, VDVDD = +2.5V, VREFADC = +3.3V, system clock = 16MHz. TA = TMIN to TMAX, unless otherwise noted. Typical values are at TA = +25°C.) (Note 1) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS SS Falling Edge to First SCLK Sample Edge tSSE 2 tSYSCLK +5 ns SCLK Inactive to SS Rising Edge tSD tSYSCLK + 10 ns tSCW tSYSCLK + 10 ns Minimum CS Pulse Width Note 1: All devices are 100% production tested at TA = +25°C and +125°C. Temperature limits to TA = -40°C are guaranteed by design. Note 2: All analog functions disabled and all digital inputs connected to supply or ground. Note 3: High-speed/8 mode without CAN; VDVDD = +2.5V, CPU and 16-bit timer running at 2MHz from an external, 16MHz crystal oscillator; all other peripherals disabled; all digital I/Os static at VDVDDIO or GNDIO; TA = TMIN to TMAX. Note 4: High-speed/1 mode with CAN; VDVDD = +2.5V, CPU and 16-bit timer running at 16MHz from an external, 16MHz crystal oscillator; CAN enabled and communicating at 500kbps; all other peripherals disabled, all digital I/Os (except CANTXD and CANRXD) static at VDVDDIO or GNDIO, TA = TMIN to TMAX. Note 5: Low speed, PMM1 mode without CAN; VDVDD = +2.5V, CPU and one timer running from an external, 16MHz crystal oscillator in PMM1 mode; all other peripherals disabled; all digital I/Os static at VDVDDIO or GNDIO, TA = TMIN to TMAX. Note 6: CAN transmitting at 500kbps; 16-bit timer output switching at 500kHz; all active I/Os are loaded with a 20pF capacitor; all remaining digital I/Os are static at VDVDDIO or GNDIO, TA = TMIN to TMAX. Note 7: Guaranteed by design and characterization. Note 8: This is not a static capacitance. It is the capacitance presented to the analog input when the T/H amplifier is in sample mode. Note 9: The switched capacitor on the REFADC input can disturb the reference voltage. To reduce this disturbance, place a 0.1µF capacitor from REFADC to AGND as close as possible to REFADC. Note 10: The digital design is fully static. However, the lower clock limit is set by a clock detect circuit. The MAXQ7670 switches to the internal RC clock if the external input goes below 166kHz. This clock detect circuit also acts to detect a crystal failure when a crystal is used. 8 _______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface MAXQ7670 SAMPLE EDGE SHIFT EDGE tMCL tMCH tMCH tMCL tMCLK SCLK (CKPOL/CKPHA = 0/1 OR 1/0 MODE) SCLK (CKPOL/CKPHA = 0/0 OR 1/1 MODE) tMIS tMIH MISO tMOS tMOH tMLH HIGH IMPEDANCE MOSI Figure 1. SPI Timing Diagram in Master Mode tSCW SAMPLE EDGE SHIFT EDGE tSCLK SS tSSE tSCL tSCH tSCH tSCL tSD SCLK (CKPOL/CKPHA = 0/1 OR 1/0 MODE) SCLK (CKPOL/CKPHA = 0/0 OR 1/1 MODE) tSIS tSIH MOSI tSOE MISO tSOV tSLH HIGH IMPEDANCE HIGH IMPEDANCE Figure 2. SPI Timing Diagram in Slave Mode _______________________________________________________________________________________ 9 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface MAXQ7670 Typical Operating Characteristics (VDVDDIO = 5.0V, VAVDD = 3.3V, VDVDD = 2.5V, fSYSCLK = 16MHz, ADC resolution = 10 bits, VREFDAC = 3.3V, TA = +25°C, unless otherwise noted.) 4 TA = +85°C TA = +25°C VOL (V) 3 TA = +25°C TA = +25°C 3 TA = -40°C TA = -40°C TA = +25°C TA = +85°C TA = +85°C 1 TA = +105°C TA = +105°C 0 -0.5 -1.0 -1.5 0 0 2.5 ADC DNL vs. CODE (REFADC = +3.3V, 150.9ksps, PGA GAIN = 16V/V) 0.5 1.0 1.5 IOL (mA) 2.0 -512 2.5 MAXQ7670 toc04 2.0 BIPOLAR MODE VIN = -100mV to +100mV 0.6 1.6 OFFSET ERROR (mV) 0.4 1.8 0.2 0 -0.2 1.4 BIPOLAR MODE PGA GAIN = 16V/V VIN-DIFF = 0 VIN-CM = +1.65V 1.2 1.0 0.8 0.6 0.4 0.2 0 -0.2 -0.4 0.4 -0.6 -0.8 0.2 -0.8 -1.0 0 512 DVDD, RESET POWER-UP CHARACTERISTICS -1.0 -40 -25 -10 5 20 35 50 65 80 95 110 125 TEMPERATURE (°C) -40 -25 -10 5 20 35 50 65 80 95 110 125 TEMPERATURE (°C) DVDD, RESET POWER-DOWN CHARACTERISTICS MAXIMUM DVDD TRANSIENT DURATION vs. BOI THRESHOLD OVERDRIVE MAXQ7670 toc07 MAXQ7670 toc08 DVDDIO 2V/div DVDDIO 2V/div DVDD 1V/div REGEN2 = GNDIO RESET 2V/div 200 DVDD 1V/div REGEN2 = GNDIO RESET 2V/div MAXIMUM TRANSIENT DURATION (µs) -256 0 256 DIGITAL OUTPUT CODE BIPOLAR MODE PGA GAIN = 16V/V VIN-DIFF = 200mV VIN-CM = +1.65V 0.8 0.6 -512 512 1.0 -0.6 -0.4 -256 0 256 DIGITAL OUTPUT CODE ADC GAIN ERROR vs. TEMPERATURE ADC OFFSET ERROR vs. TEMPERATURE 1.0 GAIN ERROR (%) 2.0 MAXQ7670 toc05 1.0 1.5 IOH (mA) MAXQ7670 toc06 0 0.5 0.5 BOI ASSERTED ABOVE THIS LINE 180 160 MAXQ7670 toc09 TA = +105°C 0 BIPOLAR MODE VIN = -100mV TO +100mV 1.0 TA = +85°C 1 ADC DNL (LSB) PS0._ = 0 2 2 0.8 TA = +105°C TA = -40°C TA = -40°C VOH (V) PS0._ = 1 ADC INL (LSB) PS0._ = 0 1.5 MAXQ7670 toc02 PS0._ = 1 4 5 MAXQ7670 toc01 5 ADC INL vs. CODE (REF ADC = +3.3V, 150.9ksps, PGA GAIN = 16V/V) GPO._ OUTPUT LOW VOLTAGE vs. SINK CURRENT MAXQ7670 toc03 GPO._ OUTPUT HIGH VOLTAGE vs. SOURCE CURRENT 140 120 100 80 60 40 20 0 10ms/div 10 20ms/div 1 10 100 1000 DVDD BOI THRESHOLD OVERDRIVE (mV) ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface 120 100 80 60 40 20 0 160 3.5 120 100 80 3.0 1.0 0.5 20 0 0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 DVDDIO (V) 10 100 1000 AVDD BOI THRESHOLD OVERDRIVE (mV) DVDD LINEAR REGULATOR OUTPUT VOLTAGE vs. DVDDIO SUPPLY VOLTAGE AVDD LINEAR REGULATOR OUTPUT VOLTAGE vs. LOAD CURRENT 3.40 LRAPD = 0 3.35 3.0 MAXQ7670 toc14 LRAPD = 0 IOUT = 10mA 2.0 40 1 MAXQ7670 toc13 3.40 2.5 1.5 60 10 100 1000 DVDDIO BOI THRESHOLD OVERDRIVE (mV) AVDD LINEAR REGULATOR OUTPUT VOLTAGE vs. TEMPERATURE LRAPD = 0 IOUT = 10mA 140 0 1 MAXQ7670 toc12 180 4.0 2.5 MAXQ7670 toc15 140 BOI ASSERTED ABOVE THIS LINE AVDD (V) 160 200 MAXQ7670 toc11 BOI ASSERTED ABOVE THIS LINE 180 AVDD LINEAR REGULATOR OUTPUT VOLTAGE vs. DVDDIO SUPPLY VOLTAGE MAXIMUM AVDD TRANSIENT DURATION vs. BOI THRESHOLD OVERDRIVE MAXIMUM TRANSIENT DURATION (µs) MAXIMUM TRANSIENT DURATION (µs) 200 MAXQ7670 toc10 MAXIMUM DVDDIO TRANSIENT DURATION vs. BOI THRESHOLD OVERDRIVE REGEN2 = DVDDIO IOUT = 10mA 3.35 3.30 DVDD (V) AVDD (V) AVDD (V) 2.0 3.30 1.5 1.0 3.25 3.25 0.5 3.20 -40 -25 -10 5 20 35 50 65 80 95 110 125 TEMPERATURE (°C) DVDD LINEAR REGULATOR OUTPUT VOLTAGE vs. TEMPERATURE 2.60 REGEN2 = DVDDIO 0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 DVDDIO (V) RC OSCILLATOR OUTPUT FREQUENCY vs. TEMPERATURE 17.0 16.5 DVDD (V) 2.50 FREQUENCY (MHz) 2.55 2.55 DVDD (V) 10 15 20 25 30 35 40 45 50 LOAD CURRENT (mA) MAXQ7670 toc17 REGEN2 = DVDDIO IOUT = 10mA 5 DVDD LINEAR REGULATOR OUTPUT VOLTAGE vs. LOAD CURRENT MAXQ7670 toc16 2.60 0 0 MAXQ7670 toc18 3.20 2.50 16.0 15.5 15.0 2.45 2.45 14.5 2.40 2.40 -40 -25 -10 5 20 35 50 65 80 95 110 125 TEMPERATURE (°C) 14.0 0 5 10 15 20 25 30 35 40 45 50 LOAD CURRENT (mA) -40 -25 -10 5 20 35 50 65 80 95 110 125 TEMPERATURE (°C) ______________________________________________________________________________________ 11 MAXQ7670 Typical Operating Characteristics (continued) (VDVDDIO = 5.0V, VAVDD = 3.3V, VDVDD = 2.5V, fSYSCLK = 16MHz, ADC resolution = 10 bits, VREFDAC = 3.3V, TA = +25°C, unless otherwise noted.) Typical Operating Characteristics (continued) (VDVDDIO = 5.0V, VAVDD = 3.3V, VDVDD = 2.5V, fSYSCLK = 16MHz, ADC resolution = 10 bits, VREFDAC = 3.3V, TA = +25°C, unless otherwise noted.) 12 NOTE 4 IN EC CHARACTERISTICS 10 8 6 NOTE 3 IN EC CHARACTERISTICS 4 NOTE 5 IN EC CHARACTERISTICS 2.45 2.55 DVDD (V) 2.65 2.75 DVDD SUPPLY CURRENT vs. DVDD SUPPLY VOLTAGE 26.0 25.5 25.0 24.5 28 2.625 2.500 2.625 10 6 NOTE 3 IN EC CHARACTERISTICS 4 NOTE 5 IN EC CHARACTERISTICS -40 -25 -10 5 20 35 50 65 80 95 110 125 TEMPERATURE (°C) DVDD SUPPLY CURRENT vs. TEMPERATURE AVDD SUPPLY CURRENT vs. AVDD SUPPLY VOLTAGE STOP MODE 27 26 25 24 140 SHUTDOWN (NOTE 2) IN EC CHARACTERISTICS 120 100 80 60 40 20 0 -40 -25 -10 5 20 35 50 65 80 95 110 125 2.750 NOTE 4 IN EC CHARACTERISTICS 8 DVDD SUPPLY VOLTAGE (V) 22 2.375 3.00 3.15 3.30 3.45 DVDD SUPPLY VOLTAGE (V) TEMPERATURE (°C) AVDD SUPPLY VOLTAGE (V) AVDD SUPPLY CURRENT vs. TEMPERATURE AVDD SUPPLY CURRENT vs. AVDD SUPPLY VOLTAGE AVDD SUPPLY CURRENT vs. TEMPERATURE 100 80 60 40 6.0 ALL ANALOG FUNCTIONS ENABLED 5.9 5.8 5.7 6.2 ALL ANALOG FUNCTIONS ENABLED AVDD SUPPLY CURRENT (mA) SHUTDOWN (NOTE 2) IN EC CHARACTERISTICS AVDD SUPPLY CURRENT (mA) 140 MAXQ7670 toc25 23.5 2.250 12 2.750 23 24.0 120 2.500 MAXQ7670 toc26 DVDD SUPPLY CURRENT (µA) STOP MODE DVDD SUPPLY CURRENT (µA) MAXQ7670 toc22 26.5 FLASH ERASE 14 0 2.375 AVDD SUPPLY CURRENT (nA) 2.35 0 2.250 MAXQ7670 toc23 2.25 16 2 2 14.0 MAXQ7670 toc21 MAXQ7670 toc020 FLASH ERASE 14 18 MAXQ7670 toc24 14.5 16 20 6.0 3.60 MAXQ7670 toc27 15.0 18 DVDD SUPPLY CURRENT (mA) FREQUENCY (MHz) 15.5 20 DVDD SUPPLY CURRENT (mA) MAXQ7670 toc19 16.0 DVDD SUPPLY CURRENT vs. TEMPERATURE DVDD SUPPLY CURRENT vs. DVDD SUPPLY VOLTAGE RC OSCILLATOR OUTPUT FREQUENCY vs. DVDD AVDD SUPPLY CURRENT (nA) MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface 5.8 5.6 5.4 20 0 TEMPERATURE (°C) 12 5.2 5.6 -40 -25 -10 5 20 35 50 65 80 95 110 125 3.00 3.15 3.30 3.45 AVDD SUPPLY VOLTAGE (V) 3.60 -40 -25 -10 5 20 35 50 65 80 95 110 125 TEMPERATURE (°C) ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface 5.6 5.5 NOTE 6 IN EC CHARACTERISTICS 240 220 200 180 160 140 250 MAXQ7670 toc30 260 NOTE 6 IN EC CHARACTERISTICS DVDDIO SUPPLY CURRENT (µA) AVDD SUPPLY CURRENT (mA) PGA GAIN = 16V/V DVDDIO SUPPLY CURRENT (µA) MAXQ7670 toc28 5.7 DVDDIO DYNAMIC SUPPLY CURRENT vs. TEMPERATURE DVDDIO DYNAMIC SUPPLY CURRENT vs. DVDDIO SUPPLY VOLTAGE MAXQ7670 toc29 AVDD SUPPLY CURRENT vs. ADC SAMPLING RATE 240 230 220 210 120 5.4 1 10 100 2.625 2.750 -40 -25 -10 5 20 35 50 65 80 95 110 125 TEMPERATURE (°C) DVDDIO STATIC SUPPLY CURRENT vs. DVDDIO SUPPLY VOLTAGE DVDDIO STATIC SUPPLY CURRENT vs. TEMPERATURE DVDDIO INCREMENTAL SUPPLY CURRENT vs. DVDDIO SUPPLY VOLTAGE 80 60 100 80 60 5.00 5.125 -40 -25 -10 5 20 35 50 65 80 95 110 125 5.250 DVDDIO SUPPLY VOLTAGE (V) TEMPERATURE (°C) DVDDIO INCREMENTAL SUPPLY CURRENT vs. TEMPERATURE ADC SAMPLING ERROR vs. INPUT SOURCE IMPEDANCE SAMPLING ERROR (LSB) 4 0 3 2 1 TEMPERATURE (°C) 4.875 5.000 5.250 5.125 fIN = 10kHz fS = 62.5ksps -20 -40 -2 -3 -60 -80 -100 PGA GAIN = 16V/V fS = 150.9ksps -5 -40 -25 -10 5 20 35 50 65 80 95 110 125 1 SNR -1 -4 0 2 0 MAGNITUDE (dB) BOI ENABLED 3 DVDDIO SUPPLY VOLTAGE (V) MAXQ7670 toc35 1 MAXQ7670 toc34 5 4 0 4.750 40 4.875 MAXQ7670 toc33 MAXQ7670 toc32 120 BOI ENABLED MAXQ7670 toc36 100 140 5 DVDDIO SUPPLY CURRENT (µA) 120 160 DVDDIO SUPPLY CURRENT (µA) MAXQ7670 toc31 DVDDIO SUPPLY CURRENT (µA) 2.500 DVDDIO SUPPLY VOLTAGE (V) 140 40 4.750 200 2.375 ADC SAMPLING RATE (ksps) 160 DVDDIO SUPPLY CURRENT (µA) 100 2.250 1000 1 10 100 1000 10,000 100,000 SOURCE IMPEDANCE (Ω) -120 -140 0 5 10 15 20 25 FREQUENCY (kHz) 30 ______________________________________________________________________________________ 35 13 MAXQ7670 Typical Operating Characteristics (continued) (VDVDDIO = 5.0V, VAVDD = 3.3V, VDVDD = 2.5V, fSYSCLK = 16MHz, ADC resolution = 10 bits, VREFDAC = 3.3V, TA = +25°C, unless otherwise noted.) Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface MAXQ7670 Pin Description PIN NAME FUNCTION 1 AIN7 Analog Input Channel 7. AIN7 is multiplexed to the PGA or ADC as single-ended analog input 7 or as a differential input with AIN6. As a differential input, the polarity of AIN7 is negative. 2 AIN6 Analog Input Channel 6. AIN6 is multiplexed to the PGA or ADC as a single-ended analog input 6 or as a differential input with AIN7. As a differential input, the polarity of AIN6 is positive. 3 AIN5 Analog Input Channel 5. AIN5 is multiplexed to the PGA or ADC as single-ended analog input 5 or as a differential input with AIN4. As a differential input, the polarity of AIN5 is negative. 4 AIN4 Analog Input Channel 4. AIN4 is multiplexed to the PGA or ADC as single-ended analog input 4 or as a differential input with AIN5. As a differential input, the polarity of AIN4 is positive. 5 REFADC 6 AGND 7 AIN3 Analog Input Channel 3. AIN3 is multiplexed to the PGA or ADC as single-ended analog input 3 or as a differential input with AIN2. As a differential input, the polarity of AIN3 is negative. 8 AIN2 Analog Input Channel 2. AIN2 is multiplexed to the PGA or ADC as single-ended analog input 2 or as a differential input with AIN3. As a differential input, the polarity of AIN2 is positive. 9 AIN1 Analog Input Channel 1. AIN1 is multiplexed to the PGA or ADC as single-ended analog input 1 or as a differential input with AIN0. As a differential input, the polarity of AIN1 is negative. 10 AIN0 Analog Input Channel 0. AIN0 is multiplexed to the PGA or ADC as single-ended analog input 0 or as a differential input with AIN1. As a differential input, the polarity of AIN0 is positive. 11 I.C. Internally Connected. Connect to GNDIO for proper operation. 12 P0.0 Port 0 Bit 0. P0.0 is a general-purpose digital I/O with interrupt/wake-up capability. 13 P0.1 Port 0 Bit 1. P0.1 is a general-purpose digital I/O with interrupt/wake-up capability. 14 P0.2 Port 0 Bit 2. P0.2 is a general-purpose digital I/O with interrupt/wake-up capability. ADC External Reference Input. Connect an external reference between 1V and VAVDD. Analog Ground 15, 22, 38 GNDIO 16 CANRXD CAN Bus Receiver Input. CAN receiver input. 17 CANTXD CAN Bus Transmitter Output. CAN transmitter output. 14 Digital I/O Ground and Regulator Ground Active-Low, SPI Port Slave Select Input. In SPI slave mode, this is the slave select input. In SPI master mode, this is an input and connection is optional (connect if mode fault enable is required, refer to the MAXQ7670 User’s Guide for a description of the SPICN register). In master mode, use an available GPIO as a slave selector and pull SS high to DVDDIO through a pullup resistor. 18 SS 19 P0.6/T0 Port 0 Bit 6/Timer 0 I/O. P0.6 is a general-purpose digital I/O with interrupt/wake-up input capability. T0 is a primary timer/PWM input or output. The alternative function, T0, is selected using the T2CNA0 register. When this function is selected, it overrides the GPIO functionality. 20 P0.7/T0B Port 0 Bit 7/Timer 0 Output. P0.7 is a general-purpose digital I/O with interrupt/wake-up input capability. T0B is a secondary timer/PWM output. The alternative function, T0B, is selected using the T2CNB0 register. When this function is selected, it overrides the GPIO functionality. 21, 39 DVDDIO Digital I/O Supply Voltage and Regulator Supply Input. DVDDIO supplies all digital I/O except for XIN and XOUT, and supplies power to the two internal linear regulators, AVDD and DVDD. Bypass DVDDIO to GNDIO with a 0.1µF capacitor as close as possible to the device. ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface PIN NAME FUNCTION 23 SCLK SPI Serial Clock. SCLK is the SPI interface serial clock I/O. In SPI master mode, SCLK is an output. While in SPI slave mode, SCLK is an input. 24 MOSI SPI Serial Data I/O. MOSI is the SPI interface serial data output in master mode or serial data input in slave mode. 25 MISO SPI Serial Data I/O. MISO is the SPI interface serial data input in master mode or serial data output in slave mode. 26 REGEN2 27 TDO JTAG Serial Test Data Output. TDO is the JTAG serial test, data output. 28 TMS JTAG Test Mode Select. TMS is the JTAG test mode, select input. 29 TDI JTAG Serial Test Data Input. TDI is the JTAG serial test, data input. 30 TCK Active-Low +2.5V Linear Regulator Enable Input. Connect REGEN2 to GNDIO to enable the +2.5V linear regulator. Connect to DVDDIO to disable the +2.5V linear regulator. JTAG Serial Test Clock Input. TCK is the JTAG serial test, clock input. Port 0 Bit 4/ADC Start Conversion Control. P0.4 is a general-purpose digital I/O with interrupt/wake-up capability. ADCCNV is a firmware-configurable, rising or falling edge, start/convert signal used to trigger ADC conversions. The alternative function, ADCCNV, is selected using the register bits ACNT[2:0]. When using ADCCNV as a trigger for ADC conversion, set P0.4/ADCCNV as an input using the PD0 register. This action prevents any unintentional interference in the SARADC operation. Port 0 Bit 5. P0.5 is a general-purpose digital I/O with interrupt/wake-up capability. 31 P0.4/ ADCCNV 32 P0.5 33 RESET Reset Input/Output. Active-low input/output with internal 55kΩ pullup to DVDDIO. Drive low to reset the MAXQ7670. The MAXQ20 µC core holds RESET low during POR and during DVDD brownout conditions. 34 DGND Digital Ground 35 XOUT High-Frequency Crystal Output. Connect an external crystal to XIN and XOUT for normal operation, or leave unconnected if XIN is driven with an external clock source. Leave unconnected if an external clock source is not used. 36 XIN High-Frequency Crystal Input. Connect an external crystal or resonator to XIN and XOUT for normal operation, or drive XIN with an external clock source. Leave unconnected if an external clock source is not used. 37 DVDD Digital Supply Voltage. DVDD supplies internal digital core and flash memory. DVDD is directly connected to the output of the internal +2.5V linear regulator. Disable the internal regulator (through REGEN2) to connect an external supply. Bypass DVDD to DGND with a 0.1µF capacitor as close as possible to the device. 40 AVDD Analog Supply Voltage. AVDD supplies PGA and ADC. AVDD is directly connected to the output of the internal +3.3V linear regulator. Disable the internal regulator (via software) to connect an external supply. Bypass AVDD to AGND with a 0.1µF capacitor as close as possible to the device. — EP Exposed Pad. Connect EP to the ground plane. ______________________________________________________________________________________ 15 MAXQ7670 Pin Description (continued) Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface MAXQ7670 Block Diagram DVDDIO DVDDIO REFADC ADCCNV AIN0 AIN1 ADCBY ADCREF AIN2 AIN3 10:1 MUX AIN4 AIN5 ADCCLK PGAE 10-BIT ADC PGA AIN6 LRAPD ADCRY GAIN = 1x, 16x AIN7 ADCE AIN1 AIN3 AIN5 AIN7 AIN9 DVDDIO AVDD AVDD GNDIO 6:1 MUX VABE T0I HFFINT ADCMX[3:0] VABI EIFO AGND SPI VIOBI DVDDIO IFFCLK +2.5V LINEAR REGAULATOR DVDDIO AGND VIBE CANERI MAXQ7670 WATCHDOG TIMER AVDD BROWNOUT MONITOR CANSTI SOFTWAREINTERRUPT CONTROLLER REGEN2 +3.3V LINEAR REGAULATOR DVDDIO GNDIO DVDDIO BROWNOUT MONITOR P0.7/T0B 16-BIT TIMER0 T0CLK T0I P0.6/T0 WDI P0.5 DVDD P0.4/ADCCNV P0.2 WTR EWT P0.1 P0.0 GNDIO RESET DVDD DVDD POWER-ON RESET MONITOR DGND DVDD 4K x 16 UTILITY ROM 16-BIT MAXQ20 CORE RISC CPU 64KB (32K x 16) PROGRAM/DATA FLASH DGND TCK TDI TMS TDO I/O BUFFERS I/O BUFFERS PO0 VDPE DVDDIO PORT 0 I/O REGISTERS PD0 PI0 2KB (1K x 16) DATA RAM EIF0 JTAG INTERFACE PORT 0 I/O REGISTERS SS SCLK DVDD HF XTAL OSC. XIN XOUT DGND GNDIO GNDIO IFE DGND DGND GNDIO HFFINT XHFRY HFE INT FIXED FREQ OSC. M U X HFCLK CAN CLOCK PRESCALER CANCLK DGND ADC CLOCK PRESCALER ADCCLK SERIAL PERIPHERAL INTERFACE (SPI) SPI MOSI MISO GNDIO DVDDIO HF CLOCK PRESCALER IFFCLK 2:1 M U X SYSCLK CAN 2.0B INTERFACE CANSTI I/O BUFFERS CANERI SYSCLK TIMER CLOCK PRESCALER T0CLK CANCLK GNDIO 16 ______________________________________________________________________________________ CANTXD CANRXD Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface The MAXQ7670 incorporates a 16-bit RISC arithmetic logic unit (ALU) with a Harvard memory architecture that addresses 64KB (32K x 16) of flash and 2048 bytes (1024 x 16) of RAM memory. This core combined with digital and analog peripherals provide versatile data-acquisition functions. The peripherals include up to seven digital I/Os, a 4-wire SPI interface, a CAN 2.0B bus, a JTAG interface, a timer, an integrated RC oscillator, two linear regulators, a watchdog timer, three power-supply supervisors, a 10-bit 250ksps SAR ADC with programmable-gain amplifier (PGA) and eight single-ended or four differential multiplexed inputs. The power-efficient MAXQ20 µC core consumes less than 1mA/MIPS. Refer to the MAXQ7670 User’s Guide for more detailed information on configuring and programming the MAXQ7670. Analog Input Peripheral The integrated 10-bit ADC employs an ultra-low-power SAR-based conversion method and operates up to 250ksps with PGA = 1V/V (150.9ksps with PGA = 16V/V). The integrated 8-channel multiplexer (mux) and PGA allow the ADC to measure eight single-ended (relative to AGND) or four fully differential analog inputs with software-selectable input ranges through the PGA. See Figures 3 and 4. TIMER 0 MAXQ7670 ADCBY P0.4/ADCCNV 2 CONVERSION CONTROL AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 ACTL 1 0 ADCDUL ADCBIP PGG ADCRDY 8:1 MUX PGA 1V/V OR 16V/V 10-BIT ADC 250ksps 10 DATA BUS AGND ADCE 3 ADCMX 2 1 0 ADCASD ADC CLOCK DIV ADCCLK SOURCE REFADC 1 0 ADCCD Figure 3. Simplified Analog Input Diagram (Eight Single-Ended Inputs) ______________________________________________________________________________________ 17 MAXQ7670 Detailed Description MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface TIMER 0 MAXQ7670 ADCBY P0.4/ADCCNV 2 CONVERSION CONTROL AIN0 AIN2 AIN4 AIN6 4:1 MUX ADCDUL ADCBIP PGG ADCRDY PGA 1V/V OR 16V/V AIN1 AIN3 AIN5 AIN7 ACTL 1 0 10-BIT ADC 250ksps 10 DATA BUS 4:1 MUX ADCE ADCMX 3 2 1 0 ADCASD ADC CLOCK DIV ADCCLK SOURCE REFADC 1 0 ADCCD Figure 4. Simplified Analog Input Diagram (Four Fully Differential Inputs) 18 ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface In single-ended mode, the mux selects from either of the ground-referenced analog inputs AIN0–AIN7. In differential input configuration, analog inputs are selected from the following pairs: AIN0/AIN1, AIN2/AIN3, AIN4/AIN5, and AIN6/AIN7. Table 1 shows the singleended and differential input configurations possible for the ADC mux. Analog Input Track and Hold A SAR conversion in the MAXQ7670 has different T/H cycles depending on whether a gain of 1 (bypass) or a gain of 16 (PGA enabled) is selected. Gain = 1V/V In gain = 1V/V, the conversion has a two-stage T/H cycle. In track mode, a positive input capacitor connects to the signal channel. A negative input capacitor connects to the reference channel. After the T/H enters hold mode, the difference between the signal and the reference channel is converted to a 10-bit value. This two-stage cycle takes 16 SARCLKs to complete. Gain = 16V/V In gain = 16V/V, the conversion has a three-stage T/H cycle: amplification, ADC track, and ADC hold. First, the PGA tracks the selected input and reference signals. The PGA amplifies the difference between the two signals and holds the result for the next stage, ADC track. The ADC tracks and converts the PGA result into a 10-bit value. The SAR operation itself does not change irrespective of the chosen gain. This threestage cycle takes 26.5 SARCLKs to complete. Figure 5 shows the conversion timing differences between gain = 1V/V and gain = 16V/V. Table 1. ADC Mux Input Configurations SAR CHANNEL SELECT (REGISTER ACNT[14:11]) SIGNAL CHANNEL INTO ADC REFERENCE CHANNEL INTO ADC 0000 AIN0 AGND Single-ended measurement on AIN0 0001 AIN1 AGND Single-ended measurement on AIN1 0010 AIN2 AGND Single-ended measurement on AIN2 0011 AIN3 AGND Single-ended measurement on AIN3 0100 AIN4 AGND Single-ended measurement on AIN4 0101 AIN5 AGND Single-ended measurement on AIN5 0110 AIN6 AGND Single-ended measurement on AIN6 0111 AIN7 AGND Single-ended measurement on AIN7 1000 — — 1001 — — Reserved 1010 AIN0 AIN1 AIN0/AIN1 1011 AIN2 AIN3 AIN2/AIN3 1100 AIN4 AIN5 AIN4/AIN5 1101 AIN6 AIN7 AIN6/AIN7 1110 — — Reserved 1111 — — VCIM differential zero offset trim MEASUREMENT TYPE Reserved ______________________________________________________________________________________ 19 MAXQ7670 The MAXQ7670 ADC uses a fully differential SAR conversion technique and an integrated T/H (track and hold) block to convert voltage signals into a 10-bit digital result. Both single-ended and differential configurations are implemented using an analog input channel multiplexer that supports 8 single-ended or 4 differential channels. MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface SAR CYCLE PGA = 1V/V SAR CYCLE PGA = 16V/V 3 SCLK 13 SCLK SAR TRACK HOLD AND SAR CONVERT 7.5 SCLK 6 SCLK PGA TRACK PGA HOLD, SAR TRACK 13 SCLK HOLD AND SAR CONVERT Figure 5. Conversion Timing Differences Between Gain = 1V/V and Gain = 16V/V Input Impedance The input-capacitance charging rate determines the time required for the T/H to acquire an input signal. The required acquisition time lengthens with the increase of the input signals source resistance. Any source below 5kΩ does not significantly affect the ADC’s performance. A high-impedance source can be accommodated by placing a 1µF capacitor between the input channel and AGND. The combination of analog-input source impedance and the capacitance at the analog input creates an RC filter that limits the analog-input bandwidth. Controlling ADC Conversions Use the following methods to control the ADC conversion timing: 1) Software register bit control 2) Continuous conversion 3) Internal timer (T0) 4) External input through ADCCNV Refer to the MAXQ7670 User’s Guide for more detailed information on the ADC and mux. POR and Brownout The MAXQ7670 operates from a single, external +5V supply connected to the DVDDIO. DVDDIO is the supply rail for the digital I/O and the supply input for both integrated linear regulators. The +3.3V linear regulator powers AVDD, while the +2.5V linear regulator powers DVDD. Alternatively, connect REGEN2 to DVDDIO and apply external power supplies to AVDD and DVDD. Power supplies DVDDIO, DVDD, and AVDD each include a brownout monitor that alerts the µC through an interrupt when the corresponding supply voltages drop below a defined threshold. This condition is generally referred to as brownout interrupt (BOI). Enable BOI by setting the VABE, VDBE, and VIBE bits in the 20 APE register. By continually checking for low supply voltages, appropriate action can be taken for brownout conditions. Startup Using Internal Regulators Once the +5V DVDDIO supply reaches approximately 1.25V, the +2.5V linear regulator turns on and DVDD begins ramping. Between the DVDD levels of 1V and the reset threshold, the DVDD monitor holds RESET low. DVDD releases RESET after reaching the reset threshold. The MAXQ7670 jumps to the reset vector location (8000h in the utility ROM). During this time, DVDD finishes ramping to its nominal voltage of +2.5V. During this POR time, the software-enabled +3.3V linear regulator remains off. Turn on the +3.3V linear regulator after the MAXQ7670 has completed its bootup routines and is running application code. To turn on the +3.3V regulator, set the LRAPD bit in the APE register to 0. The AVDD supply begins ramping to its nominal voltage of +3.3V. Brownout Detectors The MAXQ7670 features brownout monitors for the +5V DVDDIO, +3.3V AVDD, and +2.5V DVDD power supplies. When enabled, these monitors generate interrupts when DVDDIO, AVDD, or DVDD fall below their respective brownout thresholds. Monitoring the supply rails alerts the µC to brownout conditions so appropriate action can be taken. Under normal conditions the DVDDIO brownout monitor signals a falling +5V supply before the DVDD or AVDD brownout monitors indicate that the +2.5V or +3.3V are falling. The exceptions to this condition are: • If either DVDD or AVDD are externally powered and the source of power is removed • If there is some type of device failure that pulls the regulator outputs low without affecting the +5V DVDDIO supply ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface Internal 3.3V Linear Regulator The integrated 3.3V 50mA linear regulator or an external 3.3V supply powers AVDD. The integrated 3.3V regulator is inactive upon power-up. Enable the integrated regulator with software programming after power-up. When using an external supply, connect a regulated 3.3V supply to AVDD after applying DVDDIO. Internal 2.5V Linear Regulator The integrated 2.5V 50mA linear regulator or an external 2.5V supply applied at DVDD powers DVDD. Connect REGEN2 to GNDIO to enable the integrated regulator. Connect REGEN2 to DVDDIO to use an external supply. When using an external supply, connect a regulated 2.5V supply to DVDD after applying DVDDIO. DVDDIO Current Requirements Both internal linear regulators are capable of supplying up to 50mA each. When using the regulators to power AVDD and DVDD and to provide power to external devices, make sure DVDDIO’s power input can source a current greater than the sum of the MAXQ7670 supply current and the load currents of the two regulators. NOMINAL DVDD (+2.5V) +2.38V +2.25V BROWNOUT INTERRUPT (BOI) DVDD BROWNOUT INTERRUPT THRESHOLD RANGE BROWNOUT RESET (BOR) INTERNAL RESET BOR STATE RESET OUTPUT DGND DVLVL FLAG (ASR[14]) VDBE BIT SET BY µC DVBI FLAG (ASR[4]) FLAG ARBITRARILY CLEARED BY µC Figure 6. DVDD Brownout and Reset Behavior ______________________________________________________________________________________ 21 MAXQ7670 The DVDD reset supervisor resets the MAXQ7670 when the +2.5V DVDD falls below the reset threshold. The processor remains in reset until DVDD returns above the reset threshold. The µC does not execute commands in reset mode. See Figure 6 for the µC response to DVDD brownout and reset. Refer to the MAXQ7670 User’s Guide for detailed programming information, and a more thorough description of POR and brownout behavior. MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface System Clock Generator The MAXQ7670 oscillator module provides the master clock generator that supplies the system clock for the µC core and all of the peripheral modules. The high-frequency oscillator operates with an 8MHz or 16MHz crystal. Alternatively, use the integrated RC oscillator in applications that do not require precise timing. The MAXQ7670 executes most instructions in a single SYSCLK period. The oscillator module contains all of the primary clock generation circuitry. Figure 7 shows a block diagram of the system clock module. The MAXQ7670 contains the following features for generating its master clock signal timing source: • Internal, fast-starting, 15MHz RC oscillator eliminates external crystal • Internal high-frequency oscillator that can drive an external 8MHz or 16MHz crystal • External high-frequency 0.166MHz to 16MHz clock input • Power-up timer • Power-saving management modes • Fail-safe modes Watchdog Timer The primary function of the watchdog timer is to supervise software execution, watching for stalled or stuck software. The watchdog timer performs a controlled system restart when the µC fails to write to the watchdog timer register before a selectable timeout interval expires. A watchdog timer typically has four objectives: 1) To detect if a system is operating normally 2) To detect an infinite loop in any of the tasks 3) To detect an arbitration deadlock involving two or more tasks 4) To detect if some lower priority tasks are not getting to run because of higher priority tasks As illustrated in Figure 8, the internal RC oscillator (CLK_RC) drives the watchdog timer through a series of dividers. The programmable divider output determines the timeout interval. When enabled, the interrupt flag WDIF sets. A system reset occurs after a time delay (based on the divider ratio) unless an interrupt service routine clears the watchdog interrupt. The watchdog timer functions as the source of both the watchdog interrupt and the watchdog reset. The interrupt timeout has a default divide ratio of 2 12 of the CLK_RC, with the watchdog reset set to timeout 2 9 clock cycles later. With the nominal RC oscillator value of 15MHz, an interrupt timeout occurs every 0.273ms, followed by a watchdog reset 34µs later. The watchdog timer resets to the default divide ratio following any reset event. Use the WD0 and WD1 bits in the WDCN register to increase the watchdog interrupt period. Changing the WD[1:0] bits before a watchdog interrupt timeout occurs (i.e. before the watchdog reset counter begins) resets the watchdog timer count. The watchdog reset timeout occurs 512 RC oscillator cycles after the watchdog interrupt timeout. For more information on the MAXQ7670 watchdog timer, refer to the MAXQ7670 User’s Guide. CLK_RC (15MHz) DIV 212 DIV 23 DIV 23 DIV 23 HFE XIN HF XTAL OSC XOUT RCE XT EXTHF WD1 WD0 RWT CLOCK DIVIDE MUX SYSCLK 212 215 218 221 TIME TIMEOUT WDIF RC OSC CD1 CD0 PMME INTERRUPT EWDI CLK_RC RESET RESET EWT Figure 7. High-Frequency and RC Oscillator Functional Diagram 22 WTRF Figure 8. Watchdog Functional Diagram ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface • • • • • Up/down autoreload Counter function of external pulse Capture Compare PWM output • Event timer • System supervisor Refer to the MAXQ7670 User’s Guide and Application Note 3205: Using Timers in the MAXQ Family of Microcontrollers for more information about the timer module. CAN Interface Bus The MAXQ7670 incorporates a fully compliant CAN 2.0B controller. Two groups of registers provide the µC interface to the CAN controller. To simplify the software associated with the operation of the CAN controllers, most of the global CAN status and controls as well as the individual message center control/status registers are located in the peripheral register map. The remaining registers associated with the data identification, identification masks, format, and data are located in a dual port memory to allow the CAN controller and the processor access to the required functions. The CAN controller can directly access the dual port memory. The processor accesses the dual port memory through a dedicated interface that consists of the CAN 0 data pointer (C0DP) and the CAN 0 data buffer (C0DB) special function registers. See Figure 9 for CAN controller details. CAN Functional Description The CAN module stores up to 15 messages. Each message consists of an acceptance identifier and 8 bytes of data. The MAXQ7670 supports both the standard 11bit and extended 29-bit identification modes. Configure each of the first 14 message centers either to transmit or receive. Message center 15 is a receiveonly center, storing any message that centers 1–14 do not accept. A message center only accepts an incoming message if the following conditions are satisfied: • The incoming message’s arbitration value matches the message center’s acceptance identifier • The first 2 data bytes of the incoming message match the bytes in the media arbitration registers (C0MA0 and C0MA1) Use the global mask registers to mask out bits in the incoming message that do not require a comparison. A message center, configured to transmit, meets these conditions: T/R = 1, TIH = 0, DTUP = 1, MSRDY = 1, and MTRQ = 1. The message center transmits its contents when it receives an incoming request message containing the same identifier (i.e., a remote frame). Global control and status registers in the CAN unit enable the µC to evaluate error messages, validate and locate new data, establish the bus timing for the CAN bus, establish the identification mask bits, and verify the source of individual messages. In addition, each message center is individually equipped with the necessary status and controls to establish directions, interrupt generation, identification mode (standard or extended), data field size, data status, automatic remote frame request and acknowledgment, and masked or nonmasked identification acceptance testing. JTAG Interface Bus The joint test action group (JTAG) IEEE® 1149.1 standard defines a unique method for in-circuit testing and programming. The MAXQ7670 conforms to this standard, implementing an external test access port (TAP) and internal TAP controller for communication with a JTAG bus master, such as an automatic test equipment (ATE). For detailed information on the TAP and TAP controller, refer to IEEE Standard 1149.1 on the IEEE website at www.standards.ieee.org. The JTAG on the MAXQ7670 does not support boundary scan test capability. IEEE is a registered service mark of the Institute of Electrical and Electronics Engineers. ______________________________________________________________________________________ 23 MAXQ7670 Timer and PWM The MAXQ7670 includes a 16-bit timer channel. The timer offers two ports, T0 and T0B, to facilitate PWM outputs, and capture timing events. The autoreload 16bit timer/counter offers the following functions: • 8-/16-bit timer/counter MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface CAN 0 CONTROLLER BLOCK DIAGRAM DUAL PORT MEMORY CAN PROCESSOR BUS ACTIVITY WAKE-UP MESSAGE CENTERS 1–15 MESSAGE CENTER 1 8-BIT Rx ARBITRATION 0–3 CRC CHECK BIT DESTUFF Rx SHIFT BIT TIMING CANRXD Tx SHIFT CANTXD DATA 0–7 FORMAT 8-BIT Tx CRC GENERATE BIT STUFF MESSAGE CENTER 2 ARBITRATION 0–3 CAN PROTOCOL FSM DATA 0–7 FORMAT CAN INTERRUPT SOURCES MESSAGE CENTER 14 ARBITRATION 0–3 DATA 0–7 FORMAT CAN 0 PERIPHERAL REGISTERS CAN 0 TRANSMIT ERROR COUNTER MESSAGE CENTER 15 ARBITRATION 0–3 DATA 0–7 FORMAT CAN 0 CONTROL REGISTER CAN 0 OPERATION CONTROL CAN 0 RECEIVE ERROR COUNTER CAN 0 STATUS REGISTER CONTROL/STATUS/MASK REGISTERS MEDIA ID MASK 0–1 STD GLOBAL MASK 0–1 CAN 0 MESSAGE 1–15 CONTROL REGISTERS MEDIA ARBITRATION 0–1 EXT GLOBAL MASK 0–3 CAN 0 DATA POINTER CAN 0 TRANSMIT MSG ACK BUS TIMING 0–1 MSG15 MASK 0–3 CAN 0 DATA BUFFER CAN 0 RECEIVE MSG ACK CAN 0 INTERRUPT REGISTER MAXQ7670 Figure 9. CAN 0 Controller Block Diagram The TAP controller communicates synchronously with the host system (bus master) through four digital I/Os: test mode select (TMS), test clock (TCK), test data input (TDI), and test data output (TDO). The internal TAP module consists of several shift registers and a TAP controller (see Figure 11). The shift registers serve as transmit-and-receive data buffers for a debugger. 24 4-Wire SPI Bus The MAXQ7670 includes a powerful hardware SPI module, providing serial communication with a wide variety of external devices. The SPI port on the MAXQ7670 is a fully independent module that is accessed through software. This full 4-wire, full-duplex serial bus module supports master and slave modes. The SPI clock ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface General-Purpose Digital I/Os The MAXQ7670 provides seven general-purpose digital I/Os (GPIOs). Some of the GPIOs include an additional special function (SF), such as a timer input/output. For example, the state of P0.6/T0 is programmable to depend on timer channel 0 logic. When used as a port, each I/O is configurable for high-impedance, weak pullup to DVDDIO or pulldown to GNDIO. At power-up, each GPIO is configured as an input with a pullup to DVDDIO. In addition, each GPIO can be programmed to cause an interrupt (on falling or rising edges). In stop mode, use any interrupt to wake-up the device. The port direction (PD) register determines the input/output direction of each I/O. The port output (PO) register contains the current state of the logic output buffers. When an I/O is configured as an output, writing to the PO register controls the output logic state. Reading the PO register shows the current state of the output buffers, independent of the data direction. The port input (PI) register is a read-only register that always reflects the logic state of the I/Os. DVDDIO MAXQ7670 MASTER SLAVE LSB(0) MSB (15) MISO MASTER SHIFT REGISTER SLAVE MOSI SFR DATA BUS READ BUFFER DVDDIO SHIFT CLK SS MASTER SCLK OUT SLAVE SCLK IN SCLK MASTER/SLAVE SELECT SPI INTERRUPT SPI CONTROL UNIT SPI ENABLE SPI CONTRL REG (SPICN) SPI CONTRL REG (SPICF) SYSCLK /2 MASTER (MAX) /8 SLAVE (MAX) SPI CONTRL REG (SPICK) 7 0 Figure 10. SPI Functional Diagram ______________________________________________________________________________________ 25 MAXQ7670 frequency is limited to SYSCLK/2 in master mode and SYSCLK/8 in slave mode. Figure 10 shows the functional diagram of the SPI port. Figures 1 and 2 illustrate the timing parameters listed in the Electrical Characteristics table. MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface The drive capability of the I/O, when configured for output, depends on the value in the PS0 (pad drive strength) register and can be set for either 1mA or 2mA. When an I/O is configured as an input, writing to the PO register enables/disables the pullup/pulldown resistor. The value in the PRO (pad resistive pull direction) register sets the enabled resistor at the I/O as either a pullup to DVDDIO or pulldown to GNDIO. Refer to the MAXQ7670 User’s Guide for more detailed information. Port Characteristics The MAXQ7670 includes a bidirectional 7-bit I/O port (P0) whose features include: • Schmitt trigger input circuitry with software-selectable high-impedance or weak pullup to DVDDIO or pulldown to GNDIO • Software-selectable push-pull CMOS output drivers capable of sinking and sourcing 0.5mA • Falling or rising edge interrupt capability • P0.4, P0.6, and P0.7 I/Os contain an additional special function, such as a logic input/output for a timer channel • Selectable pad drive strength and resistive pull direction Refer to the MAXQ7670 User’s Guide for more details. Figure 11 illustrates the functional blocks of an I/O. VDVDDIO P MAXQ7670 MAXQ20 Core Architecture The MAXQ7670’s core is a member of the low-cost, high-performance, CMOS, fully static, 16-bit MAXQ20 core µCs. The MAXQ7670 is structured on a highly advanced, accumulator-based, 16-bit RISC architecture. Fetch and execution operations complete in one cycle without pipelining because the instruction contains both the op code and data. The result is a streamlined 1 million instructions-per-second-per-megahertz (MIPS/MHz) µC. The highly efficient core is supported by a 16-level hardware stack, enabling fast subroutine calling and task switching. The internal data pointers manipulate data quickly and efficiently. Multiple data pointers allow more than one function to access data memory without having to save and restore data pointers each time. The data pointers can automatically increment or decrement following an operation, eliminating the need for software intervention and increasing application speed. Instruction Set The instruction set is composed of fixed-length, 16-bit instructions that operate on registers and memory locations. The highly orthogonal instruction set allows arithmetic and logical operations to use any register along with the accumulator. Special-function registers (also called peripheral registers) control the peripherals and are subdivided into register modules. The modular family architecture allows new devices and modules to reuse code developed for existing products. The architecture is transport-triggered. This means that writes or reads from certain register locations can also cause side effects to occur. These side effects form the basis for the higher-level op codes defined by the assembler, such as ADDC, OR, JUMP, etc. Memory Organization PI0._ PR0._ PD0._ PO0._ PULLUP/ PULLDOWN LOGIC PS0._ PO0._ PD0._ Figure 11. Digital I/O Circuitry 26 N P0._ The MAXQ7670 incorporates the following memory areas (see Figure 12): • 8KB (4K x 16) utility ROM • 64KB (32K x 16) of flash memory for program storage • 2048 bytes (1024 x 16) of SRAM for storage of temporary variables • 16-level stack memory for storage of program return addresses and general-purpose use A 16-bit-wide x 16 deep internal hardware stack provides storage for program return addresses and general-purpose use. The MAXQ7670 core implicitly uses the stack when executing an interrupt service routine (ISR) and also when running CALL, RET, and RETI instructions. The stack can also be explicitly used by the ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface Enabling a pseudo-Von Neumann memory map places the utility ROM, code, and data memory into a single contiguous memory map. Use this mapping scheme for applications that require dynamic program modification or unique memory configurations. PAGE 127 PAGE 126 7FFFh PAGE 125 32K x 16 PROGRAM FLASH PAGE 2 0000h PAGE 1 PAGE 0 1 PAGE = 256 WORDS Figure 13. Flash Memory Sector Maps PROGRAM SPACE DATA SPACE (WORD MODE) DATA SPACE (BYTE MODE) FFFFh FFFFh A000h 9000h 9000h 8FFFh 8FFFh FFFFh A400h A3FFh 1024 x 16 DATA RAM 4K x 16 UTILITY ROM 4K x 16 UTILITY ROM 8FFFh 8K x 8 UTILITY ROM 8000h 8000h 8000h 7FFFh 7FFFh 7FFFh 0400h 0400h 32K x 16 PROGRAM FLASH EXECUTING FROM 03FFh 03FFh 1024 x 16 DATA RAM 0000h 2048 x 8 DATA RAM 0000h 0000h Figure 12. MAXQ7670 Memory Map ______________________________________________________________________________________ 27 MAXQ7670 application code to store data when context switching (e.g., during a call or an interrupt). Storing and retrieving data is executed through the PUSH, POP, and POPI instructions. The incorporation of flash memory allows device reprogramming, eliminating the expense of discarding onetime programmable devices during development and field upgrades (see Figure 13 for the flash memory sector maps). A 16-word key protects the flash memory from access by unauthorized individuals. Without supplying the 16word key, the password lock (PWL) bit in the SC register remains set, and the utility ROM is inaccessible. Supplying the 16-word key makes the utility ROM transparent. The password-unlock command is issued through the TAP interface. The 16-word password is compared to the password in the program space to determine its validity. MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface Stack Memory A 16-bit-wide x 16 deep internal hardware stack provides storage for program return addresses and general-purpose use. The processor uses the stack automatically when executing the CALL, RET, and RETI instructions and when servicing interrupts. The stack stores and retrieves data through the PUSH, POP, and POPI instructions. On reset, the stack pointer, SP, initializes to the top of the stack (0Fh). The CALL, PUSH, and interrupt-vectoring operations increment SP, then store a value at the location pointed to by SP. The RET, RETI, POP, and POPI operations retrieve the value at SP and then decrement SP. Utility ROM The utility ROM is a 8KB (4K x 16) block of internal ROM memory that defaults to a starting address of 8000h. The utility ROM consists of subroutines accessed from application software. These include: • In-system programming (bootstrap loader) over JTAG and CAN • In-circuit debug routines • Routines for in-application flash programming and fast table lookup Following any reset, execution begins in the utility ROM. The ROM software determines whether the program execution should immediately jump to location 0000h, the start of user-application code, or to one of the above routines. Utility ROM routines are accessible in the application software. For more information on the utility ROM contents, refer to the MAXQ7670 User’s Guide. Programming Flash Memory The MAXQ7670 allows the user to program its flash through the JTAG or the CAN port by allowing access to the ROM-based bootloader through these ports. The bootloader is entered in one of three ways: by a JTAG request during the power-up sequence, through a CAN request immediately after power-up when no password has been set, and by jumping to the bootloader from the application code. After a reset, the MAXQ7670 instruction pointer jumps to the beginning of ROM code (0x8000). The ROM code does some initial housekeeping and then looks for a request from the JTAG port. If there is a valid request (i.e., SPE = 1, PSS = 00), the processor establishes communication between the ROM bootloader and the JTAG port. If there is no JTAG request and the password has been set (0x0010 to 0x001F is not all 0s or all Fs), then program execution 28 jumps to the application code at address 0x0000. If the password has not been set (0x0010 to 0x001F is all 0s or all Fs), the ROM code monitors the CAN port for 5s waiting to receive 0x3E. If this character is not detected within 5s, program execution jumps to the application code at address 0x000. If 0x3E is detected during the five-second window, the CAN port is established as the bootloader communication port and the MAXQ7670 responds with 0x3E, verifying that it is in the loader mode. CAN bootloader communication speed is set to 500kbaud when using a 16MHz crystal and 250kbaud when using an 8MHz crystal. Once communication has been established with the loader, the host has access to all the family 0 commands regardless of the state of the PWL bit. If PWL = 0, all the loader commands are accessible. Family 0 commands all start with a 0 and provide basic functionality, but do not allow access to information in either program memory or data memory. This prevents unauthorized access of proprietary information. A mass erase of the flash sets all flash memory including the password to 0xFFFF. With this condition, it is as if no password has been set and the PWL bit is set to 0, which allows access to all loader commands. For more information on password protection and loader commands, refer to the MAXQ7670 User’s Guide. In-Application Programming The in-application programming feature allows the µC to modify its own flash program memory while simultaneously executing its application software. This allows on-the-fly software updates in mission-critical applications that cannot afford downtime. In-application programming also allows the application to develop custom loader software that can operate under the control of the application software. The utility ROM contains user-accessible flash programming functions that erase and program flash memory. These functions are described in detail in the MAXQ7670 User’s Guide. Register Set Register sets control the MAXQ7670 functions. These registers provide a working space for memory operations as well as configuring and addressing peripheral registers on the device. Registers are divided into two major types: system registers and peripheral registers. The common register set, also known as the system registers, includes the ALU, accumulator registers, data pointers, interrupt vectors and control, and stack pointer. Tables 2–5 show the MAXQ7670 register set. ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface Advanced power-management features minimize power consumption by dynamically matching the processing speed of the device to the required performance level. During periods of reduced activity, lower the system clock speed to reduce power consumption. Use the source-clock-divide feature to reduce the system clock speed to 1/2, 1/4, and 1/8 of the source clock’s speed. A lower power state is thus achievable without additional hardware. For extremely power-sensitive applications, two additional low-power modes are available: • PMM: divide-by-256 power-management mode (PMME = 1) • Stop mode (STOP = 1) Enabling PMM reduces the system clock speed to 1/256 of the source clock speed, and significantly reduces power consumption. The optional switchback feature allows enabled interrupt sources including external, CAN, and SPI interrupts to bring the µC out of the power-management mode and to run at a faster system clock speed. Power consumption is minimal in stop mode. In this mode, the external oscillator, internal RC oscillator, system clock, and all processing activity stop. Triggering an enabled external interrupt or applying an external reset signal to RESET brings the µC out of stop mode. Upon exiting stop mode, the µC can either wait for the external crystal to warm up, or execute immediately by using the internal RC oscillator as the crystal warms up. Interrupts Multiple interrupt sources are available for quick response to internal and external events. Examples of events that can trigger an interrupt are: • Watchdog interrupt • GPIO0–GPIO7 interrupts • SPI mode fault, write collision, receive overrun, and transfer complete interrupts • Timer 0 low compare, low overflow, capture/compare, and overflow interrupts • CAN0 receive and transmit interrupts and a change in CAN0 status register interrupt • ADC data ready interrupt • Voltage brownout interrupts • Crystal oscillator failure interrupt Each interrupt has flag and enable bits. The flag indicates whether an interrupt event has occurred. Enable the µC to generate an interrupt by setting the enable bit. Interrupts are organized into modules. Enable the interrupt individually, by module, and globally. The µC jumps to an ISR after an enabled interrupt event occurs. Use the interrupt identification register (IIR) to determine whether the interrupt is a system or peripheral interrupt. In the ISR, clear the interrupt flag to eliminate repeated interrupts from the same event. After clearing the interrupt, allow a delay before issuing the return from interrupt (RETI) instruction. Asynchronous interrupt flags require a one-instruction delay and synchronous interrupt flags require a two-instruction delay. The MAXQ architecture uses a single interrupt vector (IV) and single ISR design. The IV register holds the address of the ISR. In the application code, assign a unique address to each ISR. Otherwise, the IV automatically jumps to 0000h, the beginning of application code, after an enabled interrupt occurs. Reset Sources Reset sources are provided for µC control. Although code execution stops in the reset state, the internal RC oscillator continues to oscillate. Internal resets, such as the power-on and watchdog resets, pull RESET low. Power-On Reset (POR) An internal POR circuit enhances system reliability. The POR circuit forces the device to perform a POR whenever a rising voltage on DVDD climbs above the POR threshold. At this point the following events occur: • All registers and circuits enter the default state • The POR flag (WDCN.7) sets to indicate if the source of the reset was a loss of power • The internal 15MHz RC oscillator becomes the clock source • Code execution begins at location 8000h Refer to the MAXQ7670 User’s Guide for more information. Watchdog Timer Reset The watchdog timer functions are described in the MAXQ7670 User’s Guide. Execution resumes at location 8000h following a watchdog timer reset. External System Reset Pulling RESET low externally causes the device to enter the reset state. The external reset functions as described in the MAXQ7670 User’s Guide. Execution resumes at location 8000h after RESET is released. ______________________________________________________________________________________ 29 MAXQ7670 Power Management MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface Crystal Selection The MAXQ7670 uses an 8MHz or 16MHz Jauch JXG53P2 (or similar specification): Frequency: 8MHz or 16MHz ±0.25%. CLOAD: 12pF. CO: < 7pF max. Series resonance resistance: max 50Ω/300Ω for 16MHz/8MHz, respectively. Note: Series resonance resistance is the resistance observed when the resonator is in the series resonant condition. This is a parameter often stated by quartz crystal vendors and is called R1. When a resonator is used in the parallel resonant mode with an external load capacitance, as is the case with the MAXQ7670 oscillator circuit, the effective resistance is sometimes stated. This effective resistance at the loaded frequency of oscillation is: R1 x (1 + (CO/CLOAD))2 For typical CO and CLOAD values, the effective resistance can be greater than R1 by a factor of two. Development and Technical Support Highly versatile, affordably priced development tools for this µC are available from Maxim and third-party suppliers. Tools for the MAXQ7670 include: • Compilers • Evaluation kits • JTAG-to-serial converters for programming and debugging A list of development tool vendors can be found at www.maxim-ic.com/microcontrollers. For technical support, go to www.maxim-ic.com/support. Table 2. System Register Map REGISTER INDEX 30 MODULE NAME (BASE SPECIFIER) AP (8h) A (9h) PFX (Bh) 0h AP A[0] PFX[0] 1h APC A[1] PFX[1] 2h — A[2] PFX[2] 3h — A[3] 4h PSF A[4] 5h IC 6h 7h IP (Ch) SP (Dh) DPC (Eh) DP (Fh) IP — — — — SP — — — IV — — PFX[3] — — OFFS DP0 PFX[4] — — DPC — A[5] PFX[5] — — GR — IMR A[6] PFX[6] — LC0 GRL — — A[7] PFX[7] — LC1 BP DP1 8h SC A[8] — — GRS — 9h — A[9] — — — GRH — Ah — A[10] — — — GRXL — Bh IIR A[11] — — — FP — Ch — A[12] — — — — — Dh — A[13] — — — — — Eh CKCN A[14] — — — — — Fh WDCN A[15] — — — — — ______________________________________________________________________________________ Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface REGISTER 15 14 13 12 11 10 9 AP APC PSF IC IMR SC IIR CKCN WDCN A[n] (0..15) PFX[n] (0..15) IP SP IV LC[0] LC[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 — 0 0 — 0 0 — 0 0 — 0 0 — 0 0 — 0 0 — 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 — 0 GR.15 0 — 0 GR.14 0 — 0 GR.13 0 — 0 GR.12 0 — 0 GR.11 0 — 0 GR.10 0 — 0 GR.9 0 0 GR.7 0 0 GR.6 0 0 GR.5 0 0 GR.4 0 0 GR.3 0 0 GR.2 0 0 GR.1 0 GR.7 0 GR.7 0 GR.7 0 GR.7 0 GR.7 0 GR.7 0 GR.7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 OFFS DPC GR GRL BP GRS GRH GRXL FP DP[0] DP[1] REGISTER BIT 8 7 6 — — 0 0 CLR IDS 0 0 Z S 1 0 — — 0 0 IMS — 0 0 TAP — 1 0 IIS — 0 0 XT — s* 0 POR EWDI s* s* A[n] (16 Bits) 0 0 0 PFX[n] (16 Bits) 0 0 0 IP (16 Bits) 0 0 0 — — — 0 0 0 IV (16 Bits) 0 0 0 LC[0] (16 Bits) 0 0 0 LC[1] (16 Bits) 0 0 0 0 0 — — 0 0 GR.7 GR.6 0 0 GR.7 GR.6 0 0 BP (16 Bits) 0 0 0 GR.0 GR.15 GR.14 0 0 0 GR.15 GR.14 0 0 GR.7 GR.7 GR.6 0 0 0 FP (16 Bits) 0 0 0 DP[0] (16 Bits) 0 0 0 DP[1] (16 Bits) 0 0 0 — 0 GR.8 0 5 — 0 — 0 — 0 CGDS 0 IM5 0 CDA1 0 II5 0 RGMD s* WD1 0 4 — 0 — 0 GPF1 0 — 0 IM4 0 CDA0 0 II4 0 STOP 0 WD0 0 0 — 0 GPF0 0 — 0 IM3 0 UPA 0 II3 0 SWB 0 WDIF 0 0 0 0 0 0 0 0 0 0 0 0 0 0 — 0 0 — 0 0 0 1 0 0 SP (4 Bits) 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 3 2 1 AP (4 Bits) 0 0 MOD2 MOD1 0 0 OV C 0 0 — INS 0 0 IM2 IM1 0 0 ROD PWL 0 s* II2 II1 0 0 PMME CD1 0 0 WTRF EWT s* s* 0 0 MOD0 0 E 0 IGE 0 IM0 0 — 0 II0 0 CD0 1 RWT 0 1 0 0 0 0 — 0 GR.5 0 GR.5 0 0 0 OFFS (8 Bits) 0 0 WBS2 WBS1 1 1 GR.4 GR.3 0 0 GR.4 GR.3 0 0 0 WBS0 1 GR.2 0 GR.2 0 0 SDPS1 0 GR.1 0 GR.1 0 0 SDPS0 0 GR.0 0 GR.0 0 0 GR.13 0 GR.13 0 GR.5 0 0 GR.12 0 GR.12 0 GR.4 0 0 GR.11 0 GR.11 0 GR.3 0 0 GR.10 0 GR.10 0 GR.2 0 0 GR.9 0 GR.9 0 GR.1 0 0 GR.8 0 GR.8 0 GR.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 *Bits indicated by an "s" are only affected by a POR and not by other forms of reset. These bits are set to 0 after a POR. Refer to the MAXQ7670 User’s Guide for more information. ______________________________________________________________________________________ 31 MAXQ7670 Table 3. System Register Bit and Reset Values MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface Table 4. Peripheral Register Map 32 REGISTER INDEX M0 (0h) 0h 1h M1 (1h) M2 (2h) M3 (3h) M4 (4h) PO0 — — — 2h — 3h EIFO 4h — M5 (5h) T2CNA0 — C0C — T2HO — C0S APE — T2RHO — COIR ACNTL — T2CHO — C0TE — — — — C0RE — 5h — — — — C0R — 6h — SPIB — — C0DP — 7h — SPICN — — C0DB — 8h PI0 SPICF T2CNBO — C0RMS ADCD 9h — SPICK T2VO — C0TMA — Ah — FCNTL T2RO — — AIE Bh EIEO — T2CO — — ASR Ch — — — — — OSCC Dh — — — — — — Eh — — — — — — Fh — — — — — — 10h PD0 — T2CFG0 — — — 11h — FPCTL — — C0M1C — 12h — — — — C0M2C — 13h EIESO — — — C0M3C — 14h — — — — C0M4C — 15h — — — — C0M5C — 16h — — — — C0M6C — 17h — — — — C0M7C — 18h PS0 — ICDT0 — C0M8C — — 19h — — ICDT1 — C0M9C 1Ah — — ICDC — C0M10C — 1Bh PRO — ICDF — C0M11C — 1Ch — ID0 ICDB — C0M12C — 1Dh — — ICDA — C0M13C — 1Eh — — ICDD — C0M14C — 1Fh — — TM — C0M15C — ______________________________________________________________________________________ ______________________________________________________________________________________ 33 ICDD ICDA ICDB ICDF ICDC ICDT1 ICDT0 T2CFG0 T2C0 T2R0 T2V0 T2CNB0 T2CH0 T2RH0 T2H0 T2CNA0 ID0 FPCTL FCNTL SPICK SPICF SPICN SPIB PR0 PS0 EIES0 PD0 EIE0 PI0 EIF0 PO0 REGISTER 15 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 SPIB.15 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 T2V0.15 0 T2R0.15 0 T2C0.15 0 — 0 ICDT0.15 DB ICDT1.15 DB — 0 — 0 — 0 ICDA.15 0 ICDD.15 0 14 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 SPIB.14 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 T2V0.14 0 T2R0.14 0 T2C0.14 0 — 0 ICDT0.14 DB ICDT1.14 DB — 0 — 0 — 0 ICDA.14 0 ICDD.14 0 13 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 SPIB.13 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 T2V0.13 0 T2R0.13 0 T2C0.13 0 — 0 ICDT0.13 DB ICDT1.13 DB — 0 — 0 — 0 ICDA.13 0 ICDD.13 0 12 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 SPIB.12 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 T2V0.12 0 T2R0.12 0 T2C0.12 0 — 0 ICDT0.12 DB ICDT1.12 DB — 0 — 0 — 0 ICDA.12 0 ICDD.12 0 11 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 SPIB.11 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 T2V0.11 0 T2R0.11 0 T2C0.11 0 — 0 ICDT0.11 DB ICDT1.11 DB — 0 — 0 — 0 ICDA.11 0 ICDD.11 0 10 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 SPIB.10 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 T2V0.10 0 T2R0.10 0 T2C0.10 0 — 0 ICDT0.10 DB ICDT1.10 DB — 0 — 0 — 0 ICDA.10 0 ICDD.10 0 9 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 SPIB.9 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 T2V0.9 0 T2R0.9 0 T2C0.9 0 — 0 ICDT0.9 DB ICDT1.9 DB — 0 — 0 — 0 ICDA.9 0 ICDD.9 0 REGISTER BIT 8 7 — PO0.7 0 1 — IE7 0 0 — PI0.7 0 ST — EX7 0 0 — PD0.7 0 0 — IT7 0 0 — PS7 0 0 — PR7 0 0 SPIB.8 SPIB.7 0 0 — STBY 0 0 — ESPII 0 0 — SPICK7 0 0 — FBUSY 0 1 — — 0 0 — ID0.7 0 0 — ET2 0 0 — T2H0.7 0 0 — T2RH0.7 0 0 — T2CH0.7 0 0 — ET2L 0 0 T2V0.8 T2V0.7 0 0 T2R0.8 T2R0.7 0 0 T2C0.8 T2C0.7 0 0 — T2C1 0 0 ICDT0.8 ICDT0.7 DB DB ICDT1.8 ICDT1.7 DB DB — DME 0 DW — — 0 0 — ICDB.7 0 0 ICDA.8 ICDA.7 0 0 ICDD.8 ICDD.7 0 0 6 PO0.6 1 IE6 0 PI0.6 ST EX6 0 PD0.6 0 IT6 0 PS6 0 PR6 0 SPIB.6 0 SPIC 0 — 0 SPICK6 0 — 0 — 0 ID0.6 0 T2OE0 0 T2H0.6 0 T2RH0.6 0 T2CH0.6 0 T2OE1 0 T2V0.6 0 T2R0.6 0 T2C0.6 0 T2DIV2 0 ICDT0.6 DB ICDT1.6 DB — 0 — 0 ICDB.6 0 ICDA.6 0 ICDD.6 0 5 PO0.5 1 IE5 0 PI0.5 ST EX5 0 PD0.5 0 IT5 0 PS5 0 PR5 0 SPIB.5 0 ROVR 0 — 0 SPICK5 0 — 0 — 0 ID0.5 0 T2POL0 0 T2H0.5 0 T2RH0.5 0 T2CH0.5 0 T2POL1 0 T2V0.5 0 T2R0.5 0 T2C0.5 0 T2DIV1 0 ICDT0.5 DB ICDT1.5 DB REGE DW — 0 ICDB.5 0 ICDA.5 0 ICDD.5 0 4 PO0.4 1 IE4 0 PI0.4 ST EX4 0 PD0.4 0 IT4 0 PS4 0 PR4 0 SPIB.4 0 WCOL 0 — 0 SPICK4 0 — 0 — 0 ID0.4 0 TR2L 0 T2H0.4 0 T2RH0.4 0 T2CH0.4 0 — 0 T2V0.4 0 T2R0.4 0 T2C0.4 0 T2DIV0 0 ICDT0.4 DB ICDT1.4 DB — 0 — 0 ICDB.4 0 ICDA.4 0 ICDD.4 0 3 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 SPIB.3 0 MODF 0 — 0 SPICK3 0 — 0 — 0 ID0.3 0 TR2 0 T2H0.3 0 T2RH0.3 0 T2CH0.3 0 TF2 0 T2V0.3 0 T2R0.3 0 T2C0.3 0 T2MD 0 ICDT0.3 DB ICDT1.3 DB CMD3 DW PSS1 0 ICDB.3 0 ICDA.3 0 ICDD.3 0 2 PO0.2 1 IE2 0 PI0.2 ST EX2 0 PD0.2 0 IT2 0 PS2 0 PR2 0 SPIB.2 0 MODFE 0 CHR 0 SPICK2 0 FC2 0 — 0 ID0.2 0 CPRL2 0 T2H0.2 0 T2RH0.2 0 T2CH0.2 0 TF2L 0 T2V0.2 0 T2R0.2 0 T2C0.2 0 CCF1 0 ICDT0.2 DB ICDT1.2 DB CMD2 DW PSS0 0 ICDB.2 0 ICDA.2 0 ICDD.2 0 1 PO0.1 1 IE1 0 PI0.1 ST EX1 0 PDO.1 0 IT1 0 PS1 0 PR1 0 SPIB.1 0 MSTM 0 CKPHA 0 SPICK1 0 FC1 0 — 0 ID0.1 0 SS2 0 T2H0.1 0 T2RH0.1 0 T2CH0.1 0 TCC2 0 T2V0.1 0 T2R0.1 0 T2C0.1 0 CCF0 0 ICDT0.1 DB ICDT1.1 DB CMD1 DW SPE 0 ICDB.1 0 ICDA.1 0 ICDD.1 0 0 PO0.0 1 IE0 0 PI0.0 ST EX0 0 PD0.0 0 IT0 0 PS0 0 PR0 0 SPIB.0 0 SPIEN 0 CKPOL 0 SPICK0 0 FC0 0 DPMG 0 ID0.0 0 G2EN 0 T2H0.0 0 T2RH0.0 0 T2CH0.0 0 TC2L 0 T2V0.0 0 T2R0.0 0 T2C0.0 0 C/T2 0 ICDT0.0 DB ICDT1.0 DB CMD0 DW TXC 0 ICDB.0 0 ICDA.0 0 ICDD.0 0 MAXQ7670 Table 5. Peripheral Register Bit Functions and Reset Values Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface 34 C0M12C C0M11C C0M10C C0M9C C0M8C C0M7C C0M6C C0M5C C0M4C C0M3C C0M2C C0M1C C0TMA C0RMS C0DB C0DP COR C0RE C0TE C0IR C0S C0C TM REGISTER 15 — 0 — 0 — 0 — 0 — 0 — 0 — 0 C0DP.15 0 C0DB.15 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 14 — 0 — 0 — 0 — 0 — 0 — 0 — 0 C0DP.14 0 C0DB.14 0 C0RMS.15 0 C0TMA.15 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 13 — 0 — 0 — 0 — 0 — 0 — 0 — 0 C0DP.13 0 C0DB.13 0 C0RMS.14 0 C0TMA.14 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 12 — 0 — 0 — 0 — 0 — 0 — 0 — 0 C0DP.12 0 C0DB.12 0 C0RMS.13 0 C0TMA.13 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 11 CRTMS 0 — 0 — 0 — 0 — 0 — 0 — 0 C0DP.11 0 C0DB.11 0 C0RMS.12 0 C0TMA.12 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 10 CRTM 0 — 0 — 0 — 0 — 0 — 0 — 0 C0DP.10 0 C0DB.10 0 C0RMS.11 0 C0TMA.11 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 9 TESTCAN 0 — 0 — 0 — 0 — 0 — 0 — 0 C0DP.9 0 C0DB.9 0 C0RMS.10 0 C0TMA.10 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 — 0 REGISTER BIT 8 7 — DCW 0 0 — ERIE 0 0 — BSS 0 0 — INTIN7 0 0 — C0TE.7 0 0 — C0RE.7 0 0 — CAN0BA 0 0 C0DP.8 C0DP.7 0 0 C0DB.8 C0DB.7 0 0 C0RMS.9 C0RMS.8 0 0 C0TMA.9 C0TMA.8 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 6 FTEST 0 STIE 0 EC96/128 0 INTIN6 0 C0TE.6 0 C0RE.6 0 INCDEC 0 C0DP.6 0 C0DB.6 0 C0RMS.7 0 C0TMA.7 0 ETI 0 ETI 0 ETI 0 ETI 0 ETI 0 ETI 0 ETI 0 ETI 0 ETI 0 ETI 0 ETI 0 ETI 0 5 DOFF 0 PDE 0 WKS 0 INTIN5 0 C0TE.5 0 C0RE.5 0 AID 0 C0DP.5 0 C0DB.5 0 C0RMS.6 0 C0TMA.6 0 ERI 0 ERI 0 ERI 0 ERI 0 ERI 0 ERI 0 ERI 0 ERI 0 ERI 0 ERI 0 ERI 0 ERI 0 Table 5. Peripheral Register Bit Functions and Reset Values (continued) 4 — 0 SIESTA 0 RXS 0 INTIN4 0 C0TE.4 0 C0RE.4 0 C0BPR7 0 C0DP.4 0 C0DB.4 0 C0RMS.5 0 C0TMA.5 0 INTRQ 0 INTRQ 0 INTRQ 0 INTRQ 0 INTRQ 0 INTRQ 0 INTRQ 0 INTRQ 0 INTRQ 0 INTRQ 0 INTRQ 0 INTRQ 0 3 SRT 0 CRST 1 TXS 0 INTIN3 0 C0TE.3 0 C0RE.3 0 C0BPR6 0 C0DP.3 0 C0DB.3 0 C0RMS.4 0 C0TMA.4 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 EXTRQ 0 2 — 0 AUTOB 0 ER2 0 INTIN2 0 C0TE.2 0 C0RE.2 0 — 0 C0DP.2 0 C0DB.2 0 C0RMS.3 0 C0TMA.3 0 MTRQ 0 MTRQ 0 MTRQ 0 MTRQ 0 MTRQ 0 MTRQ 0 MTRQ 0 MTRQ 0 MTRQ 0 MTRQ 0 MTRQ 0 MTRQ 0 1 SCANMODE 0 ERCS 0 ER1 0 INTIN1 0 C0TE.1 0 C0RE.1 0 C0BIE 0 C0DP.1 0 C0DB.1 0 C0RMS.2 0 C0TMA.2 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 0 TME 0 SWINT 1 ER0 0 INTIN0 0 C0TE.0 0 C0RE.0 0 C0IE 0 C0DP.0 0 C0DB.0 0 C0RMS.1 0 C0TMA.1 0 DTUP 0 DTUP 0 DTUP 0 DTUP 0 DTUP 0 DTUP 0 DTUP 0 DTUP 0 DTUP 0 DTUP 0 DTUP 0 DTUP 0 MAXQ7670 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface ______________________________________________________________________________________ 15 — 0 — 0 — 0 — 0 — — — 0 — 0 VIOLVL 0 — 0 14 — 0 — 0 — 0 — 0 ADCMX3 0 — 0 — 0 DVLVL 0 — 0 13 — 0 — 0 — 0 LRAPD 1 ADCMX2 0 — 0 — 0 AVLVL 0 — 0 12 — 0 — 0 — 0 VIBE 0 ADCMX1 0 — 0 — 0 — 0 — 0 11 — 0 — 0 — 0 VDBE 0 ADCMX0 0 — 0 — 0 XHFRY 0 — 0 10 — 0 — 0 — 0 VDPE 1 — 0 — 0 — 0 — 0 — 0 9 — 0 — 0 — 0 VABE 0 ADCBIP 0 ADCD.9 0 — 0 — 0 — 0 REGISTER BIT 8 7 — MSRDY 0 0 — MSRDY 0 0 — MSRDY 0 0 — — 0 0 — — 0 0 ADCD.8 ADCD.7 0 0 — — 0 0 — — 0 0 — — 0 0 6 ETI 0 ETI 0 ETI 0 — 0 ADCDUL 0 ADCD.6 0 HFFIE 0 HFFINT 0 ADCCD1 0 5 ERI 0 ERI 0 ERI 0 PGG0 0 ADCRSEF 0 ADCD.5 0 VIOBIE 0 VIOBI 0 ADCCD0 0 4 INTRQ 0 INTRQ 0 INTRQ 0 — 0 ADCASD 0 ADCD.4 0 DVBIE 0 DVBI 0 — 0 The OSCC register is cleared to 0002h after a POR and is not affected by other forms of reset. Bits indicated by “DW” are only written to in debug mode. These bits are cleared after a POR. Bits indicated by “DB” have read/write access only in background or debug mode. These bits are cleared after a POR. Bits indicated by “—“ are unused. OSCC ASR AIE ADCD ACNT APE C0M15C C0M14C C0M13C REGISTER 3 EXTRQ 0 EXTRQ 0 EXTRQ 0 — 0 ADCBY 0 ADCD.3 0 AVBIE 0 AVBI 0 — 0 2 MTRQ 0 MTRQ 0 MTRQ 0 BIASE 0 ADCS2 0 ADCD.2 0 — 0 — 0 XTE 0 1 ROW/TIH 0 ROW/TIH 0 ROW/TIH 0 — 0 ADCS1 0 ADCD.1 0 ADCIE 0 ADCRY 0 RCE 0 0 DTUP 0 DTUP 0 DTUP 0 ADCE 0 ADCS0 0 ADCD.0 0 — 0 — 0 — 0 MAXQ7670 Table 5. Peripheral Register Bit Functions and Reset Values (continued) Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface ______________________________________________________________________________________ 35 Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface MAXQ7670 Typical Application Circuit DUAL-BRIDGE SENSOR VBRIDGEA R+ dr dr R- AIN0 OUTA+ AIN2 -2nF AIN4 -2nF OUTA- MUX dr R- R+ dr AIN6 10-BIT ADC AIN1 GNDA AIN3 VBRIDGEB dr R- R+ dr AIN5 OUTB+ PGA x16 MUX AIN7 -2nF -2nF OUTBR+ dr dr R- MAXQ7670 GNDB P0.7/T0B DUAL-BRIDGE SENSOR P0.6/T0 VBRIDGEA dr R- R+ dr P0.5 OUTA+ DIGITAL I/O P0.4/ADCCNV -2nF P0.2 GPIO -2nF OUTAR+ dr dr R- 16-BIT TIMER P0.1 P0.0 GNDA SPI SCLK JTAG MISO VBRIDGEB R+ dr dr R- OUTB+ SPI MOSI OUTB- -2nF MAXQ20 CORE 16-BIT RISC MICRO R+ dr dr R- -2nF CAN 2.0B GNDB +3.3V AVDD REFADC 64KB PROGRAM/DATA FLASH SS TCK TDI JTAG TMS S TDO CANTXD 0.47µF RXD VDD +12V 10µF IN OUT EN HOLD MAX5024LASA SET 15µF 0.1µF 0.1µF DVDD GND +2.5V 0.47µF GND RESET RESET EXTERNAL RESET IS OPTIONAL XIN 16MHz XOUT REGEN2 AGND GNDIO DGND I.C. 36 4.7nF VCC 0.1µF DVDDIO TO CAN BUS 60Ω TXD MAX13053ASA/AUT CANRXD VDD (+5V) CANH REF CAN 2KB DATA RAM ______________________________________________________________________________________ CANL 60Ω TO CAN BUS Microcontroller with 10-Bit ADC, PGA, 64KB Flash, and CAN Interface Chip Information P0.5 RESET DGND XOUT XIN DVDD GNDIO DVDDIO AVDD P0.4/ADCCNV PROCESS: CMOS TOP VIEW Package Information 40 39 38 37 36 35 34 33 32 31 AIN7 1 + 30 TCK *EP AIN6 2 29 TDI AIN5 3 28 TMS AIN4 4 27 TDO For the latest package outline information and land patterns, go to www.maxim-ic.com/packages. PACKAGE TYPE PACKAGE CODE DOCUMENT NO. 40 TQFN-EP T4055+1 21-0140 26 REGEN2 REFADC 5 MAXQ7670 AGND 6 25 MISO AIN3 7 24 MOSI AIN2 8 23 SCLK AIN1 9 22 GNDIO AIN0 10 21 DVDDIO P0.6/TO P0.7/TOB SS CANTXD GNDIO 15 16 17 18 19 20 CANRXD P0.2 P0.1 P0.0 I.C. 11 12 13 14 Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are implied. Maxim reserves the right to change the circuitry and specifications without notice at any time. Maxim Integrated Products, 120 San Gabriel Drive, Sunnyvale, CA 94086 408-737-7600 ____________________ 37 © 2008 Maxim Integrated Products is a registered trademark of Maxim Integrated Products, Inc. MAXQ7670 Pin Configuration