High-precision data acquisition system based on AT89S52 and MAX197

Publisher:as233632621Latest update time:2014-11-24 Source: 21ic Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:High-precision data acquisition system based on AT89S52 and MAX197

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

Design of Intelligent Quick Charger Control System Based on AT89S52
1. Introduction This control system is designed for 120w intelligent fast voltage-stabilized power supply. This fast charger is developed for troops working in field conditions, so it is required to have the advantages of small size, light weight, high intelligence, easy operation, etc. At the same time, i
[Microcontroller]
Design of Intelligent Quick Charger Control System Based on AT89S52
High-precision data acquisition system based on AT89S52 and MAX197
0 Introduction The system designed by the common eight-bit analog-to-digital conversion chip (such as ADC0809 , 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-
[Microcontroller]
High-precision data acquisition system based on AT89S52 and MAX197
Software and hardware design of lidar gate control system based on AT89S52 microcontroller
This paper introduces the working principle of the lidar gate control system based on AT89S52, and focuses on the implementation method of system hardware and software. The system uses the AT89S52 microcontroller as the core and is equipped with digital potentiometers, photoelectric couplers, monostable triggers and o
[Microcontroller]
Software and hardware design of lidar gate control system based on AT89S52 microcontroller
Clock program (LED+DS1302+AT89S52)
#include /****************************DS1302 and AT89S52 pin connection************************/ sbit T_RST=P3^5;  sbit T_CLK=P3^6;                  sbit T_IO=P3^7;                                  sbit ACC0=ACC^0; sbit ACC7=ACC^7; unsigned char seg ={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}; //0~~
[Microcontroller]
Design and implementation of intelligent fast charger control system based on AT89S52
  1. Introduction   This control system is designed for 120w intelligent fast voltage-stabilized power supply.   This fast charger is developed for troops working in field conditions, so it is required to have the advantages of small size, light weight, high intelligence, easy operation, etc. At the same time, it has
[Power Management]
Design and implementation of intelligent fast charger control system based on AT89S52
Development of a Visual Electronic Stethoscope Based on AT89S52
Abstract: A new type of visual electronic stethoscope is based on AT89S52 single-chip microcomputer, realizes heart sound data acquisition system by electret sound sensor, and realizes display by graphic LCD module. The system structure diagram of electronic stethoscope is introduced, and the hardware circuit princ
[Medical Electronics]
Development of a Visual Electronic Stethoscope Based on AT89S52
Design of sound and light control switch based on AT89S52 single chip microcomputer
  0 Introduction   With the development of electronic technology, especially the development of digital technology, it is becoming more and more important to use digital circuit technology to realize the automatic lighting of lights, energy saving and power saving, and extend the life of lights, and it is close to r
[Microcontroller]
Design of sound and light control switch based on AT89S52 single chip microcomputer
Latest Microcontroller Articles
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号