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.
Previous article:MCU timer/counter design output PWM
Next article:Low-level driver programming based on single-chip LCD timing diagram
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Circuit diagram of two-wheeled electric vehicle
- [Domestic RISC-V Linux Board Fang·Starlight VisionFive Trial Report] Python output HELLOWORLD
- Solutions for control loop design
- Data size transferred after power failure
- About DMX dimming system
- What is UWB?
- Solution to blind area communication of intercom
- Xunwei i.MX8MM Development Board Linux Android 9.0 Crotex-M4 Data Update
- Commonly used algorithms for drones - Kalman filter (Part 3)
- GigaDevice has also entered the wireless field and released its first GD32W515 series Wi-Fi MCU. Do you want to try it?