Software and hardware platform technology of single chip microcomputer measurement and control system

Publisher:才富五车330Latest update time:2012-03-08 Source: 微计算机信息 Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction
At present, with the continuous development and maturity of chip technology and single-chip microcomputer functions, single-chip microcomputer technology has been widely used in industrial measurement and control systems. There are many types of single-chip microcomputers and corresponding peripheral modular products on the market, especially the 8051 series and PIC single-chip microcomputers are the most popular. The powerful single-chip microcomputers have indeed reduced the workload of control system designers, but there are two problems: First, the comprehensive design of hardware and software is not considered in the process of selecting single-chip microcomputers, that is, only the convenience of hardware is considered, and the corresponding software is not considered. Therefore, in the system design cycle, the design process of hardware and software is separated and independent of each other, and there is no interaction before system integration; second, in the process of hardware selection, the system development cycle and cost are not considered, and it is often necessary to purchase a dedicated development system and programmer. Developers also have to spend a certain amount of time to familiarize themselves with instructions and simulators, which prolongs the development cycle. Obviously, this design method of selecting single-chip microcomputers based on project functions limits the ability to balance hardware and software, and cannot give full play to the potential of each hardware and software. When the software and hardware are finally combined, it is likely that the hardware or software will need to be modified, and sometimes even some special hardware will need to be added, which will extend the development cycle, reduce the overall system performance, and increase the potential development cost. Therefore, in order to design a complete control system under the constraints of the development cycle and cost, it is necessary to adopt a method of hardware and software integrated design. The hardware and software platform technology proposed in this paper is based on the idea of ​​hardware and software integrated design, taking into account the uniqueness of the single-chip measurement and control system and its similarity in most application fields, and using a universal hardware platform and software platform to achieve a fast and effective integrated design of the computer measurement and control system. Users only need to compile the corresponding program according to the project requirements to complete the design of the entire system.

2. Introduction to platform technology
In the past, each engineering project was always treated in isolation in the single-chip microcomputer measurement and control system. Therefore, every time a project was done, it had to be done from scratch, which was very inefficient. In fact, although the single-chip microcomputer measurement and control system is not as standardized as an office or management system, it still has certain rules. Therefore, the common parts can be abstracted to form a basic framework, that is, a platform. The block diagram of the composition of a common single-chip microcomputer measurement and control system is shown in Figure 1.


In the control of the production process, from the perspective of signal detection and output control, the single-chip microcomputer measurement and control system usually has to process three types of signals:
① Switching signals indicating the operation of the production process, such as the start and stop status of various controlled equipment, the opening and closing status of contactors, the switch status on the operation panel, and the upper and lower limit alarm signals of various physical quantities.
② Analog signals reflecting the working conditions of the production process and driving the field control device, such as the weight, flow, speed, pressure, material level, composition, etc. of analog input, the continuously adjusted regulating valve of analog output, electric actuators, etc., which are all analog quantities that change continuously over
time. ③ Digital signals required by pure digital devices, such as RS232, RS485 serial ports, micro printers and other conventional peripherals for communicating with the host computer, some digital execution devices (stepping motors and digital display devices) and some digital detection devices (photoelectric encoders, digital flow meters, etc.). Most of these pure digital signals can be directly connected to the data line or communication interface of the single-chip microcomputer. They are highly standardized and versatile and very convenient to use. The first two types of signals are mostly used in industrial sites, and the situation is much more complicated. This is also the most difficult and time-consuming task to standardize in system design. Platform technology integrates software and hardware technologies, and strives to integrate the main parts of most measurement and control systems in industrial sites, integrating the digital signal input, analog signal input, A/D multiplexer, switch output, analog output, keyboard, digital tube display, communication with the host computer, watchdog circuit, FLASH storage and other hardware parts in Figure 1 into a hardware platform; based on the hardware platform, develop the corresponding keyboard input module, digital tube display module, A/D conversion module, digital quantity input/output module, data storage module, communication with the host computer module, etc., and integrate these modules into a general software platform. The two complement and support each other.
2. 1 Hardware platform
The main functions of the designed single-chip microcomputer measurement and control system are:
① Realize the information conversion between the single-chip microcomputer and the production process, including A/D conversion, D/A conversion, level conversion, digital quantity input and output, etc.
②Realize the information transmission between the single-chip microcomputer and the production process, including the time-sharing acquisition of multi-channel information, the time-sharing operation of multi-channel control, etc. All functions are done on a main circuit board containing a CPU (also called a CPU board). The keyboard and display parts are flexibly configured according to the specific panel requirements of the system to realize the keyboard input and digital tube display of the single-chip microcomputer measurement and control system.
③The storage and hardware watchdog of the data collected and the setting parameters of the single-chip microcomputer measurement and control system.
Since the production processes of many identical or similar industries are very similar, the single-chip microcomputer hardware platform can be completely universal for the production process of different manufacturers in the same industry, and its different parts and specific implementation processes can be left to each software platform to coordinate, which is very suitable for small and medium-sized enterprises. The hardware platform designed according to the function of the measurement and control system is shown in Figure 2.

[page]


In the designed single-chip microcomputer measurement and control system hardware platform, the central single-chip microcomputer adopts AT89C52 single-chip microcomputer. AT89C52 has 8k bytes of fast erasable memory Flash, which does not need external program memory EPROM, reducing the size of the circuit board and enhancing the anti-interference ability of the system; digital signals (such as alarm input, limit position, etc.) are directly connected to the INT0, INT1, T0, T1 terminals of the single-chip microcomputer, so that the single-chip microcomputer can respond to the signal input in time; 8 analog inputs are connected through AD0809 The A/D conversion is connected to the data line of 89C52; the analog output signal uses the DAC0832 chip to convert it into a voltage or current signal to drive continuous valves, electric actuators and other devices; the switch output signal is latched by 74LS373, driven by optoelectronic isolation, and controls the switch output; the digital tube display drive circuit uses the MAX7219 with a serial bus, which can carry 8-bit digital tubes or 64 light-emitting tubes to display field data and make sound and light alarms; the keyboard circuit uses the high 8-bit address line of the microcontroller to connect the pull-up resistor, and the software program scans to determine the key code; the watchdog circuit uses the X25045 to prevent data loss and CPU malfunction. The chip integrates the three functional parts of the watchdog timer power monitoring circuit and EEPROM into a single package, which is programmable, highly reliable, and low in power consumption. It contains 512 bytes of EEPROM to store communication addresses, system parameter settings, etc.; the chip that communicates with the host computer uses the MAX485, which can make the communication distance reach about 1200 meters.
2. 2 Software Platform
The software platform is divided into two parts. One part is directly placed on the hardware platform, called the system software platform, which mainly completes the underlying functions such as field data acquisition, running control algorithms, output control quantity, field parameter setting, field parameter digital tube display, etc. All work is organized by the microcontroller main program through the software module established on the hardware platform to form a system software platform, so it is the combination point of the comprehensive design of software and hardware; the other part is used to communicate with the upper management machine, called the communication software platform, which mainly completes the communication with the upper management machine, transmits field data, status and accepts upper computer instructions. On the one hand, the software platform should give full play to the potential of the hardware platform. Under the conditions of existing hardware resources, the system can complete more work according to the process requirements of the actual industrial measurement and control system, thereby saving hardware costs; on the other hand, the software platform is the main basis for users' secondary development. In order to shorten the development cycle, the main functions realized by the software can be made into standard modules for convenient secondary development. The block diagram of the microcontroller software main program and the corresponding functional modules designed according to the hardware development platform is shown in the figure.

3 Characteristics of platform technology
This platform technology with integrated software and hardware design can be summarized as follows:
① High development efficiency. The platform system has the basic framework of the application system. Users can generate the application system by modifying the software appropriately.
② Good real-time performance. Since the measurement and control system platform is based on the single-chip microcomputer MCU and also has many built-in functional modules, it can communicate with the microcomputer PC through the serial port, so it can be used as an independent intelligent instrument or controller, and can communicate with the host computer in real time to form a more powerful distributed control system.
③ Completely eradicate a large amount of low-level repetitive work in product development, accumulate the reliability of the platform, and ensure that the products developed based on the platform have good reliability. The standardized, serialized, and standardized design of the platform is greatly beneficial to the production, maintenance, and update of the product.

4 Application Examples
The design of two different systems, the fermentation process temperature control system and the diamond grinding control system, can be easily realized using platform technology. The system block diagrams are shown in Figures 4 and 5.

