EVALUATION KIT AVAILABLE MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash General Description The MAX35103 is a time-to-digital converter with built-in amplifier and comparator targeted as a low-cost analog front-end solution for the ultrasonic heat meter and flow meter markets. It is similar to the MAX35101, but consumes about half the average power and increases the maximum ToF measurement frequency in event timing mode from 2Hz to 16Hz. With a time measurement accuracy of 20ps and automatic differential time-of-flight (ToF) measurement, this device makes for simplified computation of liquid flow. Average power consumption is the lowest available with ultra-low 5.5A ToF measurement and < 125nA dutycycled temperature measurement. Applications Ultrasonic Heat Meters Ultrasonic Water Meters Ultrasonic Gas Meters Ordering Information appears at end of data sheet. 19-7361; Rev 1; 1/15 Benefits and Features High Accuracy Flow Measurement for Billing and Leak Detection * Time-to-Digital Accuracy Down to 20ps * Measurement Range Up to 8ms * Two Channels: Single-Stop Channel High Accuracy Temperature Measurement for Precise Heat and Flow Calculations * Up to Four 2-Wire Sensors * PT1000 and PT500 RTD Support Maximizes Battery Life with Low Device and Overall System Power * Ultra-Low 5A ToF Measurement and < 125nA Duty-Cycled Temperature Measurement * Event Timing Mode Reduces Host Microcontroller Overhead to Minimize System Power Consumption * 2.3V to 3.6V Single-Supply Operation High-Integration Solution Minimizes Parts Count and Reduces BOM Cost * 8KB of Nonvolatile Flash Memory for Data Logging * Built-in Real Time Clock * Small, 5mm x 5mm, 32-Pin TQFP Package * -40C to +85C Operation MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Typical Application Circuit GND GND GND GND GND 3.6V CMP_OUT/UP_DN CSW STOP_UP STOP_DN ANALOG SWITCHING AND BIAS CONTROL TIME-TO-DIGITAL CONVERTER PROGRAMMABLE ALU DATA AND STATUS REGISTERS WDO INT RST 3.6V VCC SCK VCC VCC BYPASS MAX35103 8KB FLASH INTERNAL LDO 100nF LOW ESR LAUNCH_UP CONFIGURATION REGISTERS PULSE LAUNCHER LAUNCH_DN MICROCONTROLLER DOUT DIN CE 4-WIRE INTERFACE STATE MACHINE CONTROLLER PIEZOELECTRIC TRANSDUCERS HIGH-SPEED AND 32kHz OSCILLATORS WITH REAL-TIME CLOCK 32KX0 32.768kHz 4MHz 12pF 32KX1 12pF 12pF 12pF 32KOUT T1 T2 PT 1000 X2 PT 1000 X1 TEMPERATURE MEASUREMENT T3 T4 TC 1k (50ppm) METAL FILM 100 nF COG (NP0) (30ppm/C) www.maximintegrated.com Maxim Integrated 2 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Absolute Maximum Ratings (Voltages relative to ground.) Voltage Range on VCC Pins.................................-0.5V to +4.0V Voltage Range on All Other Pins (not to exceed 4.0V).............................. -0.5V to (VCC + 0.5V) Continuous Power Dissipation (TA = +70C) TQFP (derate 27.80mW/C above +70C)............2222.20mW Operating Temperature Range............................ -40C to +85C Junction Temperature.......................................................+150C Storage Temperature Range............................. -55C to +125C Lead Temperature (soldering, 10s).................................. +300C Soldering Temperature (reflow)........................................+260C ESD Protection (All Pins, Human Body Model)...................2kV 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. Package Thermal Characteristics (Note 1) TQFP Junction-to-Ambient Thermal Resistance (JA)...........36C/W Junction-to-Case Thermal Resistance (JC)......................4C/W Note 1: Package thermal resistances were obtained using the method described in JEDEC specification JESD51-7, using a four-layer board. For detailed information on package thermal considerations, refer to www.maximintegrated.com/thermal-tutorial. Recommended Operating Conditions (TA = -40C to +85C, unless otherwise noted.) (Notes 2, 3) PARAMETER SYMBOL Supply Voltage VCC Input Logic 1 (RST, CSW, SCK, DIN, CE) VIH Input Logic 0 (RST, CSW, SCK, DIN, CE) VIL Input Logic 1 (32KX1) VIH32KX1 Input Logic 0 (32KX1) VIL32KX1 CONDITIONS MIN TYP MAX UNITS 2.3 3.0 3.6 V VCC x 0.7 VCC + 0.3 V VCC x 0.3 V VCC + 0.3 V VCC x 0.15 V -0.3 VCC x 0.85 -0.3 Electrical Characteristics (VCC = 2.3V to 3.6V, TA = -40C to +85C, unless otherwise noted. Typical values are at VCC = 3.0V and TA = +25C.) (Notes 2, 3) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS Input Leakage (CSW, RST, SCK, DIN, CE) IL -0.1 +0.1 A Output Leakage (INT, WDO, T1,T2,T3,T4) OL -0.1 +0.1 A Output Voltage Low (32KOUT) VOL32K 2mA Output Voltage High (32KOUT) VOH32K -1mA 0.8 x VCC V VOH -4mA 0.8 x VCC V Output Voltage High (DOUT, CMP_OUT/UP_DN) Output Voltage High (TC) www.maximintegrated.com VOHTC VCC = 3.3V, IOUT = -4mA 0.2 x VCC 2.9 3.1 V V Maxim Integrated 3 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Electrical Characteristics (continued) (VCC = 2.3V to 3.6V, TA = -40C to +85C, unless otherwise noted. Typical values are at VCC = 3.0V and TA = +25C.) (Notes 2, 3) PARAMETER Output Voltage High (Launch_UP, Launch_DN) SYMBOL VOHLAUCH Output Voltage Low (WDO, INT, DOUT, CMP_OUT/UP_DN) VOL Pulldown Resistance (TC) RTC Input Voltage Low (TC) CONDITIONS MIN TYP VCC = 3.3V, IOUT = -50mA 2.8 3.0 4mA 650 VOLLAUCH Resistance (T1, T2, T3, T4) RON Input Capacitance (CE, SCK, DIN, RST, CSW) CIN RST Low Time tRST 1000 1500 0.36 x VCC VCC = 3.3V, IOUT = 50mA 0.2 Not tested UNITS V 0.2 x VCC VILTC Output Voltage Low (Launch_UP, Launch_DN) MAX V V 0.4 V 1 7 pF 100 ns CURRENT Standby Current IDDQ No oscillators running, TA = +25C 0.1 1 A 32kHz OSC Current I32KHZ 32kHz oscillator only (Note 4) 0.5 0.9 A 4MHz OSC Current I4MHZ 4MHz oscillator only (Note 4) 40 85 A LDO Bias Current ICCLDO ICCCPU = 0 (Note 4) 15 50 A Time Measurement Unit Current ICCTMU (Note 4) 4.5 8 mA Calculator Current ICCCPU 0.75 1.7 mA ICC3 TOF_DIFF = 2 per second (3 hits), temperature = 1 per 30s 5.5 ICC6 TOF_DIFF = 2 per second (6 hits), temperature = 1 per 30s 7.0 Device Current Drain FLASH Erase Current A IFLASH 0.5 1 mA 700 2x VCC x (3/8) mVP-P ANALOG RECEIVER Analog Input Voltage (STOP_UP, STOP_DN) VANA Input Offset Step Size VSTEP 1 mV STOP_UP/STOP_DN Bias Voltage VBIAS VCC x (3/8) V Receiver Sensitivity VANA Stop hit detect level (Note 5) 10 tMEAS Time of flight 8 10 mVP-P TIME MEASUREMENT UNIT Measurement Range Time Measurement Accuracy tACC Time Measurement Resolution tRES www.maximintegrated.com Differential time measurement 8000 s 20 ps 3.8 ps Maxim Integrated 4 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Electrical Characteristics (continued) (VCC = 2.3V to 3.6V, TA = -40C to +85C, unless otherwise noted. Typical values are at VCC = 3.0V and TA = +25C.) (Notes 2, 3) PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS FLASH Data Retention DR TA = +25C 100 Years Flash Endurance NFLASH TA = +25C 20k Cycles Block Flash Erase Time tERASE LDO Stabilization Time tSTABLE 135 Word Write Time tWRITE 72 Transfer Configuration to Flash Command Time tCONFIG 35 ms Reset to POR INT 275 s 50 ms s 100 s EXECUTION TIMES Power-On-Reset Time tRESET INIT Command Time tINIT Command received when INIT bit set 2.5 ms Case Switch Time tCSW CSW pin logic-high until CSWI bit set 20 ns CAL Command Time tCAL Command received when CAL bit set 1.25 ms SERIAL PERIPHERAL INTERFACE DIN to SCK Setup tDC SCK to DIN Hold tCDH SCK to DOUT Delay tCDD SCK Low Time tCL SCK High Time tCH SCK Frequency tCLK CE to SCK Setup tCC SCK to CE Hold tCCH CE Inactive Time tCWH CE to DOUT High Impedance tCCZ www.maximintegrated.com 20 ns 2 20 ns 5 20 ns VCC 3.0V 25 4 VCC = 2.3V 50 30 25 4 ns ns VCC 3.0V 20 VCC = 2.3V 10 5 MHz 40 ns 20 ns 2 40 ns 5 20 ns Maxim Integrated 5 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Recommended External Crystal Characteristics PARAMETER SYMBOL 32kHz Nominal Frequency CONDITIONS MIN f32K 32kHz Frequency Tolerance f32K/f32K 32kHz Load Capacitance CL32K 32kHz Series Resistance RS32K 4MHz Crystal Nominal Frequency f4M/f4M 4MHz Crystal Load Capacitance CL4M 4MHz Crystal Series Resistance RS4M MAX 32.768 TA = +25C +20 12.5 4.000 +30 12.0 120 TA = +25C MHz -0.5 4MHz Ceramic Load Capacitance ppm pF 4.000 4MHz Ceramic Frequency Tolerance k MHz -30 4MHz Ceramic Nominal Frequency ppm pF 70 TA = +25C UNITS kHz -20 F4M 4MHz Crystal Frequency Tolerance TYP +0.5 30 % pF 4MHz Ceramic Series Resistance 30 Note 2: All voltages are referenced to ground. Current entering the device are specified as positive and currents exiting the device are negative. Note 3: Limits are 100% production tested at TA = +25C. Limits over the operating temperature range and relevant supply voltage range are guaranteed by design and characterization. Note 4: Currents are specified as individual block currents. Total current for a point in time can be calculated by taking the standby current and adding any block currents that are active at that time. Note 5: Receiver sensitivity includes performance degradation contributed by STOP_UP and STOP_DN device pin input offset voltage and common mode drift. Timing Diagrams Figure 1 tCC tCWH CE tCDH SCK tDC DIN MSB LSB tCDD DOUT HIGH IMPEDANCE MSB tCCZ LSB Figure 1. SPI Timing Diagram Read www.maximintegrated.com Maxim Integrated 6 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Timing Diagrams (continued) Figure 2 tCC CE tCLK tCCH tF tCH tCDH tCWH tR VIH tCL SCK VIL tDC DIN MSB LSB DOUT HIGH IMPEDANCE Figure 2. SPI Timing Diagram Write Typical Operating Characteristics (VCC = 3.3V and TA = +25C, unless otherwise noted.) ABSOLUTE ToF ERROR vs. SUPPLY VOLTAGE toc01 ABSOLUTE TOF ERROR vs. TEMPERATURE 34 toc02 50 30 30 40 28 26 26 24 24 22 2.20 2.45 2.70 2.95 3.20 3.45 3.70 3.95 VCC (V) www.maximintegrated.com AVERAGE ICC (A) 32 28 22 AVERAGE ICC vs. ToF RATE 60 32 ERROR (ns) ERROR (ns) 34 toc03 6 HITS 30 3 HITS 20 10 -10 15 40 TEMPERATURE (C) 65 90 0 0 5 10 15 20 ToF RATE (TOFDiff/s) Maxim Integrated 7 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Average ICC vs. ToF Rate Configuration Settings CONTROL BIT(S) 6-HIT SETTINGS VALUE 3-HIT SETTINGS BIT SETTINGS VALUE BIT SETTINGS Calibration Usage Disabled CAL_USE = 0 Disabled CAL_USE = 0 Clock Setting Time 488s CLK_2[2:0] = 000 488s CLK_2[2:0] = 000 Bias Charge Time 61s CT[1:0] = 00 61s CT[1:0] = 00 Pulse Launch Frequency 1MHz DPL[3:0] = 0001 1MHz DPL[3:0] = 0001 15 PL[7:0] = 00001111 15 PL[7:0] = 00001111 19.97ms TOF_CYC[2:0] = 111 19.97ms TOF_CYC[2:0] = 111 6 STOP[2:0] = 101 3 STOP[2:0] = 101 T2 Wave Selector Wave 2 T2WV[5:0] = 000110 Wave 2 T2WV[5:0] = 000110 Hit1 Wave Select 7 HIT1WV[5:0] = 000111 7 HIT1WV[5:0] = 000111 Hit2 Wave Select 8 HIT2WV[5:0] = 001000 8 HIT2WV[5:0] = 001000 Hit3 Wave Select 9 HIT3WV[5:0] = 001001 9 HIT3WV[5:0] = 001001 Hit4 Wave Select 10 HIT4WV[5:0] = 001010 n/a n/a Hit5 Wave Select 11 HIT5WV[5:0] = 001011 n/a n/a Hit6 Wave Select 12 HIT6WV[5:0] = 001100 n/a n/a Temperature Port Number 4 TP[1:0] = 11 4 TP[1:0] = 11 Preamble Temperature Cycle Number 1 PRECYC[2:0] = 001 1 PRECYC[2:0] = 001 256s PORTCYC[1:0] = 01 256s PORTCYC[1:0] = 01 Pulse Launch Size ToF Duty Cycle Stop Hits Port Cycle Time Notes: This data is valid for the ceramic resonator. Crystal oscillator startup add ~0.5A per TOFDiff. Since the ToF cycle time is long, the 4MHz oscillator power up twice. www.maximintegrated.com Maxim Integrated 8 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Pin Configuration 32KX1 32KX0 GND TC T4 T3 T2 T1 TOP VIEW 24 23 22 21 20 19 18 17 GND 25 16 CSW STOP_DN 26 15 WDO STOP_UP 14 RST 27 MAX35103 GND 28 13 DOUT VCC 29 12 DIN GND 30 11 SCK X2 31 9 2 3 4 5 6 7 VCC 32KOUT LAUNCH_DN VCC LAUNCH_UP INT 8 CMP_OUT/UP_DN 1 BYPASS + GND X1 32 10 CE EP TQFP (5mm x 5mm) Pin Description PIN NAME 1, 22, 25, 28, 30 GND 2 BYPASS 3, 6, 29 VCC 4 32KOUT 5 LAUNCH_DN CMOS Pulse Output Transmission in Downstream Direction of Water Flow 7 LAUNCH _UP CMOS Pulse Output Transmission in Upstream Direction of Water Flow 8 CMP_OUT/UP_DN CMOS Output. Indicates the direction (upstream or downstream) of which the pulse launcher is currently launching pulses OR the comparator output. 9 INT Active-Low Open-Drain Interrupt Output. The pin is driven low when the device requires service from the host microprocessor. 10 CE Active-Low CMOS Digital Input. Serial peripheral interface chip enable input. www.maximintegrated.com FUNCTION Device Ground Connect this pin to ground with a capacitor (100nF) to provide stability for the on-board lowdropout regulator that is used to supply the flash circuitry. The effective series resistance of this capacitor needs to be in the 1 to 2 range. Main Supply. Typically sourced from a single lithium cell. CMOS Output. Repeats the 32kHz crystal oscillator frequency. Maxim Integrated 9 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Pin Description (continued) PIN NAME 11 SCK CMOS Digital Input. Serial peripheral interface clock input. 12 DIN CMOS Digital Input. Serial peripheral interface data input. 13 DOUT 14 RST Active-Low CMOS Digital Reset Input 15 WDO Active-Low Open-Drain Watchdog Output 16 CSW CMOS Digital Input. Case Switch. Active-high tamper detect input. 17 T1 Open-Drain Probe 1 Temperature Measurement 18 T2 Open-Drain Probe 2 Temperature Measurement 19 T3 Open-Drain Probe 3 Temperature Measurement 20 T4 Open-Drain Probe 4 Temperature Measurement 21 TC Input/Output Temperature Measurement Capacitor Connection 23 32KX0 24 32KX1 26 STOP_DN Downstream STOP Analog Input. Used for the signal that is received from the downstream transmission of a time-of-flight measurement. 27 STOP_UP Upstream STOP Analog Input. Used for the signal that is received from the upstream transmission of a time-of-flight measurement. 31 X2 32 X1 -- EP www.maximintegrated.com FUNCTION CMOS Output. Serial peripheral interface data output. Connections for 32.768kHz Quartz Crystal. An external CMOS 32.768kHz oscillator can also drive the MAX35103. In this configuration, the 32KX1 pin is connected to the external oscillator signal and the 32KX0 pin is left unconnected. Connections for 4MHz Quartz Crystal. A ceramic resonator can also be used. Exposed Pad. Connect to GND. Maxim Integrated 10 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Block Diagram GND CMP_OUT/UP_DN STOP_UP STOP_DN ANALOG SWITCHING AND BIAS CONTROL TIME-TODIGITAL CONVERTER GND GND GND GND DATA AND STATUS REGISTERS PROGRAMMABLE ALU RST VCC MAX35103 VCC BYPASS INTERNAL LDO STATE MACHINE CONTROLLER DOUT 4-WIRE INTERFACE CONFIGURATION REGISTERS PULSE LAUNCHER HIGH SPEED AND 32 KHZ OSCILLATORS W/REAL TIME CLOCK X1 SCK 8 KBYTES FLASH LAUNCH_UP X2 32KX1 32KX0 32KOUT Detailed Description The MAX35103 is a time-to-digital converter with built-in amplifier and comparator targeted as a complete analog front-end solution for the ultrasonic heat meter and flow meter markets. With automatic differential time-of-flight (TOF) measurement, this device makes for simplified computation of liquid flow. Early edge detection ensures measurements are made with consistent wave patterns to greatly improve accuracy and eliminate erroneous measurements. Built-in arithmetic logic unit provides TOF difference measurements. A programmable receiver hit accumulator can be utilized to minimize the host microprocessor access. Multihit capability with stop-enable windowing allows the device to be fine-tuned for the application. Internal analog switches, an autozero amplifier/comparator, realtime clock (RTC), and programmable receiver sensitivity provide the analog interface and control for a minimal electrical bill of material solution. The RTC provides an www.maximintegrated.com WDO INT VCC LAUNCH_DN CSW DIN CE TEMPERATURE MEASUREMENT T1 T2 T3 T4 TC event timing mode that is configurable and runs cyclic algorithms to minimize microprocessor interactivity and increase battery life. For temperature measurement, the MAX35103 supports up to four (4) 2-wire PT1000/500 platinum resistive temperature detectors (RTD). The MAX35103 offers an event timing mode that is configurable and runs cyclic algorithms to minimize microprocessor interactivity and increase battery life. The real-time clock (RTC) provides one programmable alarm and watchdog functionality. A simple opcode based 4-Wire SPI interface allows any microcontroller to effectively configure the device for its intended measurement. On-board user flash allows the MAX35103 to be nonvolatile configurable and provides nonvolatile energy use data to be logged. Maxim Integrated 11 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash TIME OF FLIGHT MEASUREMENTS TOF START T1 T2 HIT1 HIT2 HIT3 HIT4 HIT5 HIT6 TOF MEASUREMENT SEQUENCE Figure 3 AVG = (HIT[1:6]) / 6 LAUNCH PIN COMPARATOR OFFSET STOP PIN WAVE NUMBER COMPARATOR OFFSET RETURN 0 1 2 3 4 5 6 7 8 9 10 11 INT PIN (4) TOF MEASUREMENT DELAY (2) BIAS CHARGE TIME (1) 4 MHZ STARTUP (2) BIAS APPLIED TO STOP PIN TOF COMMAND RECEIVED (3) LAUNCH PULSES STOP HITS SELECTED = 6, STOP POLARITY = POSITIVE EDGE (4) ENABLE RECEIVER (6) (5) COMPARE T1 WAVE RETURN (7) T2 WAVE SELECTED WAVES FOR HITS: T2 = 4 HIT1 = 6 HIT2 = 7 HIT3 = 8 (8) STOP HITS HIT4 = 9 (10) (9) INT CALCULATIO ASSERTED NS HIT5 = 10 HIT6 = 11 Figure 3. Time-of-Flight Sequence Time-of-Flight (ToF) Measurement Operations TOF is measured by launching pulses from one piezoelectric transducer and receiving the pulses at a second transducer. The time between when the pulses are launched and received is defined as the time of flight. The MAX35103 contains the functionality required to create a string of pulses, sense the receiving pulse string, and measure the time of flight. The MAX35103 can measure two separate TOFs, which are defined as TOF up and TOF down. A TOF up measurement has pulses launched from the LAUNCH_UP pin, which is connected to the downstream transducer. The ultrasonic pulse is received at the upstream transducer, which is connected to the STOP_ UP pin. A TOF down measurement has pulses launched from the LAUNCH_DN pin, which is connected to the upstream transducer. The ultrasonic pulse is received at the downstream transducer, which is connected to the STOP_DN pin. 1) The 4MHz oscillator and LDO is enabled with a programmable settling delay time set by the CLK_S[2:0] bits in Calibration and Control register. 2) A common-mode bias is enabled on the STOP pin. This bias charge time is set by the CT[1:0] bits in the TOF1 register. 3) Once the bias charge time has expired, the pulse launcher drives the appropriate LAUNCH pin with a programmable sequence of pulses. The number of pulses launched is set by the PL[7:0] bits in the TOF1 register. The frequency of these 50% dutycycle pulses is set by the DPL[3:0] bits, also in the TOF1 register. The start of these launch pulses generates a start signal for the time-to-digital converter (TDC) and is considered to be time zero for the TOF measurement. This is denoted by the start signal in the start/stop TDC timing (Figure 3). 4) After a programmable delay time set in TOF Measurement Delay register, the comparator and hit detector at the appropriate STOP pin are enabled. This delay allows the receiver to start recording hits when the received wave is expected, eliminating possible false hits from noise in the system. 5) Stop hits are detected according to the programmed preferred edge of the acoustic signal sequence received at the STOP pin according to the setting TOF measurements can be initiated by sending either the TOF_UP, TOF_DN, or TOF_DIFF commands. TOF_DIFF measurements can also be automatically executed using event timing mode commands EVTMG1 or EVTMG2. The steps involved in a single TOF measurement are described here and shown in Figure 3. www.maximintegrated.com Maxim Integrated 12 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash of the STOP_POL bit in the TOF1 register. The first stop hit is detected when a wave received at the STOP pin exceeds the comparator offset voltage, which is set in the TOF6 and TOF7 registers. This first detected wave is wave number 0. The width of the wave's pulse that exceeds the comparator offset voltage is measured and stored as the t1 time. 6) The offset of the comparator then automatically and immediately switches to the comparator return offset, which is set in the TOF6 and TOF7 registers. 7) The t2 wave is detected and the width of the t2 pulse is measured and stored as the t2 time. The wave number for the measurement of the t2 wave width is set by the T2WV[5:0] bits in the TOF2 register. 8) 9) bit in the Interrupt Status register is set and the INT pin is asserted (if enabled) and remains asserted until the Interrupt Status register is accessed by the microprocessor with a read register command. The computation of the total time of flight is performed by counting the number of full and fractional 4MHz clock cycles that elapsed between the launch start and a hit stop as shown in Figure 4. Table 1. Two's Complement TOF_DIFF Conversion Example REGISTER VALUE The preferred number of stop hits are then detected. For each hit, the measured TOF is stored in the appropriate HITxUPINT and HITxUPFrac or HITxDNINT and HITxDNFRAC registers. The number of hits to detect is set by the STOP[2:0] bits in the TOF2 register. The wave number to measure for each stop hit is set by the HITx wave select bits in the TOF3, TOF4, and TOF5 registers. After receiving all of the programmed hits, the MAX35103 calculates the average of the recorded hits and stores this to AVGUPINT and AVGUPFrac or AVGDNInt and AVGDNFrac. The ratio of t1/t2 and t2/tideal are calculated and stored in the WVRUP or WVRDN register. 10) Once all of the hit data, wave ratios, and averages become available in the Results registers, the TOF TOF_DIFFInt (hex) TOF_DIFFFrac (hex) TOF DIFF VALUE (ns) 7FFF FFFF 8,191,999.9962 001C 0403 7,003.9177 0001 00A1 250.6142 0000 0089 0.5226 0000 0001 0.0038 0000 0000 0.0000 FFFF FFFF -0.0038 FFFF FFC0 -0.2441 FFFE 1432 -480.2780 FF1C 8001 -56,874.9962 8000 0000 -8,192,000.0000 Figure 4 INTEGER TOF RESULTS PORTION 1 LSB = T4MHZ 1 2 3 CONVERTER VALUE 4 FRACTIONAL TOF RESULTS PORTION 1 LSB = T4MHz/(2^16) N 4 MHz CLOCK START SIGNAL (INTERNALLY GENERATED WHEN ACOUSTIC SIGNAL IS TRANSMITTED) STOP SIGNAL (GENERATED UPON ACOUSTIC SIGNAL RECEPTION) TOTAL TIME OF FLIGHT = INTEGER + FRACTIONAL Figure 4.Start/Stop for Time-to-Digital Timing www.maximintegrated.com Maxim Integrated 13 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Each TOF measurement result is comprised of an integer portion and a fractional portion. The integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the integer is 7FFFh or (215-1) x t4MHz or ~ 8.19 ms. The maximum size of the fraction is: FFFFh or 216 - 1 216 OFFSETDN[6:0] bits in the TOF7 register. Once the first hit is detected, the time t1 equal to the width of the earliest detectable edge is measured. The input offset voltage is then automatically and immediately returned to a preprogrammed comparator offset value. This return offset value has a range of +127 LSBs to -128 LSBs in 1 LSB steps and is programmed into the C_OFFSETUPR[7:0] bits in the TOF6 register for the upstream received signal and programmed into the C_OFFSETDNR[7:0] bits in the TOF7 register. This preprogrammed comparator offset return value is provided to allow for common-mode shifts that can be present in the received acoustic wave. x t 4MHz . or ~ 249.9961 ns. Early Edge Detect The MAX35103 is now ready to measure the successive hits. The next selected wave that is measured is the t2 wave. In the example in Figure 5, this is the 7th wave after the early edge detect wave. The selection of the t2 wave is made with the T2WV[5:0] bits in the TOF2 register. This early edge detect method of measuring the TOF of acoustic waves is used for all of the TOF commands including TOF_UP, TOF_DN, and TOF_DIFF. This method allows the MAX35103 to automatically control the input offset voltage of the receiver comparator so that it can provide advanced measurement accuracy. The input offset of the receiver comparator can be programmed with a range +127 LSBs if triggering on a positive edge and -127 LSBs if triggering on a negative edge, with 1 LSB = VCC/3072. Separate input offset settings are available for the upstream received signal and the downstream received signal. The input offset for the upstream received signal is programmed using the C_OFFSETUP[6:0] bits in the TOF6 register. The input offset for the downstream received signal is programmed using the C_ Figure 5 With reference to Figure 5, the ratio t1/t2 is calculated and registered for the user. This ratio allows determination of abrupt changes in flow rate, received signal strength, partially filled tube detection, and empty tube. It also provides noise suppression to prevent erroneous edge detection. Also, the ratio t2/tideal is calculated and registered for the user. For this calculation, tideal is1/2 the period of launched pulse. This ratio adds confirmation that the t2 wave is a strong signal, which provides insight into the common mode offset of the received acoustic wave. OFFSET RESETS AUTOMATICALLY TO A PREPROGRAMMED VALUE (127mV IN 1mV STEPS) TO DETECT SUBSEQUENT ZERO CROSSINGS WAVE NUMBER 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 PROGRAMMABLE OFFSET DETECT: 127mV IN 1mV STEPS HIT NO.: 1 2 3 4 5 6 t2 t1 EXAMPLE: MEASURE WIDTH OF 7TH WAVE AFTER EARLY EDGE DETECT Figure 5. Early Edge Detect Received Wave Example www.maximintegrated.com Maxim Integrated 14 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash TOF Error Handling The dummy 1 and dummy 2 cycles represent preamble measurements that are intended to eliminate the dielectric absorption of the temperature measurement capacitor. These dummy cycles are executed using a RTD Emulation resistor of 1000 internal to the MAX35103. This dummy path allows the dielectric absorption effects of the capacitor to be eliminated without causing any of the RTDs to be unduly self-heated. The number of dummy measurements to be taken ranges from 0 to 7. This parameter is configured by setting the PRECYC[2:0] bits in the Event Timing 2 register. Any of the TOF measurements can result in an error. If an error occurs during the measurement, all of the associated registers report FFFFh. If a TOF_DIFF is being performed, the TOF_DIFFInt and TOF_DIF_Frac registers report 7FFFh and FFFFh, respectively. The TOF_DIFF_AVG Results registers do not include the error measurement. If the measurement error is caused by the time measurement exceeding the timeout set by the TIMOUT[2:0] bits in the TOF2 register, then the TO bit in the Interrupt Status register is set and the INT pin asserts (if enabled). Following the dummy cycles, an evaluation, TXevaluate, is performed. This measurement allows the MAX35103 to maximize power efficiency by evaluating the temperature of the RTDs with a coarse measurement prior to a real measurement. The coarse measurement provides an approximation to the TDC converter. During the real measurement, the TDC can then optimize its measurement parameters to use power efficiently. These evaluate cycles are automatically inserted according to the order of ports selected with the of the Temperature Port bits. The time from the start of one port's temperature measurement to the next port's temperature measurement is set using with the PORTCYC[1:0] bits in the Event Timing 2 register. Temperature Measurement Operations A temperature measurement is a time measurement of the RC circuit connected to the temperature port device pins T1 through T4 and TC. The TC device pin has a driver to charge the timing capacitor. The ports that are measured and the order in which the measurement is performed is selected with the TP[1:0] bits in the Event Timing 2 register. Figure 6 depicts a 1000 platinum RTD with a 100nF NPO COG 30ppm/C capacitor. It shows two dummy cycles with 4 temperature port evaluation measurements and 4 real temperature port measurements. This occurs when setting the TP[1:0] bits in the Event Timing 2 register to 11b. Figure 6 DRIVER TO CHANGE TC-CONNECTED CAPACITOR VTC 3.5 3.0 2.5 2.0 PORTCYCLE TIME (PORTCYC1-PORTCYC0) SET TO "00" 128s VOLTS (V) 1.5 1.0 VTC DUMMY1 DUMMY2 T1EVALUATE T3EVALUATE T2EVALUATE T4EVALUATE T1 T3 T2 T4 0.5 0 128 256 384 512 640 768 896 1,024 1,152 1,280 1,408 TIME (s) Figure 6. Temperature Command Execution Cycle Example www.maximintegrated.com Maxim Integrated 15 MAX35103 Once all the temperature measurements are completed, the times measured for each port are reported in the corresponding TxInt and TxFrac Results registers. The TE bit in the Interrupt Status register is also set and the INT pin asserts (if enabled). Actual temperature is determined by a ratiometric calculation. If T1 and T2 are connected to platinum RTDs and T3 and T4 are connected to the same reference resistor (as shown in the System Diagram), then the ratio of T1/ T3 = RRTD1/RREF and T2/T4 = RRTD2/RREF. The ratios RRTD1/RREF and RRTD2/RREF can be determined by the host microprocessor and the temperature can be derived from a look-up table of Temperature vs. Resistance for each of the RTDs utilizing interpolation of table entries if required. Temperature Error Handling The temperature measurement unit can detect open and/ or short-circuit temperature probes. If the resultant temperature reading in less than 8s, then the MAX35103 writes a value of 0000h to the corresponding Results registers to indicate a short-circuit temperature probe. If the measurement process does not discharge the TC pin below the threshold of the internal temperature comparator within 2s of the time set by the PORTCYC[1:0] bits in the Event Timing 2 register, then an open circuit temperature probe error is declared. The MAX35103 writes a value of FFFFh to the corresponding results registers to indicate an open circuit temperature probe, the TO bit in the Interrupt Status register is set, and the INT pin asserts (if enabled). If the temperature measurement error is caused by any other problems, then the MAX35103 writes a value of FFFFh to each of the temperature port results registers indicating that all of the temperature port measurements are invalid. Event Timing Operation The event timing mode of operation is an advanced feature that allows the user to configure the MAX35103 to perform automatic measurement cycles. This allows the host microcontroller to enter low-power mode and only awaken upon assertion of the MAX35103 INT pin (if enabled) when new measurement data is available. By using the TOF_DIFF and temperature commands and configuring the appropriate TOFx registers and the Event Timing registers, the event timing modes directs the MAX35103 to provide complete data for a sequence of measurements captured on a cyclical basis. There are three versions of the EVTMG commands. www.maximintegrated.com Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash EVTMG2: Performs automatic TOF_DIFF measurements. The parameters and operation of the TOF measurement are described in the Time-of-Flight (ToF) Measurement Operations section. EVTMG3: Performs automatic Temperature measurements. The parameters and operation of the Temperature measurements are described in the Temperature Measurement Operations section. EVTMG1: Performs automatic TOF_DIFF Temperature measurements. and Continuous Event Timing Operation The MAX35103 can be configured to continue running event timing sequences at the completion of any sequence. If the ET_CONT bit in the Calibration and Control register is set, the currently executing EVTMGx command continues to execute until a HALT command is received by the MAX35103. If the ET_CONT bit is clear, automatic execution of event timing stops after the completion of a full sequence of measurements. Continuous Interrupt Timing Operation When operating in event timing mode, the INT pin can be asserted (if enabled) either after each TOF or temperature measurement, or at the completion of the sequence of measurements. If the CONT_INT bit in the Calibration and Control register is set to a 1, then the INT pin asserts (if enabled) at the completion of each TOF or temperature command. This allows the host microcontroller to interrogate the current event for accuracy of measurement. If the CONT_INT bit is set to a 0, then the INT pin only asserts (if enabled) at the completion of a sequence of measurements. This allows the host microcontroller to remain in a low-power sleep mode and only wake-up upon the assertion of the INT pin. Error Handling During Event Timing Operation During execution of event timing modes, any error that occurs during a TOF_DIFF or temperature measurement are handled as described in the corresponding error handling sections. Calibration can be executed during event timing operation, if programmed to do so with the calibration configuration bits in the Calibration and Control register. If a calibration error occurs, this is handled as described in the Error Handling During Calibration section. If any of these errors occur, the event timing operation does not terminate, but continues operation. Maxim Integrated 16 MAX35103 When making TOF measurements in event timing mode, the MAX35103 provides additional data in the TOF_ Cycle_Count/TOF_Range register that can be used to check the validity of all of the TOF measurements. The TOF_Cycle_Count is the number of valid error-free TOF measurements that were recorded during an Event Timing Sequence. If a TOF error occurs, the TOF_Cycle_Count register will not be incremented. The TOF_Range is the range of all valid TOF measurements that were captured during a sequence. When making temperature measurements in event timing mode, the MAX35103 provides additional data in the Temp_Cycle_Count register. This count increments after every valid error-free temperature measurement and can be used to check the validity of all of the temperature measurements. Also, the Temperature Average Results registers, TxAVG, are not updated with the error measurement if a temperature error occurs during event timing operation. Event Timing Mode 2 The EVTMG2 command execution causes the TOF_DIFF command to be executed automatically with programmable repetition rates and programmable total counts as shown in Figure 7. During execution of the EVTMG2 command, each TOF_ DIFF command execution cycle causes the MAX35103 to compute a TOF_DIFF measurement (AVGUP register minus AVGDN register) as well as the running average of TOF_DIFF measurements (TOFF_DIFF_AVG register). The setting of the 8XS and TDF[3:0] bits in the Event Timing 1 register selects the rate at which TOF_DIFF commands are executed. The setting of the TDM[4:0] www.maximintegrated.com Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash bits in the Event Timing 1 register determines the number of TOF_DIFF measurements to be taken during the sequence. Once all of the TOF_DIFF measurements in the sequence are captured, the TOF_DIFF_AVG register contains the average of the differences of the resultant AVGDN and AVGUP Results register content of each TOF_DIFF measurement. After the TOF_DIFF_AVG registers are updated, the TOF_EVTMG bit is set in the Interrupt Status register and the INT pin asserts (if enabled). Event Timing Mode 3 The EVTMG3 command execution causes the temperature command to be executed automatically with programmable repetition rates and programmable total counts (Figure 9). During execution of the EVTMG3 command, each Temperature command execution cycle computes the running average of the measurement of each temperature port. The results are provided in the Tx_AVGInt and TxAVGFrac Results registers. The setting of the 8XS and TMF[5:0] bits in the Event Timing 1 register selects the rate at which temperature commands are executed. The setting of the TMM[4:0] bits in the Event Timing 2 register determines the number of temperature measurements to be taken during the sequence. Once all of the temperature measurements in the sequence are captured Tx_AVGInt and TxAVGFrac Results registers contains the average of all the temperature measurements in the sequence. After these registers are updated, the Temp_EVTMG bit is set in the Interrupt Status register and the INT pin asserts (if enabled). Maxim Integrated 17 MAX35103 Figure 7 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Figure 8 EVTMG2 COMMAND TIME OF FLIGHT EVENT HOST MICROCONTROLLER USE OF EVTMG2 TIME OF FLIGHT EVENT START PROGRAM TOF DIFFERENCE MEASUREMENT FREQUENCY (8XS/TDF3-TDF0) GET CONFIGURATION REGISTER DATA START TIMER PROGRAMMABLE IN 0.5 SECOND STEPS UP TO 8 SECONDS (EG. EVERY 2 SECONDS) IS TIMER > = NEXT 8XS/TDF3-TDF0 INCREMENT? PROGRAM NUMBER OF TOF DIFFERENCE MEASUREMENTS (TDM4-TDM0) TO BE TAKEN (EG. 15) NO ASSERT THE INT DEVICE PIN YES UP TO 32 MEASUREMENTS CAN BE TAKEN PERFORM TOF_DIFF COMMAND YES CONFIGURE REMAINING MAX35103 REGISTERS INCLUDING THE CONT_INT AND ET_CONT BITS IS TIMER > = NEXT 8XS/TDF3-TDF0 INCREMENT? NO SEE ERROR HANDLING DESCRIPTION SEND THE EVTMG2 COMMAND COMPUTE RUNNING AVG FOR TOF_DIFF MEASUREMENTS AND STORE AT TOF_DIFF_AVG WAIT FOR ASSERTION OF INT DEVICE PIN INCREMENT TOF_CYCLE_COUNT SETTING CONT_INT ALLOWS HOST MICROCONTROLLER TO INTERROGATE MAX35103 AFTER EACH MEASUREMENT CYCLE INCREMENT SEQUENCE CYCLE COUNTER SEQUENCE CYCLE COUNTER = TDM4TDM0 ? NO NO YES IS THE CONT_INT BIT SET? SET THE TOF_EVTMG BIT IN THE INTERRUPT STATUS REGISTER YES ASSERT THE INT DEVICE PIN ASSERT THE INT DEVICE PIN SETTING ET_CONT BIT CAUSES THE SEQUENCE TO BE CONTINUOUS IS THE ET_CONT BIT SET? NO READ INTERRUPT STATUS REGISTER NO IS TOF_EVTMG BIT SET? YES AVERAGE OF 15 TOF DIFFERENCE MEASUREMENTS ARE READY FOR THE HOST MICROCONTROLLER READ TOF_DIFF_AVG, TOF_DIFF, AVGUP, AVGDN, HITX REGISTERS FOR TOF DATA ASSERT THE INT DEVICE PIN YES IS THE ET_CONT BIT SET? NO OTHER PROCESS YES END Figure 7. EVTMG2 Command www.maximintegrated.com Figure 8. EVTMG2 Pseudo Code Maxim Integrated 18 MAX35103 Figure 9 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Figure 10 EVTMG3 COMMAND TEMPERATURE EVENT HOST MICROCONTROLLER USE OF EVTMG3 TEMPERATURE EVENT START PROGRAM TEMPERATURE DIFFERENCE MEASUREMENT FREQUENCY (8XS/TDF5-TDF0) GET CONFIGURATION REGISTER DATA START TIMER TEMPERATURE MEASUREMENT REPETITION RATE PROGRAMMABLE IN 1 SECOND STEPS UP TO 64 SECONDS (EG. EVERY 15 SECONDS) IS TIMER > = NEXT 8XS/TDF5-TDF0 INCREMENT? PROGRAM NUMBER OF TEMPERATURE DIFFERENCE MEASUREMENTS (TDM4-TDM0) TO BE TAKEN (EG. 2) NO YES PERFORM TEMPERATURE COMMAND YES UP TO 32 MEASUREMENTS CAN BE TAKEN CONFIGURE REMAINING MAX35103 REGISTERS INCLUDING THE CONT_INT AND ET_CONT BITS TEMPERATURE COMMAND ERROR ? NO SEE ERROR HANDLING DESCRIPTION COMPUTE RUNNING AVG FOR EACH MEASURED PORT AND STORE AT T1_AVG, T2_AVG, T3_AVG, T4_AVG REGISERS SEND THE EVTMG3 COMMAND WAIT FOR ASSERTION OF INT DEVICE PIN SETTING CONT_INT ALLOWS HOST MICROCONTROLLER TO INTERROGATE MAX35103 AFTER EACH MEASUREMENT CYCLE INCREMENT TEMP_CYCLE_COUNT RESULTS REGISTER INCREMENT SEQUENCE CYCLE COUNTER READ INTERRUPT STATUS REGISTER NO SEQUENCE CYCLE COUNTER = TDM4TDM0 ? NO YES YES SETTING ET_CONT BIT CAUSES THE SEQUENCE TO BE CONTINUOUS IS THE CONT_INT BIT SET? SET THE TOF_EVTMG BIT IN THE INTERRUPT STATUS REGISTER SET THE TE BIT IN THE INTERRUPT STATUS REGISTER ASSERT THE INT DEVICE PIN ASSERT THE INT DEVICE PIN IS THE ET_CONT BIT SET? NO YES NO IS TEMP_EVTMG BIT SET? YES ACCUMULATION OF TWO TEMPERATURE MEASUREMENTS ARE READY FOR THE HOST MICROCONTROLLER READ THE TXINT, TXFRAC, TX_AVGINT, TX_AVGFRAC REGISTERS FOR TEMPERATURE DATA IS THE ET_CONT BIT SET? NO OTHER PROCESS YES END Figure 9. EVTMG3 Command www.maximintegrated.com Figure 10. EVTMG3 Pseudo Code Maxim Integrated 19 MAX35103 Event Timing Mode 1 The EVTMG1 command execution causes the TOF_DIFF command and the temperature command to be executed automatically with programmable repetition rates and programmable total counts. In essence, both the EVTMG2 and EVTMG3 commands are simultaneously executed in a synchronous manner. Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Figure 11 PROGRAM TOF DIFFERENCE MEASUREMENT FREQUENCY (8XS/TDF3-TDF0) PROGRAMMABLE IN 0.5 SECOND STEPS UP TO 8 SECONDS (EG. EVERY 2 SECONDS) Setting up the TOF measurements for automatic execution in event timing mode 1 is identical to setting these up for execution with event timing mode 2. Likewise, setting up the temperature measurements is identical to setting these up for execution using event timing mode 3. If the TOF_DIF command repetition rate and the temperature command repetition rate cause both measurements to be required at the same time, the TOFF_DIF command takes precedent. Upon completion of the TOFF_DIFF command, the pending temperature command is executed (Figure 12). Once all of the TOF_DIFF measurements in the sequence are complete, the TOF_EVTMG bit in the Interrupt Status register is set and the INT pin asserts (if enabled). Likewise, when all of the temperature measurements in the sequence are completed, the Temp_EVTMG bit in the Interrupt Status register is set and the INT pin asserts (if enabled). It should be noted that depending upon the selected rates and number of cycles, the TOF_DIFF and temperature measurements can complete their sequences at different times. This causes the INT pin to assert (if enabled) before both sequences are complete. PROGRAM NUMBER OF TOF DIFFERENCE MEASUREMENTS (TDM4-TDM0) TO BE TAKEN (EG. 2) UP TO 32 MEASUREMENTS CAN BE TAKEN PROGRAM TEMPERATURE MEASUREMENT FREQUENCY (8XS/TMF5-TMF0) (EG. EVERY 15 SECONDS) PROGRAMMABLE IN 1 SECOND STEPS UP TO 64 SECONDS PROGRAM # OF TEMPERATURE MEASUREMENTS (TMM4-TMM0) TO BE TAKEN (EG. 2) UP TO 32 MEASUREMENTS CAN BE TAKEN CONFIGURE REMAINING MAX35103 REGISTERS INCLUDING THE CONT_INT AND ET_CONT BITS SEND THE EVTMG3 COMMAND WAIT FOR ASSERTION OF INT DEVICE PIN AVERAGE OF 15 TOF DIFFERENCE MEASUREMENTS ARE READY FOR THE HOST MICROCONTROLLER READ INTERRUPT STATUS REGISTER Calibration Operation For more accurate results, calibration of the TDC can be performed. Calibration allows the MAX35103 to perform a calibration measurement that is based upon the 32.768kHz crystal, which is the most accurate clock in the system. This calibration is used when a ceramic oscillator is used in place of an AT-cut crystal for the 4MHz reference. The MAX35103 automatically generates START and STOP signals based upon edges of the 32.768kHz clock. The number of 32.768kHz clock periods that are used and then averaged are selected with the CAL_ PERIOD[3:0] bits in the Calibration and Control register. HOST MICROCONTROLLER USE OF EVTMG1 TIME OF FLIGHT / TEMPERATURE EVENT READ TOF_DIFF_AVG, TOF_DIFF, AVGUP, AVGDN, HITX REGISTERS FOR TOF DATA IS TEMP_EVTMG BIT SET? NO IS TEMP_EVTMG BIT SET? YES AVERAGE OF TWO TEMPERATURE MEASUREMENTS ARE READY FOR THE HOST MICROCONTROLLER READ THE TXINT, TXFRAC, TX_AVGINT, TX_AVGFRAC REGISTERS FOR TEMPERATURE DATA IS THE ET_CONT BIT SET? NO OTHER PROCESS YES Figure 11. EVTMG1 Pseudo Code www.maximintegrated.com Maxim Integrated 20 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash EVTMG1 TIME OF FLIGHT / TEMPERATURE COMMAND Figure 12 START GET CONFIGURATION REGISTER DATA TOF_DIFF MEASUREMENT REPETITION RATE START TIMER IS TIMER > = NEXT 8XS/TDF3-TDF0 INCREMENT? YES SET TOF_PENDING NO IS TIMER > = NEXT 8XS/TMF5-TMF0 INCREMENT? TEMPERATURE MEASUREMENT REPETITION RATE SET TEMPERATURE_ PENDING YES NO IS TOF_PENDING SET? YES NO NO IS TEMPERATURE_ PENDING SET? PERFORM TOF_DIFF COMMAND YES CLEAR TEMPERATURE_ PENDING YES PERFORM TEMPERATURE COMMAND TOF_DIFF COMMAND ERROR? CLEAR TOF_PENDING NO YES TEMPERATURE COMMAND ERROR? SEE ERROR HANDLING DESCRIPTION COMPUTE RUNNING AVG FOR TOF_DIFF MEASUREMENTS AND STORE AT TOF_DIFF_AVG SETTING CONT_INT ALLOWS HOST MICROCONTROLLER TO INTERROGATE MAX35101 AFTER EACH MEASUREMENT CYCLE NO INCREMENT TOF_CYCLE_COUNT COMPUTE RUNNING AVG FOR EACH MEASURED PORT AND STORE AT T1_AVG, T2_AVG, T3_AVG, T4_AVG REGISERS SEE ERROR HANDLING DESCRIPTION SETTING CONT_INT ALLOWS HOST MICROCONTROLL ER TO INTERROGATE MAX35101 AFTER EACH MEASUREMENT CYCLE INCREMENT SEQUENCE CYCLE COUNTER INCREMENT TEMPERATURE CYCLE COUNTER SEQUENCE CYCLE COUNTER = TDM4- TDM0? INCREMENT SEQUENCE CYCLE COUNTER NO IS THE CONT_INT BIT SET? NO YES SEQUENCE CYCLE COUNTER = TMM4TMM0? IS TEMPERATURE_PEND ING SET? SET THE TEMP_EVTMG BIT IN THE INTERRUPT STATUS REGISTER ASSERT THE INT DEVICE PIN ASSERT THE INT DEVICE PIN YES IS THE ET_CONT BIT SET? NO END YES IS TEMPERATURE_ PENDING SET? YES NO ASSERT THE INT DEVICE PIN IS THE ET_CONT BIT SET? NO SET THE TOF BIT IN THE INTERRUPT STATUS REGISTER NO SETTING ET_CONT BIT CAUSES THE SEQUENCE TO BE CONTINUOUS IS THE CONT_INT BIT SET? YES YES SET THE TOF_EVTMG BIT IN THE INTERRUPT STATUS REGISTER YES SET THE BIT IN THE INTERRUPT STATUS REGISTER NO ASSERT THE INT DEVICE PIN YES NO END Figure 12. EVTMG1 Command www.maximintegrated.com Maxim Integrated 21 MAX35103 The TDC measures the number of 4MHz clock pulses that occur during the 32.768kHz pulses. The measured time of a 32.768kHz clock pulse is reported in the CalibrationInt and CalibrationFrac Results registers. These results can then be used as a gain factor for calculating actual timeto-digital converter measurement if the CAL_USE bit in the Event Timing 2 Register is set. Following is a description of an example calibration. Each TDC measurement is a 15-bit fixed-point integer value concatenated with a 16-bit fractional value binary representation of the number of t4MHz periods that contribute to the time result, the actual period of t4MHz needs to be known. If the CAL_PERIOD[3:0] bits in the Calibration and Control register are set to 6, then 6 measurements of 32.768kHz periods are measured by the TDC and then averaged. The expected measured value would be 30.5176s/250ns = 122.0703125 t4MHz periods. Assume that the 4MHz ceramic resonator is actually running at 4.02MHz. The TDC measurement unit would then measure 30.5176s/248.7562ns = 122.6806641 t4MHz periods and this result would be returned in the Calibration Results register. For all TDC measurements, a gain value of 122.0703125/122.6806641 = 0.995024876 would then be applied. Calibration is performed at the following events: When the Calibration command is sent to the MAX35103. At the completion of this calibration, the CAL bit in the Interrupt Status register and the INT pin asserts (if enabled). Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash bit in the Interrupt Status register is set and the INT pin asserts (if enabled). RTC, Alarm, Watchdog, and Tamper Operation RTC Operation The MAX35103 contains a real-time clock that is driven by a 32kHz oscillator. The time and calendar information is obtained by reading the appropriate register words. The time and calendar are set or initialized by writing the appropriate register words. The contents of the time and calendar registers are in the Binary-Coded Decimal (BCD) format. The clock/calendar provides hundredths of seconds, tenths of seconds, seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year valid up to 2100. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator. The MAX35103 real-time clock can be programmed for either 12-hour or 24-hour formats. If using the 24-hour format, Bit6 (12 HR MODE) of the Mins_Hrs register should be cleared to 0 and then Bit5 represents the 20-hour indicator. If using the 12-hour format, Bit6 should be set to 1 and Bit5 represents AM (if 0) or PM (if 1). The day-of-week register increments at midnight. Values that correspond to the day of week are user defined but must be sequential (i.e., if 0 equals Sunday, then 1 equals Monday, and so on). Illogical time and date entries result in undefined operation. Alarm Operation During event timing operation, automatic calibrations can be performed before executing TOF or temperature measurements. This is selectable with the CAL_ CFG[2:0] bits in the Event Timing 2 register. Upon completion of an automatic calibration during event timing, the result is updated in the Calibration Results register, but the CAL bit in the Interrupt Status register is not set and the INT pin does not assert. The MAX35103 real-time clock provides one programmable alarm. The alarm is activated when either the AM1 or AM2 bits in the Real-Time Clock register are set. Based upon these bits, an alarm can occur when either the minutes and/or hours programmed in the Alarm register match the current value in the Mins_Hrs register. When an alarm occurs, the AF bit in the Interrupt Status register is set and the INT device pin asserts (if enabled). Error Handling During Calibration For proper alarm function, programming of the ALARM register HOURS bits must match the format (12- or 24-hour modes) used in the Mins_Hrs register. Since calibration can be set to be automatic by configuring the CAL_CFG[2:0] bits in the Event Timing 2 register, any errors that occur during the Calibrate command stop the CalibrationInt and the CalibrationFrac Results registers from being updated with new calibration coefficients. The results for the previous Calibration data remain in these two registers and are used for scaling measured results. If the calibration error is caused by the internal calibration time measurement exceeding the time set by the TIMOUT[2:0] bits in the TOF2 register, then the TO www.maximintegrated.com Watchdog Operation The MAX35103 also contains a watchdog alarm. The Watchdog Alarm Counter register is a 16-bit BCD counter that is programmable in 10ms intervals from 0.01s to 99.99s. A seed value may be written to this register representing the start value for the countdown. The watchdog counter begins decrementing when the WD_EN bit in the RTC register is set. Maxim Integrated 22 MAX35103 An immediate read of Watchdog Alarm Counter register returns the value just written. A read after a wait duration causes a value seed minus wait to be returned. For example if the seed value was 28.01s, an immediate read returns 28.01. A read after a 4s returns 24.01s. The value read out for any read operation is a snapshot obtained at the instant of a serial read operation. A write operation to the Watchdog Alarm Counter register causes a reload with the newly written seed. When the watchdog is enabled and a nonzero value is written into the Watchdog Alarm Counter register, the Watchdog Alarm Counter register decrements every 1/100s, until it reaches zero. At this point, the WF bit in the Real-Time Clock register is set and the WDO pin asserts low for typically 250ms. At the end of the pulse, the WDO pin becomes high impedance. The WF flag remains set until cleared by writing WF to a logic 0 in the Real-Time Clock register. If the WF bit is cleared while the WDO device pin is being held low, the WDO device pin is immediately released to its highimpedance state. Writing a seed value of 0 does not cause the WF bit to assert. Tamper Detect Operation The MAX35103 provides a single input that can be connected to a device case switch and used for tamper detection. Upon detection of a case switch event the CSWA in the Control register and the CSWI bit in the Interrupt Status register is set and the INT device pin is asserted (if enabled). Device Interrupt Operations The MAX35103 is designed to optimize the power efficiency of a flow metering application by allowing the host microprocessor to remain in a low-power sleep mode, instead of requiring the microprocessor to keep track of complex real-time events being performed by the MAX35103. Upon completion of any command, the MAX35103 alerts the host microprocessor using the INT pin. The assertion of the INT pin can be used to awaken www.maximintegrated.com Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash the host microprocessor from its low power mode. Upon receiving an interrupt on the INT pin, the host microprocessor should read the Interrupt Status Register to determine which tasks were completed. Interrupt Status Register The interrupt status register contains flags for all for all commands and events that occur within the MAX35103. These flags are set when the event occurs or at the completion of the executing command. When the Interrupt Status Register is read, all asserted bits are cleared. If another interrupt source has generated an interrupt during the read, these new flags assert following the read. INT Pin The INT pin asserts when any of the bits in the Interrupt Status register are set. The INT pin remains asserted until the Interrupt Status register is read by the user and all bits in this register are clear. In order for the INT pin to operate, it must first be enabled by setting the INT_EN bit in the Calibration and Control register. Serial Peripheral Interface Operation Four pins are used for SPI-compatible communications: DOUT (serial-data out), DIN (serial-data in), CE (chip enable), and SCK (serial clock). DIN and DOUT are the serial data input and output pins for the devices, respectively. The CE input initiates and terminates a data transfer. SCK synchronizes data movement between the master (microcontroller) and the slave (MAX35103). The SCK, which is generated by the microcontroller, is active only when CE is low and during opcode and data transfer to any device on the SPI bus. The inactive clock polarity is logic-low. DIN is latched on the falling edge of SCK. There is one clock for each bit transferred. Opcode bits are transferred in groups of eight, MSB first. Data bits are transferred in groups of sixteen, MSB first. The serial peripheral interface is used to access the features and memory of the MAX35103 using an opcode/ command structure. Maxim Integrated 23 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Opcode Commands Table 2 shows the opcode/commands that are supported by the device. Table 2. Opcode Commands GROUP Execution Opcode Commands COMMAND ADDRESS FIELD TOF_Up 00h N/A TOF_Down 01h N/A TOF_Diff 02h N/A Temperature 03h N/A Reset 04h N/A Initialize 05h N/A Transfer Configuration to FLASH 06h N/A EVTMG1 07h N/A EVTMG2 08h N/A EVTMG3 09h N/A HALT 0Ah N/A LDO_Timed 0Bh N/A LDO_ON 0Ch N/A LDO_OFF 0Dh N/A Calibrate 0Eh N/A Read Register B0h thru FFh. Each hex value represents the location of a single 16-bit register Register Opcode Commands N/A 90h 0000h - 1FFFh 8 Kbytes Even Only Write FLASH 10h 0000h - 1FFFh 8 Kbytes Even Only Block Erase FLASH 13h 0000h - 1FFFh www.maximintegrated.com TOF_UP Command (00h) The TOF_UP command generates a single TOF measurement in the upstream direction. Pulses launch from the LAUNCH_UP pin and are received by the STOP_UP pin. The measured hit results are reported in the HITxUPInt and HITxUPFrac registers, with the calculated average of all the measured hits being reported in the AVGUPInt and AVGUPFrac register. The t1/t2 and t2/tideal wave ratios are reported in the WVRUP register. Once all these results are stored, then the TOF bit in the Interrupt Status register is set and the INT pin asserts (if enabled). Note: The TOF_UP command yields a result that is only of use when used in conjunction with the TOF_DN command. Absolute TOF measurements include circuit delays and cannot be considered accurate. Figure 13 EXECUTION OPCODE COMMANDS CE 1 2 3 4 5 6 7 SCK N/A Read FLASH The device supports several single byte opcode commands that cause the MAX35103 to execute various routines. All commands have the same SPI protocol sequence as shown in Figure 13. Once all 8 bits of the opcode are received by the MAX35103 and the CE device pin is deasserted, the MAX35103 begins execution of the specified command as described in that Command's description. 0 30h thru 43h. Each hex value represents the location of a single 16-bit register Write Register FLASH Opcode Commands OPCODE FIELD (HEX) Execution Opcode Commands DIN O O MSB 8 BITS LSB OPCODE DOUT HIGH IMPEDANCE Figure 13. Execution Opcode Command Protocol Maxim Integrated 24 MAX35103 TOF_Down Command (01h) The TOF_DOWN command generates a single TOF measurement in the downstream direction. Pulses launch from the LAUNCH_DN pin and are received by the STOP_DN pin. The measured hit results are reported in the HITxDnInt and HITxDnFrac registers, with the calculated average of all the measured hits being reported in the AVGDNInt and AVGDNFrac register. The t1/t2 and t2/ tideal wave ratios are reported in the WVRDN register. Once all these results are stored, then the TOF bit in the Interrupt Status register is set and the INT pin asserts (if enabled). Note: The TOF_Down command yields a result that is only of use when used in conjunction with the TOF_UP command. Absolute TOF measurements include circuit delays and cannot be considered accurate. TOF_DIFF Command (02h) The TOF_DIFF command performs back-to-back TOF_ UP and TOF_DN measurements as required for a metering application. The TOF_UP sequence is followed by the TOF_DN sequence. The time between the start of the TOF_UP measurement and the start of the TOF_DN measurement is set by the TOF_CYC[2:0] bits in the TOF2 register. Upon completion of the TOF_DN measurement, the results of AVGUP minus AVGDN is computed and stored at the TOF_DIFFInt and TOF_DIFFFrac Results register locations. Once these results are stored, then the TOF bit in the Interrupt Status register is set and the INT pin asserts (if enabled). Temperature Command (03h) The temperature command initiates a temperature measurement sequence as described in the Temperature Measurement Operations section. The characteristics the temperature measurement sequence depends upon the settings in the Event Timing 1 register, and Event Timing 2 register. Once all the measurements are completed, the times measured for each port are reported in the corresponding TxInt and TxFrac Results registers. The TE bit in the Interrupt Status register also is set and the INT pin asserts (if enabled). Reset Command (04h) The reset command essentially performs the same function as a power-on reset (POR), and causes all of the Configuration registers to be set to their prior programmed www.maximintegrated.com Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash values stored in flash and all of the Results registers and the Interrupt Status register to be cleared and set to zero. Initialize Command (05h) The initialize command must be executed after all configuration of the device is complete and the transfer configuration to flash command has been executed. The initialize command starts the time-to-digital converter so that TOF and temperature commands can be executed and also recalls all of the Configuration register settings from flash. The MAX35103 sets the INIT bit in the Interrupt Status register and asserts the INT device pin (if enabled) to tell the host microprocessor that the initialize command has completed and the next desired command can be sent to the MAX35103. Transfer Configuration to Flash Command (06h) This command causes the Configuration register map to be transferred to flash for nonvolatile (NV) storage. The MAX35103 automatically turns on the LDO for the duration of this transfer. Upon device reset, the content of this flash restores the Configuration registers. This flash is not part of the 8KB array, and is reserved solely for the transfer configuration to the flash command. The MAX35103 sets the flash bit in the Interrupt Status register and asserts the INT device pin (if enabled) to tell the host microprocessor that the transfer configuration to the flash command has completed and the next command can be sent to the device. EVTMG1 Command (07h) The EVTMG1 command initiates the event timing mode 1 advanced automatic measurement feature. This timing mode performs automatic TOF_DIFF and Temperature measurements as described in the Event Timing Operation section. The duration of the automatic measurements depends upon the settings in the Event Timing 1 register, Event Timing 2 register, CONT_INT and ET_ CONT bits in the Calibration and Control register. EVTMG2 Command (08h) The EVTMG2 command initiates the event timing mode 2 advanced automatic measurement feature. This timing mode performs automatic TOF_DIFF measurements as described in the Event Timing Operation section. The duration of the automatic measurements depends upon the settings in the Event Timing 1 register, CONT_INT and ET_CONT bits in the Calibration and Control register. Maxim Integrated 25 MAX35103 EVTMG3 Command (09h) The EVTMG3 command initiates the event timing mode 3 advanced automatic measurement feature. This timing mode performs automatic temperature measurements as described in the Event Timing Operation section. The duration of the automatic measurements depends upon the settings in the Event Timing 1 register, Event timing 2 register, CONT_INT and ET_CONT bits in the Calibration and Control register. HALT Command (0Ah) The HALT command is sent to the MAX35103 to stop any of the three EVTMG1/2/3 commands. All register data content is frozen and the SPI is then made available for access by the host microcontroller for commands, memory access, and register access. The HALT command takes time to execute. Since the EVTMGx commands are comprised of multiple TOF_DIFF and Temperature commands, the HALT command causes the MAX35103 to evaluate its own state and complete the currently executing TOF_DIFF or temperature command. Once the HALT command has completed, all registers update and the MAX35103 sets the halt bit in the Interrupt Status register and then asserts the INT device pin (if enabled). The host microprocessor reads the Interrupt Status register to determine the interrupt source. LDO_Timed Command (0Bh) To access the flash memory, the internal low-dropout voltage regulator that powers the flash circuitry must be enabled. By sending the LDO_Timed command to the MAX35103 prior to the desired flash access command (read, write, block erase), the internal regulator is enabled and powers the flash circuitry. The LDO bit is set in the Interrupt Status register and the INT device pin asserts (if enabled) when the internal regulator has been turned on and is stable which takes approximately tSTABLE. The host microprocessor, upon detection of the asserted INT device pin, should read the Interrupt Status register LDO bit to determine that the internal regulator is stable and the flash is now ready to be accessed. The internal regulator remains enabled for a continuous period until the CE device pin is deasserted after any flash command (read, write, block erase). The LDO_Timed command is used in place of the LDO_ON command when a data access to the flash is required in a short burst. This minimizes SPI access since the LDO_OFF command is not required to be sent to the MAX35103 to turn off the internal regulator. www.maximintegrated.com Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash LDO_ON Command (0Ch) To access the flash memory, the internal low-dropout voltage regulator that powers the flash circuitry must be enabled. By sending the LDO_ON command to the MAX35103 prior to the desired flash access command (read, write, block erase), the internal regulator is enabled and powers the flash circuitry. The LDO bit is set in the Interrupt Status register and the INT device pin asserts (if enabled) when the internal regulator has been turned on and is stable which takes approximately tSTABLE. The host microprocessor, upon detection of the asserted INT device pin, should read the Interrupt Status register LDO bit to determine that the internal regulator is stable and the flash is now ready to be accessed. The internal regulator remains enabled for a continuous period until the LDO_OFF command is received by the MAX35103. The LDO_ON command is generally used when the host microprocessor needs to perform multiple-word writes to the MAX35103 since multiple-word writes require that the CE device pin be toggled after every word of data written. The LDO_ON command prevents the LDO from automatically disabling itself after each transition of the CE device pin. LDO_OFF Command (0Dh) To access the flash memory, the internal low-dropout voltage regulator that powers the flash circuitry must be enabled. By sending the LDO_OFF command to the MAX35103, the internal regulator is disabled and the Interrupt Status register LDO bit is cleared. The INT device pin is not asserted. The LDO_OFF command is used in conjunction with the LDO_ON command. Calibrate Command (0Eh) The calibrate command performs the calibration routine as described in the calibration operation section. When the calibrate command has completed the measurement, the Calibration Results register contains the measured 32kHz period measuremnt value, the MAX35103 sets the calibration bit in the Interrupt Status register and then asserts the INT device pin (if enabled). The host microprocessor reads the Interrupt Status register to determine the interrupt source and then read the Calibration Results register to be able to calculate the 4MHz ceramic oscillator gain factor. Maxim Integrated 26 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Register Opcode Commands of the data register that is addressed in the opcode, and continues with each SCK rising edge until the CE device pin is deasserted as shown in Figure 15. The address counter automatically increments. To manipulate the register memory, there are two commands supported by the device: Read Register and Write register. Each register accessed with these commands is 16 bits in length. These commands are used to access all sections of the memory map including the RTC and Watchdog registers, Configuration registers, Conversion Results registers, and Status registers. The Conversion Results registers and the Interrupt Status register of the Status registers are all read only. Write Register Command This command applies to all writable registers. See the Register Memory Map for more detail. The SPI protocol sequence is shown in Figure 16. The write register command can also be used to write consecutive addresses. In this case, the data bits are continuously received on the DIN device pin and bound for the initial starting address register that is addressed in the opcode. The address counter automatically increments after each 16 bits of data if the SCK device pin is continually clocked and the CE device pin remain asserted as shown in Figure 17. Read Register Command The opcode must be clocked into the DIN device pin before the DOUT device pin produces the register data. The SPI protocol sequence is shown in Figure 14. The read register command can also be used to read consecutive addresses. In this case, the data bits are continuously delivered in sequence starting with the MSB Figure 14 READ REGISTER COMMAND CE 0 1 2 3 4 5 6 7 8 9 10 19 20 21 D D 22 23 SCK DIN O O MSB 8 BITS LSB DATA 16 BITS OPCODE HIGH IMPEDANCE DOUT D MSB D D D D D D HIGH IMPEDANCE LSB Figure 14. Read Register Opcode Command Protocol www.maximintegrated.com Maxim Integrated 27 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Figure 15 CONTINUOUS READ REGISTER COMMAND CE SCK DIN 0 1 2 3 4 5 6 7 8 9 10 19 20 21 22 23 24 25 26 27 39 40 41 42 43 O O MSB LSB 8 BITS DATA 16 BITS OPCODE D HIGH IMPEDANCE DOUT D D D D DATA 16 BITS D D D MSB D D D D D D LSB MSB D D HIGH IMPEDANCE LSB Figure 15. Continuous Read Register Opcode Command Protocol Figure 16 WRITE REGISTER COMMAND CE 0 SCK DIN 1 2 3 4 5 7 O O MSB 6 8 BITS OPCODE DOUT 8 D 9 D 10 D 19 D D LSB MSB 20 D 21 D 22 D 23 D LSB DATA 16 BITS HIGH IMPEDANCE Figure 16. Write Register Opcode Command Protocol www.maximintegrated.com Maxim Integrated 28 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Figure 17 CONTINUOUS WRITE REGISTER COMMAND CE SCK DIN 0 1 2 3 4 O MSB 5 6 7 O 8 BITS OPCODE DOUT 8 D 9 D 10 D 19 D D 20 D 21 D LSB MSB 22 D 24 23 D D 25 D 26 D 27 D LSB MSB DATA 16 BITS 39 D D D LSB DATA 16 BITS HIGH IMPEDANCE Figure 17. Continuous Write Register Opcode Command Protocol Register Memory Map These registers are accessed by the read register command and the Write Register command: "X" represents a reserved bit. Following a reset, all configuration variables are recalled from flash. The factory-stored flash default value for all configuration registers except TOF1 is 0000h. www.maximintegrated.com The factory-stored flash configuration for TOF1 is 0010h. After a transfer to configuration to flash command, the new user configuration data is recalled from flash after a reset. The RTC register, Results registers, Interrupt Status, and Control registers are all 0000h following a reset. Maxim Integrated 29 NAME www.maximintegrated.com 31h 32h 33h 34h 35h B1h B2h B3h B4h B5h Alarm Counter Alarm Watchdog Year Month_ Day_Date Mins_Hrs Seconds 10-Minutes Tenths of Seconds 10-Month 10-Minutes Tenths of Seconds Day Minutes Hundredths of Seconds Month Minutes Hundredth Seconds BITS[15:8] 0 0 20hr/AM/PM 12hr 20hr/AM/PM 10 Seconds 10-Year 10-Date 12hr 10 Seconds 10hr 10hr BITS[7:0] Alarm Hours Seconds Year Date Hours Seconds 3Ah 3Bh 3Ch 3Dh BAh BBh BCh BDh 3Fh 39h B9h BFh 38h B8h 3Eh 37h B7h BEh 36h B6h Timing 1 Event TOF7 TOF6 TOF5 TOF4 TOF3 TOF2 TOF1 1 2 TDF3 TDF2 RDN6 RDN7 C_OF C_OF FSET RUP6 RUP7 FSET FSET C_OF C_OF FSET X X X X X STOP STOP X PL6 PL7 TDF1 RDN5 FSET C_OF RUP5 FSET TDF0 RDN4 FSET C_OF RUP4 FSET C_OF Hit5 WV4 Hit5 WV5 C_OF Hit3 WV4 Hit3 WV5 Hit1 WV4 Hit1 WV5 5 T2WV PL4 0 STOP PL5 TDM4 RDN3 FSET C_OF RUP3 FSET C_OF WV3 Hit5 WV3 Hit3 WV3 Hit1 4 T2WV PL3 TDM3 RDN2 FSET C_OF RUP2 FSET C_OF WV2 Hit5 WV2 Hit3 WV2 Hit1 3 T2WV PL2 TDM2 RDN1 FSET C_OF RUP1 FSET C_OF WV1 Hit5 WV1 Hit3 WV1 Hit1 2 T2WV PL1 TDM1 RDN0 FSET C_OF RUP0 FSET C_OF WV0 Hit5 WV0 Hit3 WV0 Hit1 1 T2WV PL0 TDM0 DN7 FSET C_OF UP7 FSET C_OF X X X T2WV0 DPL3 Reserved Reserved TMF5 DN6 FSET C_OF UP6 FSET C_OF X X X CYC2 TOF_ DPL2 TMF4 DN5 FSET C_OF UP5 FSET C_OF WV5 Hit6 WV5 Hit4 WV5 Hit2 CYC1 TOF_ DPL1 TMF3 DN4 FSET C_OF UP4 FSET C_OF WV4 Hit6 WV4 Hit4 WV4 Hit2 CYC0 TOF_ DPL0 TMF2 DN3 FSET C_OF UP3 FSET C_OF WV3 Hit6 WV3 Hit4 WV3 Hit2 P_DN EN_U _POL STOP TMF1 DN2 FSET C_OF UP2 FSET C_OF WV2 Hit6 WV2 Hit4 WV2 Hit2 OUT2 TIM X TMF0 DN1 FSET C_OF UP1 FSET C_OF WV1 Hit6 WV1 Hit4 WV1 Hit2 OUT1 TIM CT1 These registers are restored from flash memory upon device reset. These registers are written to flash memory upon the issuance of the transfer configuration to flash command. CONFIGURATION REGISTERS 30h B0h RTC AND WATCHDOG REGISTERS WRITE OPCODE READ OPCODE Table 3. Register Memory Map 8XS DN0 FSET C_OF UP0 FSET C_OF WV0 Hit6 WV0 Hit4 WV0 Hit2 OUT0 TIM CT0 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Maxim Integrated 30 www.maximintegrated.com 40h 41h 42h 43h C0h C1h C2h C3h Clock Real-Time and Control Calibration ment Delay Measure- TOF Timing 2 Event NAME CFh CEh CDh CCh CBh CAh C9h C8h C7h C6h C5h C4h Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read CONVERSION RESULTS REGISTERS WRITE OPCODE READ OPCODE Hit6UpInt Hit5UpFrac Hit5UpInt Hit4UpFrac Hit4UpInt Hit3UpFrac Hit3UpInt Hit2UpFrac Hit2UpInt X X DLY14 TMM3 Hit1UpFrac Hit1UpInt WVRUP X X DLY15 TMM4 X X LY13 TMM2 X X DLY12 TMM1 X EN CMP_ DLY11 TMM0 BITS[15:8] Table 3. Register Memory Map (continued) X SEL CMP_ DLY10 Use Cal_ Cal_ X EN INT_ DLY9 AUTO Cal_ X CONT ET_ DLY8 CFG1 Cal_ X _INT CONT DLY7 CFG0 BP 32K_ S2 CLK_ DLY6 TP1 EN 32K_ S1 CLK_ DLY5 TP0 EOSC S0 CLK_ DLY4 YC2 PREC AM2 eriod3 Cal_P DLY3 YC1 PREC BITS[7:0] AM1 eriod2 Cal_P DLY2 YC0 PREC WF eriod1 Cal_P DLY1 CYC1 PORT EN WD_ eriod0 Cal_P DLY0 CYC0 PORT MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Maxim Integrated 31 www.maximintegrated.com E0h DFh DEh DDh DCh DBh DAh D9h D8h D7h D6h D5h D4h D3h D2h D1h D0h Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read WRITE OPCODE READ OPCODE NAME AVGDNInt Hit6DnFrac Hit6DnInt Hit5DnFrac Hit5DnInt Hit4DnFrac Hit4DnInt Hit3DnFrac Hit3DnInt Hit2DnFrac Hit2DnInt Hit1DnFrac Hit1DnInt WVRDN AVGUPFrac AVGUPInt Hit6UpFrac BITS[15:8] Table 3. Register Memory Map (continued) BITS[7:0] MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Maxim Integrated 32 www.maximintegrated.com F1h F0h EFh EEh EDh ECh EBh EAh E9h E8h E7h E6h E5h E4h E3h E2h E1h Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read WRITE OPCODE READ OPCODE NAME T1_AVGFrac T1_AVGInt Temp_Cycle_Count T4Frac T4Int T3Frac T3Int T2Frac T2Int T1Frac T1Int TOF_DIFF_AVGFrac TOF_DIFF_AVGInt TOF_Cycle_Count TOF_DIFFFrac TOF_DIFFInt AVGDNFrac BITS[15:8] Table 3. Register Memory Map (continued) BITS[7:0] MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Maxim Integrated 33 www.maximintegrated.com Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read FFh FEh Only Control Status Read Interrupt Only NAME Read STATUS REGISTERS FDh FCh FBh FAh F9h F8h F7h F6h F5h F4h F3h F2h WRITE OPCODE READ OPCODE X TO Reserved Reserved Reserved Reserved X AF CalibrationFrac CalibrationInt T4_AVGFrac T4_AVGInt T3_AVGFrac T3_AVGInt T2_AVGFrac T2_AVGInt X X X TOF X TE BITS[15:8] Table 3. Register Memory Map (continued) X LDO TOF_ AFA EVTMG TEMP_ CSWA EVTMG X FLASH X CAL X HALT X CSWI X INIT BITS[7:0] X POR X X X X MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Maxim Integrated 34 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash RTC and Watchdog Register Descriptions Table 4. RTC Seconds Register WRITE OPCODE 30h Bit READ OPCODE B0h 15 14 Name 13 FLASH STORED No 12 11 Tenths of Seconds Bit 7 Name 0 BIT 6 5 DEFAULT VALUE 0000h 10 9 8 Hundredths of Seconds 4 3 2 10 Seconds 1 0 Seconds NAME DESCRIPTION 15:12 Tenths of Seconds Range 0 to 9 11:8 Hundredths of Seconds Range 0 to 9 7 0 6:4 10 Second Range 0 to 5 3:0 Seconds Range 0 to 9 This bit always returns 0 Table 5. RTC Mins_Hrs Register WRITE OPCODE 31h READ OPCODE B1h 14 13 FLASH STORED No Bit 15 12 Name 0 Bit 7 6 5 4 Name 0 12/24 20HR/AM/PM 10HR 11 DEFAULT VALUE 0000h 10 10 Minutes BIT NAME 15 0 14:12 10 Minutes Range 0 to 5 11:8 Minutes Range 0 to 9 7 0 www.maximintegrated.com 9 8 1 0 Minutes 3 2 Hours DESCRIPTION This bit always returns 0 This bit always returns 0 Maxim Integrated 35 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 5. RTC Mins_Hrs Register (continued) BIT NAME 6 12/24 DESCRIPTION 1 = 12-hour mode 0 = 24-hour mode In 12-hour mode 1 = PM 0 = AM In 24-hour mode: 20-hour digit 5 20HR/AM/PM 4 10HR Range 0 to 1 3:0 Hours Range 0 to 9 Table 6. RTC Day_Date Register WRITE OPCODE 32h READ OPCODE B2h FLASH STORED No Bit 15 14 13 12 11 Name 0 0 0 0 0 Bit 7 6 5 4 3 Name 0 0 BIT 10 Date NAME 10 9 8 Day 2 1 0 Date DESCRIPTION 15:11 0 10:8 Day 7:6 0 5:4 10 Date Range 0 to 3 3:0 Date Range 0 to 9 www.maximintegrated.com DEFAULT VALUE 0000h These bits always return 0 Range 0 to 7 These bits always return 0 Maxim Integrated 36 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 7. RTC Month_Year Register WRITE OPCODE 33h READ OPCODE B3h FLASH STORED No Bit 15 14 13 12 Name 0 0 0 10 Month Bit 7 6 5 4 Name DEFAULT VALUE 0000h 11 10 9 8 1 0 Month 3 2 10 Year Year BIT NAME DESCRIPTION 15:13 0 12 10 Month Range 0 to 1 11:8 Month Range 0 to 9 7:4 10 Year Range 0 to 9 3:0 Year Range 0 to 9 These bits always return 0 Table 8. Watchdog Alarm Counter Register WRITE OPCODE 34h 15 Bit 14 13 FLASH STORED No 12 11 Tenths of Seconds Name 7 Bit READ OPCODE B4h 6 5 DEFAULT VALUE 0000h 10 BIT NAME 15:12 Tenths of Seconds Range 0 to 9 11:8 Hundredths of Seconds Range 0 to 9 7:4 10 Second Range 0 to 9 3:0 Seconds Range 0 to 9 www.maximintegrated.com 8 Hundredths of Seconds 4 3 2 10 Seconds Name 9 1 0 Seconds DESCRIPTION Maxim Integrated 37 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 9. Alarm Register WRITE OPCODE 35h Bit 15 Name X READ OPCODE B5h 14 13 FLASH STORED No 12 11 10 10 Minutes 9 8 1 0 Minutes Bit 7 6 5 4 Name X 12/24 20HR/AM/PM 10HR BIT DEFAULT VALUE 0000h 3 NAME 2 Hours DESCRIPTION 15 X 14:12 10 Minutes Reserved Range 0 to 5 11:8 Minutes Range 0 to 9 7 X 6 12/24 Reserved 1 = 12-hour mode 0 = 24-hour mode In 12-hour mode 1 = PM 0 = AM In 24-hour mode: 20-hour digit 5 20HR/AM/PM 4 10HR Range 0 to 1 3:0 Hours Range 0 to 9 Configuration Register Descriptions Table 10. TOF1 Register WRITE OPCODE 38h Bit Name Bit Name READ OPCODE B8h FLASH STORED Yes FACTORY-STORED FLASH VALUE 0010h 15 14 13 12 11 10 9 8 PL7 PL6 PL5 PL4 PL3 PL2 PL1 PL0 7 6 5 4 3 2 1 0 DPL3 DPL2 DPL1 DPL0 STOP_POL X CT1 CT0 www.maximintegrated.com Maxim Integrated 38 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 10. TOF1 Register (continued) BIT 15:8 NAME PL[7:0] DESCRIPTION Pulse Launcher Size: This is a hex value that defines the number of pulses that will be launched from the pulse launcher during transmission. The range of this hex value is 00h to FFh. When PL[7:0] is set to 00h, the Pulse Launcher is disabled. Up to 127 pulses can be launched. When PL7 is set, the pulse count is clamped at 127. Pulse Launch Divider: This is a hex value that defines the divider ratio of the internal clock signal used to drive the Pulse Launch signal. The 4MHz external reference oscillator is used as the source for the internal clock reference. The internal reference clock is first divided by 2 to produce a 2MHz clock. The range of this hex value is 1h to Fh, resulting in a range of division from /2 to /16 of the 2MHz clock. A value of 0h is not supported and should not be programmed Pulse Launch Frequency = 2MHz/(1+DPL[3:0]) 7:4 DPL[3:0] 3 STOP_POL 2 X DPL[3:0] PULSE LAUNCH FREQUENCY 0000b RESERVED 0001b 1MHz 0002b 666kHz .... .... 1110b 133.33kHz 1111b 125kHz Stop Polarity: This bit defines the edge sensitivity of the STOP_UP and STOP_DN channel. The signal received on the STOP_UP and STOP_DN device pins will generate a stop condition for the internal TDC time count on the rising slope of this signal if this bit is set to 0. The signal received on the STOP_UP and STOP_DN device pins will generate a stop condition for the internal TDC time count on the falling slope of this signal if this bit is set to 1. Reserved Bias Charge Time: This is the time allotted for charging the external bias network on the STOP pins to produce common mode biasing for the analog receiver/comparator. It is based upon the 32.768 KHz crystal: DESCRIPTION 1:0 CT[1:0] www.maximintegrated.com CT1 CT2 32kHz CLOCK CYCLES (decimal) 0 0 2 61 0 1 4 122 1 0 8 244 1 1 16 488 TYPICAL TIME (s) Maxim Integrated 39 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 11. TOF2 Register WRITE OPCODE 39h Bit Name Bit Name BIT READ OPCODE B9h FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h 15 14 13 12 11 10 9 8 STOP2 STOP1 STOP0 T2WV5 T2WV4 T2WV3 T2WV2 T2WV1 7 6 5 4 3 2 1 0 T2WV0 TOF_CYC2 TOF_CYC1 TOF_CYC0 X TIMOUT2 TIMOUT1 TIMOUT0 NAME DESCRIPTION Stop Hits: These bits set the number of stop hits to be expected and measured. 15:13 STOP[2:0] STOP2 STOP1 STOP0 DESCRIPTION 0 0 0 1 Hit 0 0 1 2 Hits 0 1 0 3 Hits 0 1 1 4 Hits 1 0 0 5 Hits 1 0 1 6 Hits 1 1 0 6 Hits 1 1 1 6 Hits Wave Selector for t2: These bits determine the wave number for which t2 is measured. To ensure measurement accuracy, the first wave measurable after the early edge detect is wave 2. Waves are numbered as depicted in Figure 5. 12:7 T2WV[5:0] www.maximintegrated.com T2WV[5:0] (decimal) DESCRIPTION 0 through 2 Wave 2 3 Wave 3 4 Wave 4 5 through 63 Wave 5 through 63 Maxim Integrated 40 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 11. TOF2 Register (continued) TOF Duty Cycle: These bits determine the time delay between successive executions of TOF measurements. It is the start-to-start time of automatic execution of the TOF_UP and the TOF_DN and is applicable only for the TOF_DIFF command. It is based upon the 32.768kHz crystal. If the actual TOF of the acoustic path exceeds the programmed start-to-start time in this setting, then the TOF duty cycle performs as if the bit setting is 000b. DESCRIPTION 6:4 3 TOF_CYC[2:0] X TOF_CYC[2:0] 32kHz CLOCK CYCLES (decimal) TYPICAL TIME 4MHz ON BETWEEN TOF_ UP and TOF_DOWN 000b 0 0s Yes 001b 4 122s Yes 010b 8 244s Yes 011b 16 488s Yes 100b 24 732s Yes 101b 32 976s Yes 110b 546 16.65ms No 111b 655 19.97ms No Reserved Timeout: These bits force a timeout in the time-to-digital measurement block. If the hit required to measure t1, t2, or Hit1 through Hit6 of the received signal does not occur in this time, the TO bit in the Interrupt Status register is set and the INT pin is asserted (if enabled). Additionally, any of the Conversion Results registers read FFFFh if the data for that register is invalid. 2:0 TIMOUT[2:0] www.maximintegrated.com TIMOUT2 TIMOUT1 TIMOUT0 DESCRIPTION (s) 0 0 0 128 0 0 1 256 0 1 0 512 0 1 1 1024 1 0 0 2048 1 0 1 4096 1 1 0 8192 1 1 1 16384 Maxim Integrated 41 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 12. TOF3 Register WRITE OPCODE 3Ah READ OPCODE BAh FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h Bit 15 14 13 12 11 10 9 8 Name X X HIT1WV5 HIT1WV4 HIT1WV3 HIT1WV2 HIT1WV1 HIT1WV0 Bit 7 6 5 4 3 2 1 0 Name X X HIT2WV5 HIT2WV4 HIT2WV3 HIT2WV2 HIT2WV1 HIT2WV0 BIT NAME 15:14 X 13:8 7:6 HIT1WV[5:0] X DESCRIPTION Reserved Hit1 Wave Select: These bits select the wave number for which the Hit1 stop time is measured. Wave numbers are depicted in Figure 5. The Hit1 wave select value must be at least 1 greater than the wave selected for t2, which is configured in the TOF2 register. For example, if the wave selector for t2 is set to wave number 7, then the Hit1 wave select must be set to delect wave number 8 or greater. The earliest wave for which Hit1 can be measured is wave 3. HIT1WV[5:0] (decimal) DESCRIPTION 0 through 3 Wave 3 4 Wave 4 5 Wave 5 6 through 63 Wave 6 through 63 Reserved Hit2 Wave Select: These bits select the wave number for which the Hit2 stop time is measured. Wave numbers are depicted in Figure 5. The Hit2 wave select value must be at least 1 greater than the Hit1 wave select value. For example, if Hit1 wave select value is set to measure wave number 9, then the Hit2 wave select must be set to detect wave number 10 or greater. The earliest wave for which Hit2 can be measured is Wave 4. 5:0 HIT2WV[5:0] www.maximintegrated.com HIT2WV[5:0] (decimal) DESCRIPTION 0 through 4 Wave 4 5 Wave 5 6 Wave 6 7 through 63 Wave 7 through 63 Maxim Integrated 42 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 13. TOF4 Register WRITE OPCODE 3Bh READ OPCODE BBh FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h Bit 15 14 13 12 11 10 9 8 Name X X HIT3WV5 HIT3WV4 HIT3WV3 HIT3WV2 HIT3WV1 HIT3WV0 Bit 7 6 5 4 3 2 1 0 Name X X HIT4WV5 HIT4WV4 HIT4WV3 HIT4WV2 HIT4WV1 HIT4WV0 BIT NAME 15:14 X DESCRIPTION Reserved Hit3 Wave Select: These bits select the wave number for which the Hit3 stop time is measured. Wave numbers are depicted in Figure 5. The Hit3 wave select value must be at least 1 greater than the Hit2 wave select value. For example, if the Hit2 wave select value is set to measure wave number 10, then the Hit3 wave select must be set to detect wave number 11 or greater. The earliest wave for which Hit3 can be measured is wave 5. 13:8 7:6 HIT3WV[5:0] X HIT3WV[5:0] (decimal) DESCRIPTION 0 through 5 Wave 5 6 Wave 6 7 Wave 7 8 through 63 Wave 8 through 63 Reserved Hit4 Wave Select: These bits select the wave number for which the Hit4 stop time is measured. Wave numbers are depicted in Figure 5. The Hit4 wave select value must be at least 1 greater than the Hit3 wave select value. For example, if the Hit3 wave select value is set to measure wave number 11, then the Hit4 wave select must be set to detect wave number 12 or greater. The earliest wave for which Hit4 can be measured is wave 6. 5:0 HIT4WV[5:0] www.maximintegrated.com HIT4WV[5:0] (decimal) DESCRIPTION 0 through 6 Wave 6 7 Wave 7 8 Wave 8 9 through 63 Wave 9 through 63 Maxim Integrated 43 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 14. TOF5 Register WRITE OPCODE 3Ch READ OPCODE BCh FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h Bit 15 14 13 12 11 10 9 8 Name X X HIT5WV5 HIT5WV4 HIT5WV3 HIT5WV2 HIT5WV1 HIT5WV0 Bit 7 6 5 4 3 2 1 0 Name X X HIT6WV5 HIT6WV4 HIT6WV3 HIT6WV2 HIT6WV1 HIT6WV0 BIT NAME 15:14 X DESCRIPTION Reserved Hit5 Wave Select: These bits select the wave number for which the Hit5 stop time is measured. Wave numbers are depicted in Figure 5. The Hit5 wave select value must be at least 1 greater than the Hit4 wave select value. For example, if the Hit4 wave select value is set to measure wave number 12, then the Hit5 wave select must be set to detect wave number 13 or greater. The earliest wave for which Hit5 can be measured is wave 7. 13:8 7:6 HIT5WV[5:0] X HIT5WV[5:0] (decimal) DESCRIPTION 0 through 7 Wave 7 8 Wave 8 9 Wave 9 10 through 63 Wave 10 through 63 Reserved Hit6 Wave Select: These bits select the wave number for which the Hit6 stop time is measured. Wave numbers are depicted in Figure 5. Hit6 wave select value must at least 1 greater than the Hit5 wave select value. For example, if Hit5 wave select value is set to measure wave number 13, then the Hit6 wave select must be set to detect wave number 14 or greater. The earliest wave for which Hit6 can be measured is wave 8. 5:0 HIT6WV[5:0] www.maximintegrated.com HIT6WV[5:0] (decimal) DESCRIPTION 0 through 8 Wave 8 9 Wave 9 10 Wave 10 11 through 63 Wave 11 through 63 Maxim Integrated 44 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 15. TOF6 Register WRITE OPCODE 3Dh Bit READ OPCODE BDh FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h 15 14 13 12 11 10 9 8 C_OFFSET UPR7 C_OFFSET UPR6 C_OFFSET UPR5 C_OFFSET UPR4 C_OFFSET UPR3 C_OFFSET UPR2 C_OFFSET UPR1 C_OFFSET UPR0 Bit 7 6 5 4 3 2 1 0 Name X C_OFFSET UP6 C_OFFSET UP5 C_OFFSET UP4 C_OFFSET UP3 C_OFFSET UP2 C_OFFSET UP1 C_OFFSET UP0 Name BIT NAME DESCRIPTION Comparator Return Offset Upstream: When the device is measuring the t2 wave, the programmed receive comparator offset is returned to a common-mode voltage automatically after the early edge, t1, is detected. The actual offset return voltage is dependent upon and scales with the voltage present at the VCC pins. The following formula defines the comparator return offset voltage setting, where C_OFFSETUPR is a two's-complement number: 15:8 7 C_OFFSETUPR [7:0] X www.maximintegrated.com Comparator Return Offset Voltage = where 1 LSB = VCC 3072 VCC x (1152+C_OFFSETUPR) 3072 C_OFFSETUPR[7:0] OFFSET (LSBs) 7Fh through 01h 127 through 1 00h 0 80h through FFh -128 through -1 Reserved Maxim Integrated 45 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 15. TOF6 Register (continued) BIT 6:0 NAME DESCRIPTION Comparator Offset Upstream: These bits define an initial selected receive comparator offset voltage for the analog receiver comparator front-end. This comparator offset is used to detect the early edge wave, t1. The actual common-mode voltage is dependent upon and scales with the voltage present at the VCC pins. When the STOP_POL bit in the TOF1 register is set to zero indicating a rising edge detection of the zero crossing of the received acoustic wave, then the comparator offset is a positive value. When the STOP_POL bit in the TOF1 register is set to one indicating a falling edge detection of the zero crossing of the received acoustic wave, then the comparator offset is a negative value. The following formulas define the comparator offset voltage setting C_OFFSETUP [6:0] STOP_POL = 0 Comparator Offset Voltage = STOP_POL = 1 Comparator Offset Voltage = where 1 LSB = VCC 3072 (1152 + C OFFSETUP ) 3072 (1151- C OFFSETUP ) VCC x 3072 VCC x C_OFFSETUP[6:0] OFFSET (LSBs) 00h through 7Fh 0 through 127 Table 16. TOF7 Register WRITE OPCODE 3Eh Bit READ OPCODE BEh FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h 15 14 13 12 11 10 9 8 C_OFFSET DNR7 C_OFFSET DNR6 C_OFFSET DNR5 C_OFFSET DNR4 C_OFFSET DNR3 C_OFFSET DNR2 C_OFFSET DNR1 C_OFFSET DNR0 Bit 7 6 5 4 3 2 1 0 Name X C_OFFSET DN6 C_OFFSET DN5 C_OFFSET DN4 C_OFFSET DN3 C_OFFSET DN2 C_OFFSET DN1 C_OFFSET DN0 Name www.maximintegrated.com Maxim Integrated 46 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 16. TOF7 Register (continued) BIT NAME DESCRIPTION Comparator Return Offset Downstream: When the MAX35103 is measuring the t2 wave, the programmed receive comparator offset is returned to a common-mode voltage automatically after the early edge, t1, is detected. The actual offset return voltage is dependent upon and scales with the voltage present at the VCC pins. The following formula defines the comparator return offset voltage setting, where C_OFFSETDNR is a two's-complement number: 15:8 7 6:0 C_OFFSETDNR [7:0] X C_OFFSETDN [6:0] www.maximintegrated.com Comparator Return Offset Voltage = where 1 LSB = VCC 3072 VCC x (1152+C_OFFSETDNR) 3072 C_OFFSETDNR[7:0] OFFSET (LSBs) 7Fh through 01h 127 through 1 00h 0 80h through FFh -128 through -1 Reserved Comparator Offset Downstream: These bits define an initial selected receive comparator offset voltage for the analog receiver comparator front-end. This comparator offset is used to detect the early edge wave, t1. The actual common-mode voltage is dependent upon and scales with the voltage present at the VCC pins. When the STOP_POL bit in the TOF1 register is set to zero indicating a rising edge detection of the zero crossing of the received acoustic wave, then the comparator offset is a positive value. When the STOP_POL bit in the TOF1 register is set to one indicating a falling edge detection of the zero crossing of the received acoustic wave, then the comparator offset is a negative value. The following formulas define the comparator offset voltage setting: STOP_POL = 0 Comparator Offset Voltage = STOP_POL = 1 Comparator Offset Voltage = where 1 LSB = VCC 3072 (1152 + C OFFSETDN ) 3072 (1151- C OFFSETDN ) VCC x 3072 VCC x C_OFFSETDN[6:0] OFFSET (LSBs) 00h through 7Fh 0 through 127 Maxim Integrated 47 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 17. Event Timing 1 Register WRITE OPCODE 3Fh Bit Name Bit Name BIT READ OPCODE BFh FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h 15 14 13 12 11 10 9 8 TDF3 TDF2 TDF1 TDF0 TDM4 TDM3 TDM2 TDM1 7 6 5 4 3 2 1 0 TDM0 TMF5 TMF4 TMF3 TMF2 TMF1 TMF0 8XS NAME DESCRIPTION TOF Difference Measurement Frequency: Along with 8XS, these bits define the rate at which TOF_DIFF measurements are executed when the EVTMG1 or EVTMG2 command is executed. Rate = 0.5s + (TDF[3:0] x 0.5s) 15:12 TDF[3:0] TDF[3:0] (decimal) RATE (8XS = 0) RATE (8XS = 1) 0 0.5s 0.0625s 1 1.0s 0.1250s .... .... .... 14 7.5s 0.9476s 15 8.0s 1.0000s TOF Difference Measurements: These bits define the number of TOF_DIFF measurement cycles to be executed when the EVTMG1 or EVTMG2 command is executed. Cycles = 1+ TDM[4:0] 11:7 TDM[4:0] TDM[4:0] (decimal) CYCLES 0 1 1 2 .... .... 30 31 31 32 Temperature Measurement Frequency: Along with 8XS bits define the time delay between temperature cycle measurements. It is a start-cycle to start-cycle time duration at which temperature measurement cycles are executed when the EVTMG1 or EVTMG3 command is executed. Rate = 1.0s + (TMF[3:0] x 1.0s) 6:1 0 TMF[5:0] 8XS www.maximintegrated.com TMF[5:0] (decimal) RATE (8XS = 0) RATE (8XS = 1) 0 1s 0.125s 1 2s 0.250s .... .... .... 62 63s 7.875s 63 64s 8X Sample Rate: When set to 1, the sample rate of TOF difference and temperature measurements is increased by a factor of 8 in an event timing mode. Maxim Integrated 48 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 18. Event Timing 2 Register WRITE OPCODE 40h Bit Name Bit READ OPCODE C0h FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h 15 14 13 12 11 10 9 8 TMM4 TMM3 TMM2 TMM1 TMM0 CAL_USE CAL_CFG2 CAL_CFG1 1 0 7 6 5 4 3 2 Name CAL_CFG0 TP1 TP0 PRECYC2 PRECYC1 PRECYC0 BIT NAME PORTCYC1 PORTCYC0 DESCRIPTION Temperature Measurements: These bits define the number of temperature measurement cycles to be executed when the EVTMG1 or EVTMG3 command is executed. Cycles = 1+ TMM[4:0] 15:11 10 TMM[4:0] (decimal) CYCLES 0 1 1 2 .... .... 30 31 31 32 TMM[4:0] CAL_USE Calibration Usage: This bit, when set, causes the MAX35103 to use the calibration data in the CalibrationInt and CalibrationFrac registers during measurement, averaging and accumulation of data while executing the EVTMG commands. All time measurements are scaled using the calibration factors as described by the calibrate command. Calibration Configuration: These bits define the point in the EVTMGx cycle/sequence where the automatic calibration command is executed. DESCRIPTION CAL_CFG[2:0] 000b through 011b 9:7 CAL_CFG[2:0] www.maximintegrated.com DURING EVTMGX SEQUENCES, AUTOMATIC EXECUTION OF THE CALIBRATE COMMAND OCCURS AT: Autocalibration disabled 100b The beginning of each TOF_DIFF cycle The beginning of each temperature cycle 101b The beginning of each TOF_DIFF cycle The beginning of each temperature sequence 110b The beginning of each TOF_DIFF sequence The beginning of each temperature cycle 111b The beginning of each TOF_DIFF sequence The beginning of each temperature sequence Maxim Integrated 49 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 18. Event Timing 2 Register (continued) BIT NAME DESCRIPTION Temperature Port: These bits set the number of temperature ports to stimulate during a temperature measurement sequence and the sequence in which the temperature ports are stimulated. 6:5 TP[1:0] TP1 TP0 DESCRIPTION 0 0 Measure ports T1 and T3 0 1 Measure ports T2 and T4 1 0 Measure ports T1, T3, and T2 1 1 Measure ports T1, T3, T2, and T4 Preamble Temperature Cycle: These 3 bits are used to set the number of cycles to use as preamble for reducing dielectric absorption of the temperature measurement capacitor. Each cycle comprises one temperature measurement sequence as defined by the TP[1:0] bits. 4:2 PRECYC[2:0] PRECYC2 PRECYC1 PRECYC0 DESCRIPTION 0 0 0 0 dummy cycle 0 0 1 1 dummy cycles 0 1 0 2 dummy cycles 0 1 1 3 dummy cycles 1 0 0 4 dummy cycles 1 0 1 5 dummy cycles 1 1 0 6 dummy cycles 1 1 1 7 dummy cycles Port Cycle Time: These two bits define the time interval between successive individual temperature port measurements. It is a start-to-start time. These bits also define the timeout function of the temperature measurement ports. See the Temperature Operation section for timeout details. 1:0 PORTCYC[1:0] www.maximintegrated.com PORTCYC1 PORTCYC0 DESCRIPTION (s) 0 0 128 0 1 256 1 0 384 1 1 512 Maxim Integrated 50 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 19. TOF Measurement Delay Register WRITE OPCODE 41h Bit Name Bit Name BIT 15:0 READ OPCODE C1h FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h 15 14 13 12 11 10 9 8 DLY15 DLY14 DLY13 DLY12 DLY11 DLY10 DLY9 DLY8 7 6 5 4 3 2 1 0 DLY7 DLY6 DLY5 DLY4 DLY3 DLY2 DLY1 DLY0 NAME DESCRIPTION DLY[15:0] This is hexadecimal value ranging from 0000h to FFFFh (decimal 0 to 65535). It is a multiple of the 4MHz crystal period (250ns). Settings less than 0012h are reserved and should not be used. The analog comparator driven by the STOP_UP and STOP_DN device pins does not generate a stop condition until this delay, counted from the internally generated start pulse for the acoustic wave, has expired. This delay applies to early edge detect wave. Care must be taken to set the TIMOUT bits in the TOF2 register so that a timeout interrupt does not occur before this delay expires. Table 20. Calibration and Control Register WRITE OPCODE 42h READ OPCODE C2h FLASH STORED Yes FACTORY-STORED FLASH VALUE 0000h Bit 15 14 13 12 11 10 9 8 Name X X X X CMP_EN CMP_SEL INT_EN ET_CONT Bit 7 6 5 4 3 2 1 0 Name CONT_INT CLK_S2 CLK_S1 CLK_S0 CAL_ PERIOD3 CAL_ PERIOD2 CAL_ PERIOD1 CAL_ PERIOD0 BIT NAME 15:12 X 11 CMP_EN www.maximintegrated.com DESCRIPTION Reserved Comparator/UP_DN Output Enable: 1 = CMP_OUT/UP_DN output device pin is enabled. 0 = CMP_OUT/UP_DN output device pin is driven low. Maxim Integrated 51 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 20. Calibration and Control Register (continued) BIT NAME DESCRIPTION 10 CMP_SEL Comparator/UP_DN Output Select: This bit selects the output function of the CMP_OUT/UP_DN pin and is only used when CMP_EN = 1. 1 = CMP_EN: The output monitors the receiver front end comparator output. 0 = UP_DN: The output monitors the launch direction of the pulse launcher. High Output: Upstream measurement (Launch_UP to STOP_UP) Low Output: Downstream measurement (Launch_DN to STOP_DN) 9 INT_EN 8 7 Interrupt Enable: This bit, when set, enables the INT pin. All interrupt sources are wire-ORed to the INT pin. ET_CONT Event Timing Continuous Operation: This bit, when set, causes the currently executing EVTMGx command to continuously execute until the HALT command is received by the MAX35103. This bit, when cleared, causes: * The currently executing EVTMG1 command to run one sequence of TOF_DIFF measurement cycles and/or one sequence of temperature measurement. * The currently executing EVTMG2 command to run one sequence of TOF_DIFF measurements cycles. * The currently executing EVTMG3 command to run one sequence of temperature measurement cycles. CONT_INT Continuous Interrupt: This bit, when set, causes the currently executing EVTMGx command to assert the INT pin (if enabled) after every TOF_DIFF or temperature measurement cycle. This allows the host microprocessor to interrogate the current event for accuracy of measurements and hit data. When this bit is cleared, the currently executing EVTMGx command interrupt generation behavior is controlled only by the setting of the ET_CONT bit. Clock Settling Time: These bits define the time interval that the MAX35103 waits after enabling the 4MHz clock for it to stabilize before making any measurements of time or temperature. 6:4 CLK_S[2:0] www.maximintegrated.com CLK_S2 CLK_S1 CLK_S0 0 0 0 0 DESCRIPTION 32kHz CLOCK CYCLES TYPICAL TIME 0 16 488s 0 1 48 1.46ms 1 0 96 2.93ms 0 1 1 128 3.9ms 1 0 0 168 5.13ms 1 0 1 4MHz oscillator on continuously 1 1 0 4MHz oscillator on continuously 1 1 1 4MHz oscillator on continuously Maxim Integrated 52 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 20. Calibration and Control Register (continued) BIT NAME DESCRIPTION 4MHz Ceramic Oscillator Calibration Period: These bits define the number of 32.768kHz oscillator periods to measure for determination of the 4MHz ceramic oscillator period. 32kHz clock cycles = 1+ CAL_PERIOD[3:0] DESCRIPTION 3:0 CAL_PERIOD[3:0] (decimal) 32kHz CLOCK CYCLES (decimal) 32kHz CLOCK CYCLES (s) 0 1 30.5 CAL_PERIOD[3:0] 1 2 61 .... .... .... 14 15 457.7 15 16 488.0 Table 21. Real-Time Clock Register WRITE OPCODE 43h READ OPCODE C3h FLASH-STORED Yes FACTORY-STORED FLASH VALUE 0000h Bit 15 14 13 12 11 10 9 8 Name X X X X X X X X Bit 7 6 5 4 3 2 1 0 Name X 32K_BP 32K_EN EOSC AM1 AM0 WF WD_EN BIT NAME 15:7 X 6 32K_BP 32kHz Bypass: This bit, when set, allows an external CMOS-level 32.768kHz signal to be applied to the 32KX1 device pin. The internal 32.768kHz oscillator is bypassed and the external signal is driven into the MAX35103 core. 5 32K_EN 32kHz Clock Output Enable: This bit enables the 32KOUT device pin to drive a CMOS-level square wave representation of the 32kHz crystal. 4 EOSC www.maximintegrated.com DESCRIPTION Reserved Enable Oscillator: This active-low bit when set to logic 0 starts the real-time clock oscillator. When this bit is set to logic 1, the oscillator is stopped. Maxim Integrated 53 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 21. Real-Time Clock Register (continued) BIT NAME DESCRIPTION Alarm Control: The MAX35103 contains a time-of-day alarm. The alarm is activated when either the AM1 or AM2 bits are set. When the RTC's hours or minutes value increments to a value equal to the alarm settings in Alarm registers, the AF bit in the Interrupt Status register is set and the INT device pin is asserted (if enabled) and remains asserted until the Interrupt Status register is accessed by the microprocessor with a read register command. 3:2 AM[1:0] 1 WF 0 WD_EN AM1 AM0 ALARM FUNCTION 0 0 No alarm 0 1 Alarm when minutes match 1 0 Alarm when hours match 1 1 Alarm when hours and minutes match Watchdog Flag: This bit is set when the watchdog counter reaches zero. This bit must be written to a zero to clear the bit. Writing this bit to a zero when the WDO pin is asserted low releases the WDO pin to its inactive high-impedance state. Watchdog Enable: 1 = Watchdog timer is enabled. 0 = Watchdog time is disabled, and the WDO pin is high impedance. Status Register Descriptions Table 22. Interrupt Status Register WRITE OPCODE Read Only Bit 15 Name Bit Name TO READ OPCODE FEh 14 AF 13 X FLASH STORED No 12 TOF 11 TE DEFAULT VALUE 0000h 10 9 8 LDO TOF_ EVTMG TEMP_ EVTMG 7 6 5 4 3 2 1 0 FLASH CAL HALT CSWI INIT POR X X Note: This register is read only and bits are self-clearing upon a read to this register. See the Device Interrupt Operations section for more information. BIT NAME DESCRIPTION 15 TO Timeout: The TO bit is set if any one of the t1, t2, Hit1 through Hit6, or temperature measurements do not occur within the associated timeout window. 14 AF Alarm Flag: Set when the RTC's hours or minutes value increments to a value equal to the alarm settings in Alarm registers. 13 X www.maximintegrated.com Reserved Maxim Integrated 54 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 22. Interrupt Status Register (continued) BIT 12 NAME TOF DESCRIPTION Time of Flight: Set when the TOF_UP, TOF_DN, or TOF_DIFF command has completed. During execution of The EVTMG1 or EVTMG2 command, this bit is set and the INT pin asserts (if enabled) upon completion of each of the cycles of the event defined by the TOF difference measurements setting if the CONT_INT bit in the Calibration and Control register has been set. 11 TE Temperature: Set when the temperature command has completed. During execution of The EVTMG1 or EVTMG3 command, this bit is set and the INT pin asserts (if enabled) upon completion of each of the cycles of the event defined by the temperature measurements setting if the CONT_INT bit in the Calibration and Control register has been set. 10 LDO Internal LDO Stabilized: Set when the internal low-dropout regulator is turned on by either the LDO_Timed or LDO_ON and has stabilized. Once asserted, a flash command can be sent to the MAX35103. 9 TOF_EVTMG Event Timing TOF Completed: Set when either the EVTMG1 or EVTMG2 commands have completed its last TOF_DIFF measurement cycle. This indicates that the data in the TOF_DIFF, TOF_DIFF_AVG, AVGUP, and AVGDN Results registers is valid. 8 TEMP_EVTMG Event Timing Temperature Completed: Set when the EVTMG1 or EVTMG3 commands have completed its last temperature measurements. This indicates that the data in the T1, T2, T3, T4, T1_AVG, T2AVG, T3AVG, and T4_AVG Results registers is valid. FLASH Flash Ready: Set when the flash memory is ready to be accessed. During execution of any command that requires write access to the flash memory (write flash, transfer configuration to flash, block erase, initialize), the SPI port is inactive and should not be exercised. The host microprocessor is interrupted by the assertion of the INT pin (if enabled) once the command has been completed and the SPI of the MAX35103 is available for access. 6 CAL Calibrate: Set after completion of the Calibrate command when the command is manually sent by the host microprocessor. When calibration occurs as a result of the setting of the Cal_Use, Cal_AUTO and Cal_CFGx bits in the Event Timing 2 register and the MAX35103 is automatically executing calibration commands as required during execution of any of the EVTMGx commands, this bit is not set. 5 HALT HALT: Set when the HALT command has completed. 4 CSWI Case Switch: Set when a high logic level is detected on the CSW device pin. 3 INIT Initialize: Set when the Initialize command has completed. 2 POR Power-On-Reset: Set when the MAX35103 has been successfully powered by application of VCC. Upon application of power, the SPI port becomes inactive until this bit has been set. 1:0 X 7 www.maximintegrated.com Reserved Maxim Integrated 55 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 23. Control Register WRITE OPCODE FFh READ OPCODE 7Fh FLASH STORED No DEFAULT VALUE 0000h Bit 15 14 13 12 11 10 9 8 Name X X X X X X AFA CSWA Bit 7 6 5 4 3 2 1 0 Name X X X X X X X X BIT NAME 15:10 X DESCRIPTION Reserved AFA Alarm Flag Arm: This bit is set when the RTC's hours and/or minutes value matched the alarm settings in the RTC register. This bit is set at the same time as the AF bit in the Interrupt Status register. After resetting the RTC alarm settings, a 0 must be written to this bit to rearm the RTC Alarm. This bit can only be written to a 0. 8 CSWA Case Switch Arm: This bit is set when the CSW pin detects a logic-high, indicating the MAX35103 has detected a tamper condition. This bit is set at the same time as the CSWI bit in the Interrupt Status register. Once set, this bit must be written to a 0 to rearm the case switch detection. The case switch detection must be rearmed before the CSWI interrupt can be set again. This bit can only be written to a 0. 7:0 X 9 www.maximintegrated.com Reserved Maxim Integrated 56 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Conversion Results Register Descriptions The devices conversion results registers are all read-only volatile SRAM. Values are not stored in the flash memory and the POR value for all registers is 0000h. Table 24. Conversion Results Registers Description READ ONLY ADDRESS NAME DESCRIPTION Bit 15 through Bit 8 holds the 8-bit value of the pulse width ratio (t1 / t2).for the upstream measurement. Each bit is weighted as follows: C4h WVRUP BIT 15 BIT 14 BIT 13 BIT 12 BIT 11 BIT 10 BIT 9 BIT 8 1 0.5 0.25 0.125 0.0625 0.03125 0.015625 0.0078125 Bit 7 thru bit 0 holds the 8-bit value of the pulse width ratio (t2 / tideal) where tideal is equal to half the period of the Pulse Launch Frequency for the upstream measurement. Each bit is weighted as follows: BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 1 0.5 0.25 0.125 0.0625 0.03125 0.015625 0.0078125 The maximum value of each of these ratios is 1.9921875. C5h Hit1UPInt 15-bit fixed-point integer value of the first hit in the upstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. C6h Hit1UPFrac 16-bit fractional value of the first hit in the upstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. C7h Hit2UPInt 15-bit fixed-point integer value of the second hit in the upstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. C8h Hit2UPFrac 16-bit fractional value of the second hit in the upstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. C9h Hit3UPInt CAh Hit3UPFrac 16-bit fractional value of the third hit in the upstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. CBh Hit4UPInt 15-bit fixed-point integer value of the fourth hit in the upstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. CCh Hit4UPFrac www.maximintegrated.com 15-bit fixed-point integer value of the third hit in the upstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. 16-bit fractional value of the fourth hit in the upstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. Maxim Integrated 57 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 24. Conversion Results Registers Description (continued) READ ONLY ADDRESS NAME CDh Hit5UPInt 15-bit fixed-point integer value of the fifth hit in the upstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. CEh Hit5UPFrac 16-bit fractional value of the fifth hit in the upstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. CFh Hit6UPInt 15-bit fixed-point integer value of the sixth hit in the upstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. D0Fh Hit6UPFrac 16-bit fractional value of the sixth hit in the upstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. D1h AVGUPInt 15-bit fixed-point integer value of the average of the hits recorded in the upstream direction This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. D2h AVGUPFrac 16-bit fractional value of the average of the hits recorded in the upstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. DESCRIPTION Bit 15 through Bit 8 holds the 8 bit value of the pulse width ratio (t1/t2).for the downstream measurement. Each bit is weighted as follows: D3h WVRDN BIT 15 BIT 14 BIT 13 BIT 12 BIT 11 BIT 10 BIT 9 BIT 8 1 0.5 0.25 0.125 0.0625 0.03125 0.015625 0.0078125 Bit 7 thru bit 0 holds the 8 bit value of the pulse width ratio (t2/tideal) where tideal is equal to half the period of the pulse launch frequency for the downstream measurement. Each bit is weighted as follows: BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 1 0.5 0.25 0.125 0.0625 0.03125 0.015625 0.0078125 The maximum value of each of these ratios is 1.9921875. D4h Hit1DNInt 15-bit fixed-point integer value of the first hit in the downstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. D5h Hit1DNFrac 16-bit fractional value of the first hit in the downstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. D6h Hit2DNInt 15-bit fixed-point integer value of the second hit in the downstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. www.maximintegrated.com Maxim Integrated 58 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 24. Conversion Results Registers Description (continued) READ ONLY ADDRESS NAME DESCRIPTION D7h Hit2DNFrac 16-bit fractional value of the second hit in the downstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. D8h Hit3DNInt 15-bit fixed-point integer value of the third hit in the downstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. D9h Hit3DNFrac 16-bit fractional value of the third hit in the downstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. DAh Hit4DNInt 15-bit fixed-point integer value of the fourth hit in the downstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. DBh Hit4DNFrac 16-bit fractional value of the fourth hit in the downstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. DCh Hit5DNInt 15-bit fixed-point integer value of the fifth hit in the downstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. DDh Hit5DNFrac 16-bit fractional value of the fifth hit in the downstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. DEh Hit6DNInt 15-bit fixed-point integer value of the sixth hit in the downstream direction This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. DFh Hit6DNFrac 16-bit fractional value of the sixth hit in the downstream direction. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. E0h AVGDNInt E1h AVGDNFrac www.maximintegrated.com 15-bit fixed-point integer value of the average of the hit times recorded in the downstream direction. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. 16-bit fractional value of the average of the hit times recorded in the downstream direction. This fractional portion is a binary representation of one period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. Maxim Integrated 59 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 24. Conversion Results Registers Description (continued) READ ONLY ADDRESS NAME E2h TOF_DIFFInt E3h TOF_ DIFFFrac DESCRIPTION 16-bit fixed-point two's-complement integer portion of the difference of the averages for the hits recorded in both the upstream and downstream directions. It is computed as: AVGUP - AVGDN This integer represents the number of t4MHz periods that contribute to computation. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. The minimum size of this integer is 8000h or -215 x t4MHz. 16-bit fractional portion of the two's complement difference of the averages for the hits recorded in both the upstream and downstream directions. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. Bit 15 through bit 8 holds the 8-bit value of the TOF_Range. The TOF_Range is an 8-bit binary integer that indicates the range of valid error-free TOF_DIFF measurements that were made during execution of either of the EVTMG1 or EVTMG2 commands. The maximum value of TOF_Range is equal to 2 times the actual pulse launch period as configured by the pulse launch divider bits in the TOF1 register. BIT 15 BIT 14 BIT 13 MSB BIT 12 BIT 11 BIT 10 BIT 9 BIT 8 TOF_Range 8-bit binary integer LSB The formulas to calculate the range and resolution of the TOF_Range integer for a given DPL[3:0] bit setting are shown below: Maximum range (s) = DPL[3:0] + 1 Resolution = Maximum range/256 LAUNCH FREQUENCY MAXIMUM RANGE (s) 0001b 1MHz 2 7.8175 0002b 666.6kHz 3 11.7185 .... .... .... .... 1110b 133.3kHz 15 58.59375 1111b 125kHz 16 62.5 DPL[3:0] E4h TOF_Cycle_ Count /TOF_Range RESOLUTION (ns) Bit 7 through bit 0 holds the 8-bit value of the TOF cycle count. The TOF cycle count is an 8-bit binary integer that indicates the number of valid error-free cycles that either of the EVTMG1 or EVTMG2 commands has executed. It also represents the number of TOF_DIFF cycles that have been totaled for the purpose of averaging, which affects the results provided in the TOF_DIFF_ AVGFrac and TOF_DIFF_AVGInt registers. It is incremented every time an error-free TOF_DIFF command is executed by either the EVTMG1 or EVTMG2 sequence. Because of this internal error checking, once the complete number of cycles defined by the TOF difference masurements bits in the Event Timing 1 register has been completed and the TOF_EVTMG bit has been set in the Interrupt Status register causing the INT device pin to be asserted (if enabled), the TOF Cycle Count may not be equal to the setting of the TOF difference measurements bits in the Event Timing 1 register. BIT 7 MSB www.maximintegrated.com BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 TOF cycle count 8-bit binary integer BIT 1 BIT 0 LSB Maxim Integrated 60 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 24. Conversion Results Registers Description (continued) READ ONLY ADDRESS NAME DESCRIPTION 16-bit fixed-point two's-complement integer portion of the average of the accumulated TOF_DIFF measurements. It is computed as: TOF_Cycle_Count E5h TOF_DIFF_ AVGInt n=1 TOF_DIFFn TOF_Cycle_Count This integer represents the number of t4MHz periods that contribute to the computation. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. The minimum size of this integer is 8000h or -215 x t4MHz. E6h E7h E8h E9h EAh EBh ECh EDh TOF_DIFF_ AVGFrac 16-bit fractional portion of the two's-complement average of the accumulated TOF_DIFF measurements. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. T1Int 15-bit fixed-point integer value of the time taken to discharge the timing capacitor through the RTD connected to the T1 device pin. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. T1Frac T2Int T2Frac T3Int T3Frac T4Int www.maximintegrated.com 16-bit fractional value of the time taken to charge the timing capacitor through the RTD connected to the T1 device pin. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 1)/216 x t4MHz. 15-bit fixed-point integer value of the time taken to charge the timing capacitor through the RTD connected to the T2 device pin. This integer portion is a binary representation of the number of periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. 16-bit fractional value of the time taken to charge the timing capacitor through the RTD connected to the T2 device pin. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 1)/216 x t4MHz. 15-bit fixed-point integer value of the time taken to charge the timing capacitor through the RTD connected to the T3 device pin. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. 16-bit fractional value of the time taken to charge the timing capacitor through the RTD connected to the T3 device pin. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 1)/216 x t4MHz. 15-bit fixed-point integer value of the time taken to charge the timing capacitor through the RTD connected to the T4 device pin. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. Maxim Integrated 61 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 24. Conversion Results Registers Description (continued) READ ONLY ADDRESS EEh EFh NAME T4Frac Temp_Cycle_ Count DESCRIPTION 16-bit fractional value of the time taken to charge the timing capacitor through the RTD connected to the T4 device pin. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 1)/216 x t4MHz. The temp cycle count is an 8-bit binary integer that indicates the number of valid error-free cycles that either of the EVTMG1 or EVTMG3 commands has executed. It also represents the number of temperature cycles that have been totaled for the purpose of averaging, which affects the results provided in the Tx_AVGFrac and Tx_AVGInt registers. It is incremented every time an error-free temperature command is executed by either the EVTMG1 or EVTMG3 sequence. Because of this internal error checking, once the complete number of cycles defined by the temperature measurements bits in the Event Timing 2 register has been completed and the Temp_EVTMG bit has been set in the Interrupt Status register causing the INT device pin to be asserted (if enabled), the temperature cycle count may not be equal to the setting of the temperature measurements bits in the Event Timing 2 register. BIT 15 BIT 14 BIT 13 BIT 12 BIT 11 BIT 10 BIT 9 BIT 8 X X X X X X X X BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 MSB LSB Temp Cycle Count 15-bit fixed-point integer value of the average of the T1 port measurements. It is computed as: Temp_Cycle_Count F0h T1_AVGInt n=1 T1n Temp_Cycle_Count This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. F1h T1_AVGFrac 16-bit fractional portion of the average of the T1 port measurements. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. 15-bit fixed-point integer value of the average of the T2 port measurements. It is computed as: Temp_Cycle_Count n=1 F2h T2_AVGInt T2n Temp_Cycle_Count This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. www.maximintegrated.com Maxim Integrated 62 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 24. Conversion Results Registers Description (continued) READ ONLY ADDRESS NAME DESCRIPTION F3h T2_AVGFrac 16-bit fractional portion of the average of the T2 port measurements. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. 15-bit fixed-point integer value of the average of the T3 port measurements. It is computed as: Temp_Cycle_Count F4h n=1 T3_AVGInt T3n Temp_Cycle_Count This integer portion is a binary representation of the number of periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 -1) x t4MHz. F5h T3_AVGFrac 16-bit fractional portion of the average of the T3 port measurements. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. 15-bit fixed-point integer value of the average of the T4 port measurements. It is computed as: Temp_Cycle_Count F6h n=1 T4_AVGInt T4n Temp_Cycle_Count This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. F7h T4_AVGFrac 16-bit fractional portion of the average of the T4 port measurements. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. F8h Calibration Int 15-bit fixed-point integer value of the time taken to measure the period of the 32.768kHz crystal oscillator during execution of the calibrate command. This integer portion is a binary representation of the number of t4MHz periods that contribute to the time results. The maximum size of the integer is 7FFFh or (215 - 1) x t4MHz. Calibration Frac 16-bit fractional value of the time taken to measure the period of the 32.768kHz crystal oscillator during execution of the calibrate command. This fractional portion is a binary representation of one t4MHz period quantized to a 16-bit resolution. The maximum size of the fraction is FFFFh or (216 - 1)/216 x t4MHz. F9h FAh Reserved FBh Reserved FCh Reserved FDh Reserved www.maximintegrated.com Maxim Integrated 63 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Flash Opcode Commands Write Flash Command To access the flash memory, the internal low-dropout voltage regulator that powers the flash circuitry must be enabled. This can be done two ways: sending the LDO_Timed command prior to the desired flash access or sending the LDO_ON command to the MAX35103 prior to desired flash access. See the LDO_Timed and LDO_ON command descriptions for details. To manipulate the flash memory, there are three commands supported by the device: read flash, write flash, and block erase flash. Read Flash Command The read flash command is used to sequentially read a continuous stream of data from the internal 8KB of flash using a built-in autoincrement address counter. For 8KB, 13 address bits are needed to indicate the starting address in memory to begin the read stream. Since the memory array is organized in X16 fashion, the starting address must fall on any even number address. The read stream continues until the CE signal is deasserted. Once the automatic internal address counter has been incremented to the last memory location in the array, it wraps around to the bottom of the memory array and the data for the first memory location of the array is read. Figure 18 illustrates the serial peripheral interface signaling associated with the read flash command. The flash is written in the MAX35103 in a word-only manner. The architecture allows a single 16-bit word to be written to the array supporting the maximum access SPI clock speed of tSCK. The location to be programmed must have previously been erased with the block erase flash command. To perform a write flash command, the starting flash memory address must fall on an even flash memory address (i.e., the least significant bit of the address (A15- A0) must be 0). The 16-bit address word and at least one 16-bit word of data must be clocked into the device before the CE pin is deasserted. If more than 16 bits of data are clocked into the device during a single CE assertion, only the last bounded 16-bit data word is written. This is not a FIFO register. Any fraction of a 16-bit word is ignored, and the previous whole 16-bit word is written. Once the 16 bits of data are clocked into the device, the host microprocessor deasserts the CE device pin and then waits. The MAX35103 sets the flash bit in the Interrupt Status register and assert the INT device pin (if enabled) to tell the host microprocessor that the next write flash command can be sent to the MAX35103. The host microprocessor can then read the Interrupt Status register after the INT device pin is asserted. Figure 19 illustrates the serial peripheral interface signaling associated with the write flash command. READ FLASH COMMAND CE SCK DIN O O MSB 8 BITS LSB MSB OPCODE DOUT A A 16 BITS LSB DATA ADDRESS HIGH IMPEDANCE D MSB D D D D D D D D D HIGH IMPEDANCE LSB MSB Figure 18. Read Flash Opcode Command Protocol www.maximintegrated.com Maxim Integrated 64 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Block Erase Flash Command (if enabled) to tell the host microprocessor that the next block erase flash command can be sent. The host microprocessor can read the Interrupt Status register after the INT device pin is asserted instead of waiting for tERASE. A block of 128 words (256 bytes) can be erased in a single operation. For the 8KB array, there are 32 such 128 word (256 Byte) blocks. The block to be erased is selected by the 16-bit address word in the block erase flash SPI protocol sequence as illustrated in Figure 20. Flash Memory Map This memory is accessed by the read flash, write flash, and the block erase flash commands. All flash memory is erased when the MAX35103 leaves the factory. This means that each flash location has a value of FFFFh until written by a user to a different value. The erased block is the block that contains the specified address. The time from CE deassert to CE assert for the next block erase flash command needs to be approximately tERASE. Also, the device sets the flash bit in the Interrupt Status register and asserts the INT device pin WRITE FLASH COMMAND CE 0 SCK DIN 1 2 3 4 5 6 O 7 O MSB 10 20 21 22 23 A LSB D7-D0 9 8 A MSB LSB A15-A0 16 BITS OPCODE 24 25 26 D 37 38 39 D MSB 16 BITS ADDRESS DOUT 36 LSB DATA HIGH IMPEDANCE Figure 19. Write Flash Opcode Command Protocol BLOCK ERASE FLASH COMMAND CE 0 1 2 3 4 5 6 7 8 9 10 20 21 22 23 SCK DIN O O MSB 8 BITS LSB MSB OPCODE DOUT A A 16 BITS LSB ADDRESS HIGH IMPEDANCE Figure 20. Block Erase Flash Opcode Command Protocol www.maximintegrated.com Maxim Integrated 65 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Table 25. Flash Memory Map FLASH ADDRESS (evens only) BLOCK (decimal) DESCRIPTION 0000h to 00FFh 0 User flash 0100h to 01FFh 1 User flash 0200h to 02FFh 2 User flash .... .... User flash 1D00h to 1DFFh 29 User flash 1E00h to 1EFFh 30 User flash 1F00h to 1FFFh 31 User flash Ordering Information PART Package Information TEMP RANGE PIN-PACKAGE MAX35103EHJ+ -40C to +85C 32 TQFP-EP* MAX35103EHJ+T -40C to +85C 32 TQFP-EP* +Denotes a lead(Pb)-free/RoHS-compliant package. T = Tape and reel. *EP = Exposed pad. Chip Information For the latest package outline information and land patterns (footprints), go to www.maximintegrated.com/packages. Note that a "+", "#", or "-" in the package code indicates RoHS status only. Package drawings may show a different suffix character, but the drawing pertains to the package regardless of RoHS status. PACKAGE TYPE PACKAGE CODE OUTLINE NO. LAND PATTERN NO. 32 TQFP-EP H32E+6 21-0079 90-0326 PROCESS: CMOS www.maximintegrated.com Maxim Integrated 66 MAX35103 Reduced Power Time-to-Digital Converter with AFE, RTC, and Flash Revision History REVISION NUMBER REVISION DATE 0 10/14 Initial release -- 1 1/15 Updated Figure 12 21 DESCRIPTION PAGES CHANGED For pricing, delivery, and ordering information, please contact Maxim Direct at 1-888-629-4642, or visit Maxim Integrated's website at www.maximintegrated.com. Maxim Integrated cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim Integrated product. No circuit patent licenses are implied. Maxim Integrated reserves the right to change the circuitry and specifications without notice at any time. The parametric values (min and max limits) shown in the Electrical Characteristics table are guaranteed. Other parametric values quoted in this data sheet are provided for guidance. Maxim Integrated and the Maxim Integrated logo are trademarks of Maxim Integrated Products, Inc. (c) 2015 Maxim Integrated Products, Inc. 67 Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Maxim Integrated: MAX35103EHJ+