High-precision data acquisition device based on PIC16F87X series microcontroller

Publisher:钱币之歌Latest update time:2011-12-03 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1ADS1210 Pins and Functions
ADS1210 is a new type of A/D converter with high precision, wide dynamic range, single 5V power supply and 24-bit resolution. The package types are 18-pin dual in-line and 18-pin surface mount. The pin function description is shown in Table 1.



●Instruction Register (INSR)
The instruction register is an 8-bit register that indicates whether the system is performing a read or write operation, and determines the byte length of the read/write operation and the starting address of the register for the read/write operation. 
●Command Register (CMR)
The command register is the key to the ADS1210, and it controls all the features and functions of the ADS1210. Once the falling edge of the serial port clock writes the last bit of the data byte into the command register, the new mode takes effect. The command register controls the options and operating modes selected by the ADS1210, including the gain (G) setting of the programmable gain amplifier, the enhancement mode (TMR), the output data rate (Decimation), and the correction method, etc.
●Data Output Register (DOR)
The data output register stores the most recent conversion result. Before the "data ready signal" becomes low, the contents of the register are updated with a new result.
●Offset Register (OCR)
The offset register performs offset correction on the conversion result before it is placed in the data output register. In this application, the contents of the offset register may be the self-correction result or the system correction result, and the offset register can be read and written through the serial port. 
● Full-scale correction register (FCR)
The full-scale correction register performs full-scale correction on the conversion result before it is placed in the data output register. The actual offset register value and the full-scale correction register value change with changes in structure, temperature and power supply. Therefore, the actual value of the offset register and the full-scale correction register in any state cannot be accurately predicted, that is, the correction of a given system cannot simply obtain a certain result by measuring the external error and writing it into the register as a correction factor.
Communication with ADS1210 starts after the data conversion is completed, that is, when the level is low. Usually, the instruction register is written first to indicate the starting address and byte length of the register to be operated next, and whether the system is reading or writing, thereby determining what type of communication is to be performed next. After that, with the generation of the appropriate clock pulse (the number of cycles of the SCLK clock is determined by the byte length specified by the instruction register), the register specified by the instruction register is operated, and after completion, the next low level of the pin is waited for, and this is repeated until the data acquisition is completed. 
In actual measurement, power supply is an important factor affecting accuracy. In order to reduce its influence, the power supply must be stable and have low noise. Therefore, MAX666 is used as the voltage regulator chip of +5V voltage, and the voltage fluctuation is reduced by using the role of peripheral capacitors. In addition, ADS1210 can use its own correction register to calibrate the A/D conversion data through programming to further improve the measurement accuracy. Through the setting of CMR, the user can choose the appropriate correction mode. Under background correction, the correction is repeated at a fixed time interval. For other types, normal operation is restored once the correction operation is completed. This design adopts the background correction mode. 
The hardware system design of the PIC series microcontroller is simple, and the instruction system design is refined. The PIC microcontroller integrates a wealth of peripheral modules, which can realize the control of peripheral modules by operating the internal registers.
The serial expansion communication interface is an important channel for data exchange between the microcontroller and other computers or modules. The PIC16F87X series microcontroller is mainly equipped with two forms of serial communication modules, namely the master synchronous serial communication MSSP and the universal synchronous/asynchronous receiver and transmitter USART. Among them, the MSSP module is mainly used for short-distance serial communication within the system, such as SPI and I2C modes; the USART module is mainly used for long-distance serial communication between systems. [page]

SPI (Serial Peripheral Interface) is a synchronous serial expansion interface for microcontroller peripheral chips. Since ADS1210 has a flexible synchronous serial interface compatible with the SPI communication mode, all data exchanges between the PIC microcontroller and ADS1210 in this design adopt the SPI communication mode. The SPI module circuit of the PIC microcontroller consists of three main parts: the transmit buffer, the receive buffer, and the shift register.
The data format used by USART in asynchronous mode is 1 start bit, 8 or 9 data bits, and 1 stop bit, without a parity check code, and the commonly used data is 8 bits. The 8-bit baud rate generator BRG provided on the chip can use the system clock signal to generate a standard baud rate frequency for serial transmission. USART has independent transmitters and receivers, but the data format and baud rate they use are the same. This design uses the USART asynchronous transmission function of the microcontroller to transmit the collected data to the host computer after necessary level conversion through the MAX232 chip. 
The interface between ADS1210 and external devices includes two-wire, three-wire, four-wire and multi-wire. Here, the four-wire system is used to realize the interface with the microcontroller. The interface signals are data ready signal (), data input/output line (SDIO), data output line (SDOUT), and clock signal line (SCLK). See Figure 1 for details.


The flowchart of the PIC microcontroller program is shown in Figure 2.
Figure 3 is the software running interface used to receive data from the serial port, which serves as the test software for this design. The data displayed in the receiving area are several groups of data collected using this data collector, and the status bar RX at the bottom of the interface shows the number of groups of received data. Experiments have shown that this design can fully achieve an accuracy of more than 20 bits. This
design can be used in high-resolution measurement situations such as industrial process control, instrumentation, blood analysis, intelligent transmitters, potentiometers, quality standards, and pressure conversion. For example, it can be used for performance testing of capacitive pressure microsensors with high accuracy requirements, and has a certain degree of versatility.

Reference address:High-precision data acquisition device based on PIC16F87X series microcontroller

Previous article:Interface Design between LCD Display and PIC Microcontroller
Next article:Realization of Rail Pressure Tester Based on PIC16F876A Single Chip Microcomputer

Recommended Content
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号