Authors: Wang Peng, Li Zhi, Li Jingshen, Xu Chuanpei

1 Introduction

In the computer detection system, the conversion from the analog signal to the digital signal is completed by the data acquisition system. Data acquisition system (Data AcquisiTIon System, DAS for short) It is the pre-channel for the external measured analog signal to enter the measurement system, sometimes called the preprocessing system, it is a long-term digital measurement of the input analog signal, so as to obtain a large amount of data circuit for further analysis and processing. In the data acquisition system, the A/D converter is a very important link, which is directly related to the measurement accuracy, resolution and conversion speed.

This article uses the TMS320LF2407 controller of the TMS320C2000 series produced by TI Company in the United States as the control chip. The TMS320C2000 series is a fixed-point DSP chip with low price and high performance after the second-generation fixed-point DSP processor and the third-generation fixed-point DSPTMS320C5X. . The TMS320LF2407 device integrates a 10-bit analog-to-digital converter ADC. The module is capable of sample/hold and A/D conversion of 16 analog input signals. However, the actual test requirements are ever-changing, and the use of the existing A/D modules of DSP can often not solve all problems. Based on the existing functional modules of TMS320LF2407, this paper adopts the 8-channel high-speed parallel A/D chip produced by MAXIM Company in the United States, and further expands its A/D conversion function, so that it can be better in the actual test environment. to adapt to various levels of testing needs.

2 8-channel high-speed parallel A/D sampling MAX155 chip

The MAX155 chip is a high-speed multi-channel analog-to-digital converter with parallel sample/hold (T/H) function, which can eliminate the time difference of input channel sampling. MAX155 has 8 analog input channels, each channel has its sample/hold module (T/H), and each sample and hold module samples synchronously. The A/D conversion time of each channel is 3.6us, and the result is stored in the internal 8×8RAM register. The MAX155 can also provide a reference output voltage of 2.5V. The MAX155 can also be programmed to enter a low-power mode.

When using the +5V supply voltage to supply power alone, the MAX155 can input unipolar or bipolar single-terminal or differential input signals. For the input signal that needs a larger dynamic range or the level fluctuates up and down the ground level, the VSS power supply input end of the MAX155 should be connected to -5V.

Outputting a negative pulse to the WR pin can start the conversion. By sending a negative pulse to the RD pin, the conversion result stored in the RAM can be read. The input and output of data can be implemented through the bidirectional data port of the MAX155, or through hardware. The way of connection makes the chip work only in output mode.

2.1 The hardware architecture of the system

In the system hardware circuit, 8 channels of analog signals are input to the analog input ports AIN0 and AIN7 of MAX155. You can program the MAX155 to determine which signals are sampled at the same time, and can also be configured as differential bipolar, differential unipolar, Typical input methods such as single-terminal bipolar and single-terminal unipolar. The configuration of the MAX155 chip here is realized by writing data to the MAX155 data port through DSP. Since the data line of 2407 has 16 bits, while MAX155 has only 8 Bit data line, so the lower 8-bit data line of 2407 is selected as the data output line. After the conversion, the A/D conversion result is stored in an 8×8-bit RAM inside the chip, and is sent to the RD pin of MAX155 by sending Negative pulse, the DSP controller can read the conversion result stored in RAM in turn. CS is the MAX155 chip select signal in the figure, which is jointly determined by the address output pin signal A0 of the DSP and the external space strobe pin signal IS. In addition, MAX155 also needs an external clock input signal with a frequency of 5M, which can be provided by the CLKOUT terminal of the DSP. After the sampled data is read into the DSP, the data can be sent through the serial port through the SCI (serial communication interface) module integrated in the DSP. To the host computer. The host computer generally adopts a PC, so that, using the powerful functions of the PC, various processing such as saving, displaying, printing or calculating the input data can be performed, and the results of the calculation output can be used to further analyze the peripheral equipment. Take control.

2.2 The software composition of the system

MAX155 is a programmable A/D conversion chip, which must be configured before A/D conversion is implemented. The definition of each bit of its configuration register is shown in Table 1:

The typical working process of the MAX155 is as follows:

(1) Configure each channel before conversion by inputting data to the configuration register. See Table 1 for the configuration method.

(2) Send a WR pulse to the MAX155 chip to start all configured channels for sampling (at this time, INH=0 should be set). When the conversion starts, the Busy line level becomes low, and the conversion result is stored in RAM. When the Busy line goes high, the conversion ends. , the conversion result is stored in RAM.

(3) Set the INH bit to 1, and each read pulse sent by the 2407 will read one conversion result from the RAM. After reading all the conversion results in a loop, the next read signal will start from the lowest configuration channel again.

⑷ To start a new conversion with the previous configuration, repeat steps 2 and 3.

In this system, we configure each channel as follows:

Channel (1, 0): differential, bipolar;

Channel 2: single terminal, unipolar;

Channel 3: single terminal, bipolar;

Channel 4: single terminal, bipolar;

Channel 5: single terminal, unipolar;

Channels (6, 7): Differential, Bipolar.

The corresponding configuration procedures are as follows:

*SCSR1=0X0EFE;

WSGR=0X0040;

outport(0X01,0X71);

outport(0X01,0X12);

outport(0X01,0X33);

outport(0X01,0X34);

outport(0X01,0X15);

outport(0X01,0X56);

outport(0X01,0X67);

It is worth noting that the last statement sets INH to 0, enabling 8-way parallel A/D conversion. After the conversion, the conversion results can be read in sequence through the RD signal. The corresponding program is as follows:

input(0x01,&INDATA[0]);

import(0X01,&INDATA[1]);

input(0X01,&INDATA[2]);

input(0x01,&INDATA[3]);

input(0X01,&INDATA[4]);

import(0X01,&INDATA[5]);

Here, the conversion result is stored in the variables of INDATA[0] to INDATA[5]. Through the serial port, the data saved in INDATA[0] to INDATA[5] can be sent to the upper computer for further processing.

3 Conclusion

The MAX155 chip used in this paper has the characteristics of fast sampling speed, low power consumption, and can work in various operating modes and power management modes through programming, which makes its application very convenient. This paper discusses the application of MAX155 chip to expand the A/D sampling function of TMS320LF2407, so that it can not only perform serial A/D sampling, but also meet the needs of multi-channel parallel A/D sampling. expanded its application range. The experimental results show that the hardware and software structure of the system is reasonable and the system runs well.

Responsible editor: gt

Leave a Reply

Your email address will not be published.