Application of LM12H458 Highly Integrated Data Acquisition System DAS Chip

Publisher:SparkCrafterLatest update time:2011-09-06 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Overview

LM12H458 is a highly integrated data acquisition system (DAS) chip, which integrates sampling and holding, A/D conversion in one chip, thus greatly reducing the design of peripheral circuits. Its 8-way analog signal input can be used as single-ended input or as differential input in pairs. A 2.5V reference voltage, 8×48bit instruction RAM and 32×16bit FIFO provided inside the device greatly reduce the burden on the microprocessor. The operating voltage of LM12H458 is 3~5.5V, the power consumption is less than 34mW, and the power consumption in standby mode is only 50μW. In addition, LM12H458 has the following main performances:

●There are three working modes: signed 13-bit mode, signed 9-bit mode and watchdog mode;

●There are 8 analog signal input channels, and the analog signal can be input in single-ended or differential mode;

●Built-in sample and hold and 2.5V reference voltage;

●Built-in 32×16bit FIFO;

●Sampling time and conversion rate are programmable;

●With self-calibration and diagnostic mode;

●With 8-bit or 16-bit data bus.

2 Pin Function and Function Description

The pin functions of LM12H458 are listed in Table 1. Figure 1 is its internal functional block diagram. LM12H458 is a multifunctional data acquisition system. Its internal charge redistribution ADC uses a capacitor ladder network instead of an ordinary resistor ladder network, and uses a DAC with a step-by-step approximation register to generate an intermediate voltage between VREF- and VREF+. This voltage can be compared with the input sampling voltage to generate each bit of the digital output. The number of intermediate voltages and the number of comparisons correspond to the resolution of the ADC. By calibrating the capacitor network in the ADC, the accuracy of each bit of the digital output can be calibrated. LM12H458 has two different calibration modes: one is to compensate for the offset voltage or zero error. In this mode, the offset error is only measured once, and the correction coefficient is established accordingly; the other is to correct the offset error and ADC linear error, which is called full calibration. The offset error in this mode is measured eight times, and the correction coefficient can be established by taking the average value. The correction coefficients of the above two modes are stored in the internal offset correction register. The linear correction of LM12H458 is obtained by correcting the mismatched capacitors of the internal DAC. The calibration algorithm is stored in the internal ROM of LM12H458. Each capacitor can be calibrated 8 times and the average value is taken to generate the linear correction coefficient. Once calibrated, the internal arithmetic logic unit (ALU) can use the offset error correction coefficient and the linear correction coefficient to correct each conversion result. The watchdog mode is used to monitor the amplitude of the single-ended input or differential input signal. Each sampling signal has upper and lower thresholds, and an interrupt will be generated when the input signal is higher or lower than a certain threshold value.

Table 1 LM12H458 pin symbols and functions

Pin Number Symbol Function
1,12 VA+,VD+ Analog and digital power supplies
2~11,13~18 D0~D15 Bidirectional data bus, the bus width is determined by BW. BW=1, the bus width is 8 bits, BW=0, the bus width is 16 bits
19 RD Read signal input
20 WR Write signal input
21 CS Chip select input
22 WR Address latch, used in bus multiplexing systems
23 BUT External clock input, frequency range is 0.05MHz~10MHz
24~28 A0~A4 Address Lines
29 SYNC Synchronous input/output, when the "I/O Select" bit of the configuration register is cleared, SYNC is input; when the "I/O Select" bit is set to 1, SYNC is output.
30 BW Bus width setting bit, when BW=1, the bus width is 8 bits, when BW=0, the bus width is 16 bits
31 INT Interrupt output, low level valid
32 DMARQ DMA request output, high level valid
33 GND Grounding
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

LM12H458 is a multifunctional data acquisition system with 28 16-bit registers inside. The functions of each register are as follows:

The configuration register is the control center of DAS and can be used to control the start and stop of the sequencer, reset the RAM pointer and flags, set the standby state, calibrate offset and linear error, select RAM area, etc.

The instruction RAM is divided into three areas: instruction area, threshold 1 area, and threshold 2 area. Each instruction (48bit=3X16bit) is scattered in three 16-bit word-width RAM areas. The selection of the three areas can be controlled by the 2-bit RAM pointer of the configuration register. The instruction area can set the channel selection, working mode, sampling time and loop bit. The other two areas are used to set the upper and lower threshold values. DAS can continuously execute all set instructions from instruction 0, and return to instruction 0 when the loop bit of the last instruction executed is 1. During the execution of instructions, the microprocessor cannot access the instruction RAM, and it can only be accessed after the processor terminates the instruction loop.

