0 Introduction
The system designed by the common eight-bit analog-to-digital conversion chip (such as ADC0809 [3], etc.) is relatively simple and low-cost, but sometimes the eight-bit accuracy is not enough. At this time, we have to choose a higher-precision analog-to-digital conversion chip. Among them, MAX197 is a 12-bit precision analog-to-digital conversion chip with good cost performance. The MAX197 chip is a fast analog-to-digital conversion chip of Maxim Corporation in the United States. The minimum conversion time is only 6 μs, which is much shorter than the 100 μs of ADC0809. Its input signal bandwidth can reach 5 MHz, and it has a 12-bit parallel three-state data interface. In addition, the MAX197 chip contains a high-precision reference voltage source and clock circuit, so it only needs a very simple external circuit to complete the analog-to-digital conversion function, which is very convenient to use.
1 Features and performance of MAX197 chip:
1.1 The main advantages of MAX197:
1) Only use a single 5 V power supply; 2) 12-bit resolution, 1/2LSB linearity; 3) Four ranges are available: 0~+5V, 0~+1OV, -5~+5V, -10~+10V: 4) 8 analog input channels with input voltage protection (-16.5v~+16.5V); 5) Minimum 6 μs conversion time, maximum 100kh/s sampling rate; 5) Internal 4.096V reference voltage; 6) Two power-down working modes, two working clocks are optional, and two acquisition modes are optional.
1.2 Acquisition mode of MAX197
1.2.1 Internal acquisition mode The
internal acquisition mode is selected by writing a control word that clears the ACQMOD bit (ACQMOD=0). In this mode, a write pulse will trigger an internal capture cycle, and this capture cycle is internally timed and is 6 clock cycles. When the capture interval of 6 clock cycles ends, the conversion begins. The conversion time is 12 clock cycles, regardless of internal or external acquisition mode.
1.2.2 The external acquisition mode
uses two independent write pulses to control the start of capture and conversion. The first pulse, together with ACQMOD=1, starts a capture interval of indeterminate length; the second write pulse together with ACQMOD=0 terminates the capture and starts a conversion on the rising edge of the write pulse. However, if the second control word contains ACQMOD=1, an indeterminate capture interval time will be re-triggered. The external acquisition mode can control the sampling interval more accurately and can independently control the capture and conversion time.
1.3 Control word of MAX197
MAX197 has an 8-bit control word, which controls the operating mode, capture mode, range selection, and analog input channel selection of this chip. Its specific definition is shown in Table 1:
2 Hardware and software implementation of high-precision data acquisition system
2.1 Hardware circuit of high-precision data acquisition system
This system uses AT89S52, which has superior performance among the 51 series microcontrollers, as the main processing chip. AT89S52 is a new eight-bit microcontroller launched by ATMEL in 2001. It has 8K FLASH as a general program storage space and has excellent features such as in-system programming.
The circuit schematic diagram of the data acquisition system designed using AT89S52 and MAX197 is shown in Figure 1.
As shown in Figure 1, the eight-bit data line of MAX197 is connected to the P0 port of the microcontroller for writing control words and reading data; HBEN is connected to P21 to control the high four bits or low eight bits of the read data; the RD and WR pins of MAX197 are connected to the RD and WR pins of AT89S52 respectively; the chip select CS pin is connected to the P22 pin of AT89S52. [page]
2.2 Assembly program of high-precision data acquisition system
The following is the main program of the above system circuit using interrupt mode to collect data:
ORG 0000H
L JMP START
2.3 Implementation of digital filtering of microcontroller
For the case where random noise interference is very serious, digital filtering can also be performed on the collected and converted data. For the interference of random signals, we can use the method of sampling several times and then finding the average value as the final result to perform digital filtering. The main idea of finding the average value in the microcontroller is: first do addition with carry on the sampled data, and then complete the division operation by shifting (shifting right by one bit is equivalent to dividing by 2). Assume that 8 sets of data are collected, and the lower eight bits are stored in units 30H~37H, and the upper eight bits are stored in units 38H~3FH. The lower bits of the filtered data are stored in units 30H, and the higher bits are stored in units 38H. The assembly program can be written as follows:
3 Conclusion
This paper mainly discusses how to design a high-precision data acquisition system using the high-precision analog-to-digital conversion chip MAX197 and the 51 series microcontroller AT89S52. The system design ideas, detailed design of hardware and software are given, and the basic principles and implementation methods of microcontroller digital filtering technology are introduced. This system has the characteristics of high precision, fast conversion speed, simple program, and low CPU occupancy.
Previous article:Automatic line patrol wheeled robot control system based on single chip microcomputer and CPLD
Next article:Design of Laser Coded Lock Based on Single Chip Microcomputer
Recommended ReadingLatest update time:2024-11-23 10:31
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- System Solution for Car-mounted Mobile TV Reception
- Automatic curtain opening and closing controller
- Program Reading
- Bluetooth RF Testing
- EMC Basics---Huawei
- SparkRoad-V thermal imaging data acquisition and display
- GD32VF103 modified firmware library for Gigabit RISC-V core
- Does the CC2640 MultiRole example's protocol stack support I2C?
- [Raspberry Pi Pico Review] CoreMark program porting, test running points
- [TI mmWave Radar Evaluation]_4_AWR1843BOOST Corridor Ranging Test