PC104 Module Diamond-MM-AT principle and application

xiaoxiao2021-03-06  38

Author: Sun Honghui Wu Qiang Li Jian Article type: design applications Article Joined: September 22, 2004 1: 8 Article Source: foreign electronic components

Abstract: The main parameters of 12-bit simulation I / O PC / 104 modules Diamond-MM-AT, internal structure, pin function, and characteristics are introduced, and the hardware connection relationship between Diamond-MM-AT and PC / 104 and the sensor is given.  Give them a successful A / D conversion application.

Key words: Diamond-MM-AT module; A / D conversion; PC / 104; Data Acquisition

1 main features

With the rapid development of digital signal processing technology and various fault analysis techniques, in some smaller systems made of industrial control, real-time acquisition and processing of signals have received more and more attention. The PC104 system module has been widely used in signal acquisition and fault analysis in the characteristics of compact, small size, and strong expandability. Diamond-MM-AT is a high-performance 12bit analog I / O port input and output PC / 104 module, including A / D, D / A conversion channel and timer / timer, the standard template structure can be processed with PC / 104 Module combination.

The main functions of the Diamond-MM-AT module are as follows:

The A / D conversion accuracy is 12 bits, which can support the maximum sampling frequency of 100kHz; 16 analog input channels and 2 12-bit D / A conversion channels; 8 digital input ports and 8 digital output ports; There are 32-bit programmable control count / timer; programmable setting D / A conversion range. 2 socket and pin function

Figure 1 shows an outline diagram of the Diamond-MM-AT module. Where J1, J2 is the expansion bus port, mainly for connecting to the PC / 104 processor bus. U7 is a A / D converter. J4 is a jumper for A / D to set an analog or bipolar input and an input range. J5 is D / A setting jumper for setting an analog to a single or bipolar output, and an output reference voltage value. U15 is a D / A converter. J6 is an interrupt level and base address setting jumper setting of the DMA (Direct Memory Access) standard, the module default site is: 0x300. The J3 is a 50-pin I / O port. Its specific arrangement is shown in Figure 2, and the ports are defined as follows: Vin7 / 7 ~ VIN0 / 0 : single pole mode analog A / D input port 7 ~ 0; Bid pole mode analog A / D positive input port 7 ~ 0;

VIN15 / 7-- VIN8 / 0-: Monole mode analog A / D input port 15 ~ 8; can also be used as bipolar mode analog A / D negative input ports 7 to 0;

Vout0vout1: D / A conversion output ports 0 and 1, respectively;

VREF OUT: 5 / -5V Accurate reference voltage output port;

VREF IN0 VREF IN1: Custom D / A conversion reference voltage range input port; DOUT7 ~ DOUT0: Digital output port 0 ~ 7, compatible with TTL / CMOS level;

DIN7 ~ DIN0: Digital input port 0 ~ 7, compatible with TTL / CMOS level; where DIN2 / GATE0  Digital input port 2 can also be used as the control door of counter 0, and when the port is high, DIN0 / GATE1 / 2  Digital Input Port 0  can be used as a control door of counter 1 and 2, and can be set by the control register 11;

IN0-: Counter 0 input (falling edge trigger);

OUT0OUT2: The output port of counter 0 and 2, respectively;

15V analog power supply;

5V: Connected to the PC / 104 expansion bus, used to provide 5V power supply;

AGND: simulating ground;

DGND: Digitally;

The Diamond-MM-AT module usually takes up 16-bit address space. 3 hardware connection relationship

The Diamond module and the hardware connection block diagram of the PC / 104 processor and the sensor are shown in Figure 3. In the figure, when the sensor measures the signal to be detected and the conditioning board is input, it can be modulated to the appropriate voltage signal range, and enter the corresponding I / O port corresponding to the DIA-MOND-MM-AT module, The DIA-MOND-MM-AT module is then converted to the required amount of data or analog, and finally the processing, display, and storage of the read / write data by the PC / 104 processor via the expansion bus. Its power supply is provided by the PC / 104 bus. In the Diamond-MM-AT module port J1, B1 is GND, B3 is 5V, B5 is -5V, B7 is -12V, b9 is 12V. 4 Data Acquisition Applications The following is a combination of PC / 104 as a processor and a Diamond-MM-AT module to perform A / D conversion read and write programs and a configuration method for each control register. The author has tested the procedure in practice and has been successfully used in a test engineering design.

#Define base 0x300

Main void {

Union  {UNSIGNED INT M; unsigned char n [2];} T; int DAT [3000];

INT I, CD;

INT FREQ = 2000; // Set the sampling frequency is 2 kHz;

OUTPORTB (Base 9, 0x83); // Allows interrupt, triggered by the counter;

OUTPORTB (Base 10, 0x08);  / / counter 1 generate 1 MHz square wave

OUTPORTB (Base 11, 0x05);  // A / D input range is 0 ~ 5V

T. m = (int) (500000 / freq); // 0.5MHz / FREQ summary to write the record value;

OUTPORTB (Base 15, 0x54); // Set counter 1 read / write low byte; OUTPORTB (Base 13, 0x01);  / / Write low bytes (two points) to counter 1;

OUTPORTB (Base 15, 0xB4);  // Set counter 2 read / write low bytes, read / write high bytes;

OUTPORTB (Base 14, T.N [0]);  / / write low bytes to counters 2;

OUTPORTB (Base 14, T.N [1]);                                 

OUTPORTB (Base 2,0xcc); / / Setting the measurement channel is a C channel (ie, the 12th channel);

For (i = 0; i <3000; i ) // Cyclic collection 3000 data;

{

OUTPORTB (Base 1, 0xFF);  // Clear FIFO; OUTPORTB (Base 8, 0xFF); // Sets the interrupt register 8, the counter trigger;

While ((InportB (Base 8) & 0x10) == 0x00); // Waiting for A / D conversion to end;

CD = InportB (Base 0)) // Reads low eight data;

CD = CD / 16; // Data right shift four digits, remove the right channel sign;

DAT [I] = InportB (Base 1); // Read high eight data;

DAT [i] = dat [i] * 16; // High eight bit data left shift four;

DAT [i] = dat [i] cd; // high eight bits plus the 4-bit data of the A / D conversion result;

}

...... 5 Conclusion

转载请注明原文地址:https://www.9cbs.com/read-70070.html

New Post(0)