Fermentation process temperature control system: The input quantities are the fermentation raw material temperature and the steam pipeline pressure. The control quantity is the temperature inside the tank, which is achieved by adjusting the opening of the cold water valve and the steam valve. To achieve this goal, you only need to use the general hardware and software platform and modify the system software platform slightly to complete the design.
Diamond grinding control system: The input quantities are the diamond model and weight, and the control quantity is the motor speed. For this system, it is also easy to implement a new design by using the general hardware and software platform and modifying the system platform software according to the specific requirements of the system.

5 Conclusion
This platform technology based on integrated hardware and software design can fully utilize the hardware and software resources in the system, save hardware costs and software development expenses, and greatly shorten the system development cycle. It is an advanced single-chip microcomputer measurement and control system design method. It can be widely used in many single-chip microcomputer industrial measurement and control systems.

References
1 He Limin: Selected Single-Chip Microcomputer Application Technology. Beijing University of Aeronautics and Astronautics Press. 1994
2 Wang Xiucai, Liu Zuwang: Single-Chip Microcomputer Interface Technology. Fudan University Press. 1995
3 Pan Xinmin: Microcomputer Control Technology. People's Posts and Telecommunications Press. 1987

Keywords:MCU Reference address:Software and hardware platform technology of single chip microcomputer measurement and control system

Previous article:An ISD4004 voice chip application circuit based on single-chip microcomputer control
Next article:Several issues that should be paid attention to when programming single chip microcomputer with C language

Recommended ReadingLatest update time:2024-11-16 16:45

Analysis of the internal reset circuit diagram of the microcontroller
  The principle of the microcontroller reset circuit is to connect an external resistor and capacitor to the reset pin RST of the microcontroller to achieve power-on reset. The reset is valid when the reset level lasts for more than two machine cycles. The duration of the reset level must be greater than two machine c
[Microcontroller]
Analysis of the internal reset circuit diagram of the microcontroller
Design of temperature and humidity acquisition system based on 8051 microcontroller
Through the previous study, we learned how to use the serial port to send data and receive fixed-byte commands. Today, we continue to discuss the serial port application protocol, and the main focus is on how to effectively use the serial port to send data. To simplify the description, assume that we develop a tempera
[Microcontroller]
Design of temperature and humidity acquisition system based on 8051 microcontroller
Design of 16LED Shake Stick Based on AT89S52 Single Chip Microcomputer
1. Description of the work The shake stick is a popular toy nowadays, and it can be seen in various gatherings and festivals. This design also follows the principle of the shake stick, using the visual persistence characteristics of the human eye, and controls 16 high-brightness LED light-emitting diodes through the A
[Microcontroller]
Design of 16LED Shake Stick Based on AT89S52 Single Chip Microcomputer
STM8 MCU ADC continuous sampling mode
The internal ADC of the STM8S003 microcontroller is 12 bits, and each channel of the A/D conversion can perform single and continuous conversion modes. Single conversion mode means that the ADC will stop converting after converting data once. If it needs to continue converting, it is necessary to manually start the
[Microcontroller]
STM8 MCU ADC continuous sampling mode
Lingyang 61 MCU timer
Time base signal generator: The time base signal, referred to as the time base signal, comes from the 32768Hz real-time clock and is combined through frequency selection. The frequency selection logic TMB1 of the time base signal generator provides various frequency selection signals for the clock source B of TimerA
[Microcontroller]
AVR MCU Internal EEPROM Detailed Explanation
AVR MCU Internal EEPROM Detailed Explanation       Using EEPROM is quite simple. It is nothing more than reading and writing operations. First, you need to determine whether it is reading or writing, determine the read/write busy flag, and then ensure that it cannot be interrupted during reading and writing, that is,
[Microcontroller]
51 MCU Experiment 9: External Interrupt
Experiment: Press the button to reverse the LED state. The development board's independent buttons, LEDs, and MCU circuit diagrams are as follows: For an introduction to the interrupt system, see: https://blog.csdn.net/cax1165/article/details/86633086 #include reg52.h #define uc unsigned char sbit led=P2^0;
[Microcontroller]
51 MCU Experiment 9: External Interrupt
Application of MSP430 microcontroller in power supply control
The MSP430 series microcontroller is a new generation of 16-bit microcontroller produced by TI in the United States. It is an ultra-low power mixed signal processor (MixedSignal Processor). It has the advantages of low voltage, ultra-low power consumption, powerful processing capability, stable system operation, ric
[Power Management]
Application of MSP430 microcontroller in power supply control
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号