MAX1401
+3V, 18-Bit, Low-Power, Multichannel,
Oversampling (Sigma-Delta) ADC
______________________________________________________________________________________ 31
/* Assumptions:
** The MAX140X's CS pin is tied to ground
** The MAX140X's INT pin drives a falling-edge-triggered interrupt
** MAX140X's DIN is driven by MOSI, DOUT drives MISO, and SCLK drives SCLK
*/
/* Low-level function to write 8 bits using 68HC11 SPI */
void WriteByte (BYTE x)
{
/* System-dependent: write to SPI hardware and wait until it is finished */
HC11_SPDR = x;
while (HC11_SPSR & HC11_SPSR_SPIF) { /* idle loop */ }
}
/* Low-level function to read 8 bits using 68HC11 SPI */
BYTE ReadByte (void)
{
/* System-dependent: use SPI hardware to clock in 8 bits */
HC11_SPDR = 0xFF;
while (HC11_SPSR & HC11_SPSR_SPIF) { /* idle loop */ }
return HC11_SPDR;
}
/* Low-level interrupt handler called whenever the MAX140X's INT pin goes low.
** This function reads new data from the MAX140X and feeds it into a
** user-defined function Process_Data().
*/
void HandleDRDY (void)
{
BYTE data_H_bits, data_M_bits, data_L_bits; /* storage for data register */
WriteByte(0x78); /* read the latest data regsiter value */
data_H_bits = ReadByte();
data_M_bits = ReadByte();
data_L_bits = ReadByte();
Process_Data(data_H_bits, data_M_bits, data_L_bits);
/* System-dependent: re-enable the interrupt service routine */
}
/* High-level function to configure the MAX140X's registers
** Refer to data sheet for custom setup values.
*/
void Initialize (void)
{
/* System-dependent: configure the SPI hardware (CPOL=1,CPHA=1) */
/* write to all of configuration registers */
MY_GS1 = 0x0A; MY_GS2 = 0x00; MY_GS3 = 0x00;
MY_TF1 = 0x00; MY_TF2 = 0x00; MY_TF3 = 0x00;
WriteByte(0x10); WriteByte(MY_GS1); /* write Global Setup 1 */
WriteByte(0x20); WriteByte(MY_GS2); /* write Global Setup 2 */
WriteByte(0x30); WriteByte(MY_GS3); /* write Global Setup 3 */
WriteByte(0x40); WriteByte(MY_TF1); /* write Transfer Function 1 */
WriteByte(0x50); WriteByte(MY_TF2); /* write Transfer Function 2 */
WriteByte(0x60); WriteByte(MY_TF3); /* write Transfer Function 3 */
/* System-dependent: enable the data-ready (DRDY) interrupt handler */
}
Listing 1. Example SPI Interface
Bit-Banging Interface (80C51, PIC16C54)
Any microcontroller can use general-purpose I/O pins
to interface to the MAX1401. If a bidirectional or open-
drain I/O pin is available, reduce the interface pin count
by connecting DIN to DOUT (Figure 13). Listing 2
shows how to emulate the SPI in software. Use the
same initialization routine shown in Listing 1.
For best results, use a hardware interrupt to monitor the
INT pin and acquire new data as soon as it is available.
If hardware interrupts are not available, or if interrupt
latency is longer than the selected conversion rate, use
the FSYNC bit to prevent automatic measurement while
reading the data output register.
MAX1401
+3V, 18-Bit, Low-Power, Multichannel,
Oversampling (Sigma-Delta) ADC
32 ______________________________________________________________________________________
V
DD
P3.0
P3.1
RESET
DOUT
DIN
SCLK
CS
8051
MAX1401
Figure 13. MAX1401 to 8051 Interface
Listing 2. Bit-Banging SPI Replacement
MAX1401
+3V, 18-Bit, Low-Power, Multichannel,
Oversampling (Sigma-Delta) ADC
______________________________________________________________________________________ 33
Strain-Gauge Operation
Connect the differential inputs of the MAX1401 to the
bridge network of the strain gauge. In Figure 14, the
analog positive supply voltage powers the bridge net-
work and the MAX1401 along with its reference voltage.
The on-chip PGA allows the MAX1401 to handle an
analog input voltage range as low as 10mV full scale.
The differential inputs of the part allow this analog input
range to have an absolute value anywhere between
AGND and V+.
Temperature Measurement
Figure 15 shows a connection from a thermocouple to
the MAX1401. In this application, the MAX1401 is oper-
ated in its buffered mode to allow large decoupling
capacitors on the front end. These decoupling capaci-
tors eliminate any noise pickup from the thermocouple
leads. When the MAX1401 is operated in buffered mode,
it has a reduced common-mode range. In order to place
the differential voltage from the thermocouple on a suit-
able common-mode voltage, the AIN2 input of the
MAX1401 is biased at the reference voltage, +1.25V.
DIVIDER
CLOCK
GEN
MODULATOR
DIGITAL
FILTER
V+
V+ V
DD
AGND
REFIN+
MUXOUT+ ADCIN+
REFIN-
MUXOUT- ADCIN- AGND DGND
AIN1
AIN2
SWITCHING
NETWORK
ACTIVE
GAUGE
DUMMY
GAUGE
R
REF
ANALOG SUPPLY
R
R
ADDITIONAL
ANALOG
AND
CALIBRATION
CHANNELS
INTERFACE
AND
CONTROL
SCLK
DIN
DOUT
INT
CS
RESET
CLKIN
CLKOUT
PGA
DAC
MAX1401
BUFFER
BUFFER
Figure 14. Strain-Gauge Application with MAX1401

MAX1401EAI+

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Analog to Digital Converters - ADC 18-Bit 5Ch 4.8ksps 1.25V Precision ADC
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet