0 Preface
In computer measurement, control and signal processing, data acquisition plays a vital role. Data acquisition is an important means of obtaining data. It is the process of automatically collecting information from analog or digital units under test such as sensors or other devices under test. The use of A/D conversion resources inside ARM has the advantages of high conversion speed, reliable operation, and low design complexity. At the same time, ARM also has the characteristics of small size, high computing speed, and high A/D conversion resolution, which makes ARM widely used. This paper uses AT91M55800A in the ARM7 series of ATMEL to design a simple data acquisition solution. This solution has the characteristics of simple structure, easy development, strong reliability, low price, etc., and has certain practical value.
1 Structure and Functionality of Data Acquisition Solution
The solution structure is shown in Figure 1.
The scheme consists of three parts: receiving, A/D conversion and processing, and output. This scheme is based on AT91M55800A, which is a high-performance 32-bit processing chip with an 8-to-1 analog channel and a 10-bit A/D conversion channel. The preprocessing circuit isolates, amplifies and filters the signal picked up by the sensor to the 0-3 V required for A/D conversion. The processed analog signal is converted into a digital signal through the A/D conversion channel in AT91M55800A, and is processed accordingly according to the requirements, and finally output by the LCD display. At the same time, this scheme uses Flash memory as program memory to save data.
2 Hardware Composition
AT91M55800A is a member of ATMEL's AT91 16/32-bit microcontroller family based on the ARM7TDMI core. It is directly connected to the off-chip memory through a fully programmable external bus interface, so that the read or write operation can reach one clock cycle at the fastest. By integrating the ARM7TDMI processor core with on-chip SRAM, various peripheral function modules, analog interfaces and low-power oscillators into a single silicon chip, AT91M55800A provides a highly flexible and cost-effective solution for low-power applications. Its main features are as follows:
a) Integrates ARM7TDMI ARM Thumb processor core, high-performance 32-bit RISC architecture, high-code-density 16-bit instruction set, and embedded ICE;
b) 8 kB on-chip SRAM, 32-bit data bus width, single clock cycle access, solution can be expanded to a maximum of 64 MB memory, software programmable 8-bit or 16-bit external data bus;
c) Master/slave SPI interface, 8-bit to 16-bit programmable data length, 4 external slave chip selects;
d) Programmable watchdog circuit to improve the safety and reliability of the solution;
e) 58 programmable I/O lines, expanding the input and output lines;
f) Advanced power management controller with normal, wait, slow, standby and power-down modes;
g) 8-priority, individually maskable vector interrupt controller, 6-channel 16-bit timer/counter, 3 USARTs, each USART has 2 dedicated PDC channels;
h) 8-channel 10-bit A/D converter, 2-channel 10-bit D/A converter;
i) Clock generator using on-chip main oscillator and PLL frequency multiplication, real-time clock using on-chip 32 kHz oscillator.
Figure 2 is the actual application circuit of the solution.
The chip contains two identical 4-channel 10-bit A/D converters, which can form an 8-channel 10-bit A/D converter. Each A/D converter has 4 analog input pins and a digital trigger input pin, and provides an AIC interrupt signal. The two A/D converters share the analog power pin and the reference voltage input pin. Each channel can be enabled or disabled individually and has its own data register. The A/D converter can be configured to automatically enter sleep mode after the conversion sequence and can be triggered by software, T/D or external signals.
Since the AT91M55800A does not have an on-chip program memory, the solution needs to be expanded externally [1] Flash memory as program memory to store program code, constant tables, and data that needs to be saved after power failure. The bus read and write cycle of the AT91M55800A can have a maximum delay of 8 cycles, and the minimum read speed of the Flash memory is required to be no less than this speed. Considering the execution speed and program size of the solution, the HY29LV160 with an access speed of 70 ns (the chip capacity is 1 M×16 bit, a total of 2 MB) is selected, which can basically meet the requirements of the solution.
The system uses AD590 [2] as a temperature sensor. The device uses current as output to indicate temperature, and the obtained signal is buffered and isolated by an amplifier to obtain a voltage proportional to the temperature, thereby realizing temperature measurement.
3 A/D conversion programming
In AT91M55800A, two A/D converters work independently, and each A/D converter can only read the A/D converter value of one channel. This program allows the user to specify which channel to work, then reads the value of the specified channel and displays it. Since the precision of the A/D converter is 10 bits and 8 bits, it is set to 10 bits here, so the data range obtained is between 0 and 3FF.
The working process of the A/D converter is different from that of general peripheral devices. After initialization, there must be a trigger command for the high-speed A/D converter to collect. At this time, the A/D converter samples and holds the analog signal on a certain channel that it activates, and then converts it into data and stores it in the data register. The user can learn from the status register whether the A/D converter has completed the conversion, and then obtain the value after the A/D conversion by reading the data register.
The A/D conversion program flow chart is shown in Figure 3.
To program the A/D converter, use the AT91 library (in the /pe-riph/adc directory). The code section related to the A/D converter is as follows [3]:
a) adc.h: A/D converter user interface structure definition StructADC, control register ADC-CR, mode register ADC-MR and other important registers, and A/D converter interrupt service routine function definition.
b) Lid_adc.h: A/D converter descriptor definition and library function definition.
e) Lid_adc.c: Detailed code of library functions, including: initializing ADC at91_adc_open, closing ADC at91_adc_close, getting the value of status register at91_adc_get_status, setting the value of control register at91_adc_trig_cmd, reading the value of A/D conversion at91_adc_read, opening the specified A/D conversion channel at91_adc_channel_open, closing the specified A/D conversion channel at91_adc_channel_close, getting the channel open and close status at91_adc_channel_get_status, etc.
4 Conclusion
This article introduces a data acquisition solution based on ARM7. The solution achieves the expected goal through specific hardware design and software programming. Using ARM for data acquisition can make the solution more stable, and can achieve the effect of low power consumption and high performance, which is suitable for application in various industrial occasions.
Previous article:Design of wireless home gateway based on ARM-UClinux
Next article:Design of car black box based on ARM
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- 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
- Negative leakage of switching power supply
- Design and implementation of STC single-chip water temperature intelligent control system based on Gizwits Cloud
- Send me the latest cracked file of MDK5, so you don't have to look for it everywhere
- DC PWM motor driver only needs current loop, what are the domestic devices?
- C2000 built-in comparator error sources and correction methods--F28004x, F2807x, F2837x
- Mir MYC-YT507 development board review: image burning and experience (warm reminder of driver installation problem TIPS)
- Share an example of my own single-chip thermocouple temperature measurement design
- Research and Implementation of TCP/IP Protocol Stack Based on TI C6000
- Is your phone's charging port Type-C? Do you support the unification of charging ports for all phones?
- DS18B20 multi-point temperature measurement