Abstract: The LM12H458 contains 8-word RAM that can be used to store 32 words of the conversion result and store instructions. The work principle, pin function, and specific application circuits of LM12H458 are introduced. LM12H458 is the 8-channel data acquisition system chip produced by NS, which has high precision, rapid conversion, fast data transmission, high integration, power supply, and simple peripheral interface.
Key words: A / D conversion; data acquisition system (DAS); LM12H458
1 Overview
LM12H458 is a highly integrated data acquisition system? DAS? Chip, it will be sampled, and the A / D conversion is integrated into a piece of chip, thereby greatly reduces the design of peripheral circuits. Its 8-channel analog signal input can be used as a single-ended input, and two two sets of differential inputs. A 2.5V reference voltage provided inside the device, 8 × 48bit instructions RAM, and 32 × 16bit FIFO greatly reduce the burden on the microprocessor. The LM12H458 operating voltage is 3 ~ 5.5V, the power consumption is less than 34MW, and the power consumption in the standby mode is only 50 μW. In addition, the LM12H458 has the following main performance:
● There are three working modes: 13-bit mode with symbols, 9-bit modes with symbols and watchdog patterns;
● 8 analog signal input channels, analog signals can be individually input, or differential input;
● Built-in sampling and 2.5V reference voltage;
● Contains 32 × 16 bits of FIFO;
● Sampling time and conversion rate can be programmed;
● Has self-calibration and diagnostic mode;
● With 8-bit or 16-bit data bus.
Be
2 pin function and function description
The pin function of the LM12H458 is listed in Table 1. Figure 1 is a block diagram thereof. The LM12H458 is a multi-function data acquisition system, and the internal charge weight distribution ADC uses a capacitor tray network instead of a normal resistor ladder network, and uses a DAC of the step-by-step register to generate an intermediate voltage between VREF- and VREF +, the voltage and input The sampling voltage compares each bit of the digital output, the number of intermediate voltages, and the comparison of the comparison corresponds to the resolution of the ADC, by calibrating the capacitance network in the ADC to calibrate each bit accuracy of the digital output. LM12H458 has two different calibration modes: one is compensated for offset voltage or zero error, only one offset error is measured in this mode, and establish a correction factor according to this; another is correcting offset error and ADC linear error , Called full calibration. Measure the offset error in this mode eight times and take the average value to establish a correction factor. The correction coefficients of the above two modes are stored in the internal offset correction register. The linear correction of the LM12H458 is obtained by correcting the mismatch capacitance of the internal DAC, and the calibration algorithm is stored in the LM12H458 internal ROM, and each of the capacitors can be calibrated and averaged, thereby generating a linear correction coefficient. Once calibrated, the internal arithmetic logic unit (ALU) can correct each conversion result using the offset error correction coefficient and the linear correction coefficient. The watchdog pattern is used to monitor the magnitude of the single-ended input or differential input signal. Each sampling signal has up and down two thresholds, and the input signal is higher than or below a certain limit.
Table 1 foot symbol and function of LM12H458
Pins number
Symbol
Function
1,12
VA +, VD +
Analog power supply and digital power supply
2 ~ 11, 13 ~ 18
D0 ~ D15
The bidirectional data bus, the bus width is determined by the BW. BW = 1, the bus width is 8bit, BW = 0, the bus width 16bit
19
RD
Read signal input
20
WR
Write signal input
twenty one
CS
Chip select input
twenty two
WR
Address latch, used for bus multiplexing systems
twenty three
Ale
External clock input, frequency range is 0.05MHz ~ 10MHz
24 ~ 28
A0 ~ A4
Address line
29
Sync
Synchronous input / output, when the "I / O Selection" bit of the configuration register is clear, Sync is input; and when the "I / O selection" position is 1, SYNC is output.
30
BW
When the bus width is positioned, when BW = 1, the bus width is 8bit, BW = 0, the bus width is 16bit.
31
Int
Interrupt output, low level is effective
32
DMARQ
DMA request output, high power is effective
33
GND
Ground
34 ~ 41
IN0 ~ IN7
Analog signal input channel
42
VREF-
Negative reference voltage input, voltage range is 0 ~ VREF-
43
VREF +
Positive reference voltage input, voltage range 0 ~ Va +
44
Vrefout
Internal 2.5V reference voltage output
The LM12H458 is a multi-function data acquisition system, with 28 16bit registers inside, and the functions of each register are as follows:
The configuration register is the DAS control center, which can be used to control the startup and stop, reset the RAM pointer and flag, set the standby state, calibration offset, and linear errors, select the RAM area, and the like.
The instruction RAM is divided into three districts: the instruction area, the threshold area 1 area, and the threshold 2 area. Each instruction (48bit = 3x16bit) is dispersed in three 16-bit RAM zones, and the selection of the three districts can be controlled by the RAM pointer of the configuration register 2bit. The instruction area can set the selection, mode of operation, sampling time, and cycle bit of the channel. Other two districts are used to set up the upper and lower thresholds. DAS can continuously perform all set instructions from instruction 0, and the loop bit of the last instruction execution is 1, and then returns to the instruction 0. During the execution of the instruction, the microprocessor cannot access the instruction RAM, which can only be accessed after the processor terminates the instruction cycle.
FIFO is a read-only register that can be used to store conversion results.
The interrupt enable register allows the user to activate 8 interrupt sources, and the high byte of the register is related to interrupt 1, 2.
Figure 2 LM12H458 and 80C51 interface circuit Click to enlarge
Interrupt status register and threshold status register is used to indicate whether DAS interrupt source and input signals exceed the upper threshold or lower.
The timing register is used to set the waiting time before the instruction execution. The bit9 of the instruction register can enable or disable insertion waiting time.
The LM12H458 has eight interrupt sources, and each interrupt has the same priority, the interrupt enable register enables or disables the corresponding interrupt, when an interrupt occurs, the corresponding position 1 of the interrupt status register 1. The functions corresponding to each interrupt are as follows:
● INT0: Analog input signal generates an interrupt outside of the specified threshold.
● INT1: When the sequence generator executes an instruction, the instruction address is equal to the value of the value set in the interrupt enable register, generates an interrupt.
● The result of INT2: A / D conversion is saved in FIFO, and when the number of converted results in the FIFO is equal to the value set by the interrupt enable register bit 11 to 15, an interrupt is generated.
● INT3: An interrupt is generated after completing a single sample automatic calibration.
● INT4: The interrupt is generated after completing a complete self-calibration.
● INT5: An interrupt is generated when the instruction is stopped at 1.
● INT6: The power supply indicator is interrupted. When the chip supply voltage is less than 4V, an interrupt is generated.
● INT7: An interrupt is generated after returning from the wait mode.
Figure 3 Programming flowchart Click to enlarge
3 application
3.1 Hardware circuit design
The LM12H458 flexible bus interface simplifies interfaces with a variety of microprocessors, which can be connected to the 8-bit processor, and can be easily connected to the 16-bit microprocessor. Figure 2 is an interface circuit diagram of AT89C51 and DAS. This circuit uses a full address decoding method to generate a chip select signal CS of DAS. The address space of the DAS map is 0000-001F, and the data bus width is 8bit. The 74HC373 in the figure is used to latch the low 8-bit address, and the 8bit amplitude comparator can be used to decode high 8-bit addresses, generate U5 (74HC138) select communication by comparing the input logic selected by the comparison address and address range. No. 74HC138 Y0 can be used as a chip selection signal for DAS. DAS's INT port is used to drive the interrupt INT0 of the AT80C51, and it also allows the DAS to request an interrupt service.
3.2 Software Programming
Although the LM12H458 is flexible, extensive, the basic workflow is constant, and Figure 3 is a typical programming process. After the processor is initialized, the appropriate instruction should be written to the DAS to initialize the DAS to set the sampling time, the working mode, channel selection, and the like. Complete a full calibration requires 4944 clock cycles. If the interrupt enable, the interrupt should be generated after calibration to notify the microprocessor. Full calibration affects the internal flags and pointers of the DAS, which affects the execution of the instructions. Therefore, it must be reset after calibration. Set the bit0 of the configuration register to 1 to start the sequencer. P in the flowchart represents different working modes defined by the user. Figure 3 (a) is the initialization of DAS and the startup flow of the sequencer, and Fig. 3 (b) is an interrupt service routine. When the interrupt service is entered, the bit0 of the configuration register should be cleared to stop the A / D conversion, and then process the interrupt transaction.
4 Conclusion
LM12H458 data acquisition system chip is powerful, flexible, can be widely used in data records, measuring instruments, inertial guidance, process control, energy consumption management, etc. Due to the limitations of the space, this article is only briefly introduced, and detailed technical information about LM12H458 can be obtained on the National Semiconductor website. The author has used LM12H458 in a test system for PI network quartz crystal components. Use prove: The conversion accuracy of LM12H458 is high and the work is stable and reliable. , Reading the full text, the technology area
About μClinux transplantation on ARM7 S3C4510B
Multi-looped into charge and discharge controller design
Interrupt service routines for ARM embedded systems
LED dimming engine design based on 8-bit MCU
How to display Chinese characters, ASCII characters and color graphics on the LCD monitor
Our other product: