1. Introduction

Analog to digital converter (ADC) is a very important link in modern measurement and control. It is generally divided into serial analog-to-digital converter and parallel analog-to-digital converter. Although the latter has fast transmission speed, it has many pins, large volume and occupies many MCU port lines; The transmission rate of serial ADC can also be very high, and it has the advantages of small volume, low power consumption and less occupation of MCU port line. Therefore, serial ADC is more and more widely used.

Max1132 is a high-precision serial successive approximation ADC with single power supply, low power consumption, 16 bit and single / bipolar conversion produced by Maxim company. It has internal tracking / holding and calibration circuits, which can use internal or external reference voltage and clock. The sampling rate can reach up to 200ksps? The minimum consumption current is 7.5ma. If working in off mode, the consumed current can be reduced to 2.5 μ A。 The ADC can be used in industrial process control, data acquisition system, portable data recording, medical or handheld equipment, system detection and other fields.

2. Max1132 pin function

Working principle and application of high precision serial successive approximation ADC max1132

Max1132 is a programmable single channel ADC in 20 pin SSOP package, and its pin arrangement is shown in Figure 1. The functions of each pin are as follows:

Ref: reference voltage buffer output / ADC reference voltage input, which can be used as the reference voltage for analog-to-digital conversion;

Refadl: reference bandgap output / reference bandgap buffer input;

Agnd: Analog ground;

Avdd: + 5V ± 5% analog power supply;

DGND: digital ground;

SHDN: close the control input;

P0, P1 and P2: user programmable outputs 0, 1 and 2 respectively;

Sstrb: serial strobe output terminal;

Dout: serial data output terminal;

Rst: reset pin;

SCLK: serial data clock input terminal;

Dvdd: + 5V ± 5% digital power supply;

Din: serial data input terminal;

CS: chip selection end;

CREF: bypass buffer reference end;

Ain: analog input.

3. Working principle

Max1132 usually drives the control byte from the serial data input (DIN) into its internal shift register by the clock to determine its working mode and start the conversion. When CS goes low or a conversion (or calibration) ends, the first logic “1” received by DIN end is defined as the start bit (MSB) of control byte. Before this bit arrives, the logic “0” entered into DIN by the clock is invalid, and each data of DIN is entered into max1132 internal shift register on the rising edge of each SCLK. It is worth noting that if a new start bit is input by the clock before the current conversion is completed, the current conversion will be interrupted and a new input signal acquisition will be started at the same time.

Max1132 can complete successive approximation conversion with external or internal clock, but both modes use external clock to move data into or out of the device. In the external clock mode, the move in, move out and conversion steps of data are controlled by the external clock. The conversion clock in the internal clock mode is generated by the max1132 internal clock generator, with a maximum rate of 8MHz. It is generally required that the cycle of completing a conversion is an integer multiple of 8 sclks. Max1132 has two working modes: short acquisition (24sclk) and long acquisition (32sclk). In case of unipolar input, binary number is directly output; When bipolar input, the output is binary complement.

Max1132 also has three user programmable output ports (P0, P1 and P2). They all adopt push-pull CMOS output, which can be used to drive multiplexer switch or PGA. The outputs of the three programming ports are zero by default and remain unchanged during the hardware off mode. In addition, they are also set to zero when they are powered on and set.

4. Application of max1132

In the developed network geocine imager system, due to the large amplitude range of geoelectric signal to be detected, high detection signal accuracy, short signal acquisition time and many signal channels to be collected, it puts forward high requirements for the performance of ADC. Max1132 has bipolar conversion mode, and the conversion voltage range can reach – 12V ~ + 12V, which is wider than that of other ADCs; Its accuracy reaches 16 bits and the conversion speed can reach 200ksps, which is enough to meet the requirements of the system for accuracy and speed; Although there is no integrated multiplexer switch in it, it has three user programmable output ports, which can easily control a multiplexer switch to meet the requirements of multiple signal acquisition channels of the system; Max1132 adopts single power supply with internal reference voltage, which can simplify the peripheral circuit and is easy to use. Based on the above characteristics, the author selects max1132.

Figure 2 shows the circuit of interface between max1132 and MCU. In the figure, the CS of max1132 is connected with the P1.0 pin of the single chip microcomputer, and the chip selection end of max1132 is gated by the single chip microcomputer through the P1.0 pin; The control byte is output from P1.1 pin of single chip microcomputer to DIN end of ADC; The conversion result is read into the single chip microcomputer from the dout end of ADC by P1.2 pin, and the clock SCLK for reading the conversion data can be composed of high and low levels sent out by P1.4 pin in turn; Pin p1.3 is connected to the serial strobe output sstrb indicating the working state of max1132, and the MCU queries the working state of ADC through pin p1.3; The outputs P0, P1 and P2 are connected to the multiplexer switch to control the switching of the conversion channel, and the clock for successive approximation conversion is generated by the max1132 internal clock generator.

This application adopts the working mode of max1132 bipolar, internal clock and short acquisition mode, and its working sequence is shown in Figure 3. In the figure, tacq is the time to collect the input signal, and tconv is the time required for conversion. As can be seen from the figure, max1132 can start to collect the input signal after the chip selection CS is valid and the start bit is input from the din end, and can complete the collection of the input signal until the P2 bit of the control byte enters its internal shift register. Therefore, when using the three user programmable outputs of max1132 to control a multi-channel switch, pay special attention to the switching time of the input channel. Because max1132 needs to connect a buffer amplifier at the input end in the application, and the buffer amplifier needs a certain time to respond to the change of the signal when the input signal changes, the input channel should be switched immediately after the signal acquisition is completed, rather than after the conversion is completed. In other words, when sending the control byte of the current conversion channel to max1132, it is necessary to send the control signal (P2, P1, P0) of the next channel into its internal shift register and open the next channel of the multiplexer to ensure that the buffer amplifier has enough time to respond to the change of the signal to complete the conversion accurately. In addition, the serial strobe signal sstrb is low at the beginning of conversion and high at the end of conversion. Therefore, it can be used to interrupt the single chip microcomputer or judge whether the conversion is completed by query. The chip selection CS can not be kept low in this working mode. When the conversion is in progress, the converted data can be stored by an internal register. After the conversion, the SCLK clock can move the data out at any time, and the highest bit (MSB) of the conversion result will appear on dout after sstrb becomes high.

A complete conversion and control procedure is given below for reference:

START:CLR P1.0 ; The film selection is valid

MOV A,#0A0H ; Control byte

MOV R2,#08

DIN: CLR P1.4

RLC A

MOV P1.1,C ; Send word control

SETB P1.4

DJNZ R2,DIN

CLR P1.4

SETB P1.0

WAIT: JNB P1.3,WAIT

STORB: MOV R7,#16

CLR P1.0

LOOP: MOV C,P1.2 ; Read results

MOV A,31H

RLC A

MOV 31H,A  ; Storage height 8 bits

MOV A,30H

RLC A

MOV 30H,A  ; Save low 8 bits

SETB P1.4

CLR P1.4

DJNZ R7, LOOP

SETB P1.0

SA: SJMP SA

END

5. Concluding remarks

Compared with the general ADC chip, the new ADC chip max1132 can simplify the circuit design because it only needs a single + 5V power supply, has an internal reference voltage and a simple peripheral circuit. At the same time, the serial interface based on max1132 is also easy to connect with MCU, and occupies less MCU port line, so it can be used for more complex system development.

Responsible editor: GT

Leave a Reply

Your email address will not be published. Required fields are marked *