FIFO is a read-only register that can be used to store conversion results.

The interrupt enable register allows the user to activate eight interrupt sources. The high byte of this register is related to interrupts 1 and 2.

Figure 2 Interface circuit between LM12H458 and 80C51 Click to enlarge

The interrupt status register and the threshold status register are used to indicate the DAS interrupt source and whether the input signal exceeds the upper threshold or the lower threshold.

The timing register is used to set the waiting time before the instruction is executed. Bit 9 of the instruction register can enable or disable the insertion of the waiting time.

LM12H458 has 8 interrupt sources, each with the same priority level. The interrupt enable register can enable or disable the corresponding interrupt. When an interrupt occurs, the corresponding position of the interrupt status register is set to 1. The functions corresponding to each interrupt are as follows:

●INT0: The analog input signal generates an interrupt when it is outside the specified threshold value.

●INT1: When the sequence generator executes a certain instruction and the instruction address is equal to the value set in bit8~bit10 of the interrupt enable register, an interrupt is generated.

●INT2: The results of A/D conversion are stored in FIFO. When the number of conversion results in FIFO is equal to the value set in the interrupt enable register bits 11 to 15, an interrupt is generated.

●INT3: Generates an interrupt after completing single-sampling automatic calibration.

●INT4: Generates an interrupt after a complete self-calibration.

●INT5: During execution, an interrupt is generated when the instruction pause bit is 1.

●INT6: Power indication interrupt. When the chip power supply voltage is less than 4V, an interrupt occurs.

●INT7: Generates an interrupt 10ms after returning from wait mode.

Figure 3 Programming flow chart click to enlarge

3 Applications

3.1 Hardware Circuit Design

The flexible bus interface of LM12H458 simplifies the interface with various microprocessors. It can be connected to 8-bit processors and 16-bit microprocessors. Figure 2 is the interface circuit diagram of AT89C51 and DAS. This circuit uses full address decoding to generate the chip select signal CS of DAS. The address space mapped by DAS is 0000-001F, and the data bus width is 8 bits. The 74HC373 in the figure is used to latch the lower 8-bit address, and the 8-bit amplitude comparator can be used to decode the upper 8-bit address. By comparing the address with the input logic selected by the address range, the selection signal of U5 (74HC138) can be generated. Y0 of 74HC138 can be used as the chip select signal of DAS. The INT port of DAS is used to drive the interrupt INT0 of AT80C51, and it also allows DAS to request interrupt service.

3.2 Software Programming

Although LM12H458 is flexible and widely used, the basic workflow remains unchanged. Figure 3 shows its typical programming process. After the processor is initialized, appropriate instructions should be written to the DAS to initialize the DAS so as to set the sampling time, working mode, channel selection, etc. It takes 4944 clock cycles to complete a full calibration. If the interrupt is enabled, an interrupt should be generated after calibration to notify the microprocessor. Full calibration will affect the internal flags and pointers of the DAS, thereby affecting the execution of instructions. Therefore, it must be reset after calibration. Setting bit0 of the configuration register to 1 can start the sequencer. The p in the flowchart represents different user-defined working modes. Figure 3(a) shows the initialization of the DAS and the startup process of the sequencer, and Figure 3(b) shows the interrupt service routine. After entering the interrupt service, bit0 of the configuration register should be cleared to stop the A/D conversion, and then the interrupt transaction is processed.

4 Conclusion

The LM12H458 data acquisition system chip is powerful and flexible in application. It can be widely used in data recording, measuring instruments, inertial guidance, process control, energy consumption management, etc. Due to space limitations, this article only briefly introduces it. Detailed technical information about LM12H458 can be obtained on the website of National Semiconductor. The author has used LM12H458 in the test system of PI network quartz crystal components. The use has proved that the conversion accuracy of LM12H458 is very high and the operation is stable and reliable.

Reference address:Application of LM12H458 Highly Integrated Data Acquisition System DAS Chip

Previous article:MCU timer/counter design output PWM
Next article:Low-level driver programming based on single-chip LCD timing diagram

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号