03-30
2021
1. Single-chip application system design process1.1 Requirements for design of single-chip microcomputer application systemWhen designing a single-chip application system, first select components with high reliability to avoid damage to the reliable operation of the system, and at the same time eliminate unstable factors in the circuit. Secondly, in the design process, the structure of the system should be modularized and standardized, and the control switches should not be too complicated or too many, so that it is easy to find and eliminate faults. Finally, it is necessary to optimize the system design, simplify the peripheral hardware circuit, and make the operation sequence of the system simple and clear. When necessary, consider whether the software should be equipped with an encryption function, so that the user program solidified in the microcontroller will not be illegally copied.1.2 SCM application system compositionHardware and software constitute the two basic components of the microcontroller application system. CPU, storage area, several I/O interfaces and peripheral equipment etc. constitute the hardware part. Among them, the single-chip microcomputer is the core component of the whole system, which can run programs and process data. The memory is used to store the program and data of the one-chip computer, and the I/O interface is the information exchange channel between the one-chip computer and the external controlled object. The specific circuit diagram is shown below. Real-time software and development software constitute the software of the single-chip microcomputer system. The software written for different single-chip control system functions is real-time software, and the software used in the development and debugging of the control system is called development software, such as assembly software, compilation software, simulation and debugging software, programming download software, etc.1.3 SCM application system designThe development of single-chip microcomputer application system can generally be divided into five stages. The task of the first stage is to determine the overall design plan. It is necessary to complete the user demand analysis and plan research. The purpose is to clarify the design target of the application system through the understanding of the market and users. technical indicators. Conduct feasibility analysis based on demand analysis and program research. The purpose of feasibility analysis is to make a clear judgment on the necessity and feasibility of system development and decide whether to continue the development work. Then design and supervise a logic model for the whole system, including necessary theoretical analysis and calculation, selection of models, division of system software and hardware functions, rational matching of software and hardware proportions, and determination of the division of system software function modules and each function module The program implementation method, and draw a flow chart. The main task of the second stage is the detailed design and production of the system, mainly including hardware design and software design. The task of hardware design is to design the hardware circuit schematic diagram of the system and preliminarily design the printed circuit board according to the overall design requirements. The hardware structure should be considered in conjunction with the software, replace the hardware with software as much as possible, simplify the hardware structure, and properly consider the bus drive capability of the CPU, pay attention to reliability and anti-interference design.The task of software design is to determine the program structure on the basis of overall design and hardware design, allocate internal structure memory resources, divide functional modules, design the main program and each module program, and finally complete the control program of the entire system. The third stage is simulation debugging, which is divided into three processes: hardware debugging, software debugging and system joint debugging. Hardware debugging is to use the basic test instruments (multimeter, oscilloscope, etc.) of the development system to check the faults existing in the user system hardware by executing relevant commands or test programs of the development system. During software debugging, the process of assembling, linking, and executing the user program is to find out the grammatical errors and logical errors in the program and eliminate and correct them. System joint debugging refers to allowing the software of the user system to actually run on its hardware, and to perform software and hardware joint debugging. The task of the fourth stage is to solidify the program and run independently. The task of the fifth stage is the document preparation stage, and the document should include task description; design guiding ideology and design scheme demonstration; performance measurement and on-site trial report and description; trial guide; software information (flow chart, subroutine instruction, address assignment , program list); hardware information (circuit schematic diagram, component layout and wiring diagram, connector pin diagram, printed circuit board diagram, precautions, etc.).2. Selection of MCU2.1 Performance indicators of single-chip microcomputerThe current single-chip microcomputer has several types such as 4-bit machine, 8-bit machine, 16-bit machine and 32-bit machine. The number of bits of a microcontroller is determined by the number of bits of its core CPU. The more bits, the stronger the ability of the microcontroller to process data. The operating speed of the microcontroller depends on the frequency of the external crystal oscillator or external clock signal. For example, the external clock frequency of 89C51 can reach 24MHz. The higher the running speed of the single-chip microcomputer, the higher the speed block will be executed, but the power consumption will increase accordingly. The program memory structure types of single-chip microcomputer mainly include ROM and RAM. General single-chip microcomputers all have data storage RAM, but their capacity is not large. When a large amount of data needs to be stored, an external user RAM should be considered. The single-chip microcomputer has a strong interrupt processing capability, and the 51 single-chip microcomputer generally has five interrupt sources, which are external interrupt 0, external interrupt 1, timer counter 0, timer counter 1 and serial port interrupt. In some automatic monitoring instruments and battery-powered products, low power consumption is the main technical index. Usually, the single-chip microcomputer using HC-MOS technology works at low voltage. The size of the board, the processing method, the purchase method and the cost are considered comprehensively.2.2 Selection principles of MCUThere are generally three principles for the selection of single-chip microcomputers. One is the system adaptability of the single-chip microcomputer, which refers to whether the single-chip microcomputer can be used to complete the control tasks of the application system. The main factors to be considered are: whether there is suitable computing and processing capability? whether there are required peripheral port components? whether there are required interrupt sources and timers? whether there are required I/O ports? Developability, the use of development tools is a necessary means for the development of single-chip microcomputer application systems, and is an important basis for selecting single-chip microcomputers. The main considerations are: development environment, debugging tools, online BBS service and application support. The third is the history of the manufacturer and the availability of the product. It is necessary to consider whether the price/performance ratio of the product is reliable? Is it discontinued?3. Anti-interference technology of single chip microcomputer3.1 Sources of InterferenceThe noise outside the signal or the change part that causes adverse effects is collectively called interference. In the process of developing single-chip microcomputer application products, we often encounter a very difficult problem, that is, the system runs normally in the laboratory environment, but after small batch production and installation on the work site, some irregularities and irregularities appear. Very normal phenomenon. The main reason is that the anti-interference design of the system is not comprehensive, which leads to the unreliable operation of the application system. There are three main reasons for the interference of the single-chip microcomputer control system, namely, the interference of the power supply system, the interference of the process channel, and the interference of space electromagnetic waves. The on and off of the power switch, the start and stop of the motor and large electrical equipment will cause fluctuations in the power grid. Affected by these factors, there are often hundreds of volts or even thousands of volts of spike interference on the grid. In the application system of the one-chip computer, the channel of switch quantity input, output and analog quantity input and output is indispensable. These channels will inevitably make all kinds of interference directly into the microcontroller system. Space interference mainly comes from electromagnetic waves radiated by the sun and other celestial bodies, electromagnetic waves emitted by radio stations or communication transmitters, and electromagnetic interference emitted by various surrounding electrical equipment. Therefore, in response to the above problems, we must take effective measures to improve the anti-interference ability of the single-chip application system3.2 Hardware anti-jamming technologyCommonly used hardware anti-jamming technologies mainly include isolation technology, grounding technology, decoupling technology, filtering technology and shielding technology. In the single-chip microcomputer system, in order to improve the quality of the power supply system and prevent human interference, it is recommended to separate the single-chip microcomputer input power supply from the power supply of strong electric equipment, use an isolated power transformer with electrostatic shielding and anti-electromagnetic interference, and use independent function blocks for separate power supply , and achieve two-stage voltage regulation with an integrated voltage regulator block. Increase the power supply voltage of the interface device as much as possible to improve the anti-interference ability of the interface. The process channel is the path for information transmission between system input, output and single-chip microcomputer. Because the connection line between the input and output objects and the microcontroller is long, it is easy to scurry into the interference and must be suppressed. Generally, twisted pair transmission is used to reduce electromagnetic induction and suppress noise interference, and filter circuits, monostable circuits, trigger circuits and Schmidt circuits are used to suppress the vibration of mechanical electric shocks, thereby suppressing noise interference. In the single-chip microcomputer system, the quality of the printed circuit board design has a great influence on the anti-interference ability. Printed circuit boards are important components used to support circuit components and provide electrical connections between circuit components and devices. In order to reduce interference, a printed circuit board with a moderate size and a reasonable layout is often used, and the decoupling capacitor is reasonably configured, and the power line and bottom line are correctly designed.3.3 Software anti-jamming technologyThe anti-jamming performance of the single-chip microcomputer application system cannot be completely solved by hardware, and the software anti-jamming design is also an important way to prevent and eliminate application system failures. Once the single-chip microcomputer causes the program counter PC to deviate from the original value due to interference, the program will deviate from the normal running track, and the operand value will change or the operand will be regarded as the "running away" phenomenon of the operation code. At this point, software traps and "watchdog" techniques can be used to restore the program to a normal state. The so-called software trap refers to a series of instructions that can restore a chaotic program to normal operation or restore a "runaway" program to its initial state. Such as NOP instruction, LIMP instruction, etc. The program running monitoring system is also called "watchdog". "Watchdog" is a swordsman tracking timer, the application of "watchdog" technology can make the single chip microcomputer return to normal state from the infinite loop. "Watchdog" can be realized by hardware circuit, or by internal timer/counter by software technology. At present, most single-chip microcomputers are integrated with a program running monitoring system.The above is the development process of the single-chip microcomputer application system introduced by Shenzhen Zuichuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation.We are the agent of Songix single-chip microcomputer and Yingguang single-chip microcomputer agent, selling and developing the MCU and voice IC solutions of Songix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-29
2021
Design of intelligent humidifier system based on 51 single-chip microcomputerSmart home is a hot spot in today's society. Smart humidifiers can automatically adjust indoor humidity and remove static electricity. The climate in the north is dry, especially in winter, and humidifiers can improve the humidity, thereby creating a healthy living environment for people. After investigation, it is found that most humidifiers still need to be manually operated. Manually controlling the switch to realize the work and stop of the indoor humidifier not only cannot detect the humidity value of the indoor environment in real time, but also the price is relatively high, and the functions that can be realized are also relatively large. Single, the use of this humidifier has considerable safety hazards, such as excessive humidification or dry burning. Therefore, it is particularly important to develop and design a humidifier that can flexibly set the upper and lower limits of the humidity value of the humidifier according to the actual situation and needs of the user, integrate practicability and safety, low price, and good quality.1. Overall Design of Intelligent Humidifier SystemThe system is mainly composed of the following modules: humidity signal acquisition circuit, button control and reset circuit, digital tube display circuit, atomization module humidification circuit, etc. The specific structure is shown in Figure 1. The air humidity signal measured by the temperature and humidity sensor is an analog signal, which needs to be converted by AD before being sent to the microcontroller for processing. After the single-chip microcomputer analyzes and processes the received signal, it outputs a control signal to the P3 pin to control the closed state of the relay, and the atomization module starts to work, thus realizing the system function of on-demand humidification.As shown in Figure 1, when the air humidity value is lower than the system preset humidity value (40%RH), the sensor will detect the humidity signal and send it to the microcontroller. At this time, the digital tube display circuit will display the current indoor humidity value. The indicator light of the indicating circuit will emit light, and at the same time, the atomization control circuit will start and be in a working state to humidify the room. When the indoor air humidity reaches the upper limit humidity value set by the system (60%RH), the atomization control circuit will stop working, and the indicator light of the LED indicator circuit will go out.2. Hardware circuit design of intelligent humidifier systemThe design of this system is simple, and the processor can use 51 single-chip microcomputer to complete the function, so the STC89C52 single-chip microcomputer is selected to meet the design requirements of software and hardware.2.1 Crystal oscillator circuit design of single chip microcomputerInside the STC89C52 single-chip microcomputer chip, there is an oscillator with XTAL2 and XTAL1 as output and input terminals. At the same time, timing devices are connected to the XTAL1 and XTAL2 pins. The internal oscillation circuit can realize self-oscillation. The timing device is generally a parallel resonant circuit composed of a quartz crystal and a capacitor. The crystal oscillator used in the system is 12MHz, and the capacitance value of capacitors C2 and C3 is 20 pF.2.2 Reset circuit design of single chip microcomputerThe button reset circuit used in this design, the system can not only power on and reset, but also need to press the S1 button when it is running, and the power supply Vcc will generate a reset high level at the RST terminal. Similarly, as long as it is ensured that the RST terminal maintains a high voltage for longer than two machine cycles, the system can automatically reset normally.2.3 Design of analog-to-digital conversion circuitThe intelligent humidifier system needs to transmit the humidity signal of the temperature and humidity sensor to the CPU, and must first convert the analog signal into a digital signal through the A/D converter. This system selects 8-bit resolution A/D conversion chip ADC0832, which is widely used because of its small size, strong compatibility and high cost performance. The multiplexing of its internal power supply input and reference voltage makes the analog voltage input of the chip between 0 and 5 V.The 4 data lines of ADC0832 and the one-chip computer interface are CS, CLK, DO, DI respectively. When designing the circuit, connect DO and DI in parallel on one data line, because DO and DI are not valid at the same time during communication, and the interface between ADC0832 and microcontroller is bidirectional.2.4 Nixie tube display circuitThe display circuit of this design uses a digital tube instead of an LED, because the digital tube display will be clearer under strong light conditions such as daytime. Although the liquid crystal display is extremely power-saving, it is not clear when the external light is very bright and the temperature range is limited. In addition, the price of LED digital tubes is relatively low compared with that of liquid crystal displays, so this design uses LED digital tubes.The design selects the nixie tube display module, which has a built-in byte library and does not have a storage function. It adopts a parallel connection mode and is relatively convenient to use. It is used to display soil moisture information and the system's preset humidity threshold. A total of four independent buttons are selected, including a reset button, a setting button, a "plus" button, and a "minus" button. After power on, the digital tube displays the current humidity value of the air, press the setting button, the digital tube displays the upper limit of the system preset humidity, and then press the "plus" or "minus" button to change the preset humidity upper limit of the humidifier; press the first Press the setting button twice, the digital tube will display the lower limit of the system preset humidity, and then press the "plus" or "minus" button to change the preset humidity lower limit of the humidifier; press the third setting button, the digital tube will display the current indoor humidity value , so far the setting is complete.2.5 Atomization module control circuitIn the humidification control circuit of the atomization module, the collector of the triode is connected to one end of the relay, the emitter is connected to the +5 V power supply V CC, the pin P3.5 of the microcontroller is connected to the base of the triode Q5 through R6; the resistor R7 is the same as The light-emitting diode constitutes a humidifier working state indicating circuit. If the relay is energized and closed, the LED will light up, so that the operating state of the relay can be detected, indicating whether the atomization module is in working state, and whether the humidifier needs to humidify the room .3. Intelligent humidifier system software designThis design uses C language to write programs, and the entire system program adopts modular design, mainly including data acquisition module, key control module, reset module, digital tube display module, and atomization control module.Through the analysis of the circuit principle and function, the overall design of the intelligent humidifier system has been fully understood. After the program is written in C language, the single-chip microcomputer is compiled and debugged with Keil software. Until the program meets the design requirements and there are no running and compiling errors, burn it into the 51 single-chip microcomputer for software and hardware debugging, so as to realize the system function.SummarizeThis system uses 51 single-chip microcomputer to complete the design of a simple intelligent humidifier control system. It has low cost and high cost performance. Compared with many similar products on the market, it has certain advantages, but this paper still has some shortcomings, such as the system Design integration needs to be improved.The above is the design technology of intelligent humidifier system based on 51 single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-28
2021
Application and Research of Single Chip Microcomputer in Automatic Control SystemThe single-chip microcomputer belongs to an integrated circuit chip. The single-chip microcomputer is a microcomputer system. The single-chip microcomputer can connect integrated circuit technology and random access memory, read-only memory and central processing unit in series, and then use the method to engrave it on the silicon chip. to complete information processing tasks. The single-chip microcomputer has experienced a rapid development process from the initial development to the subsequent application. The single-chip microcomputer used to be 4-bit and 8-bit, but now it can reach 300M high speed. Single-chip microcomputer has a wide range of applications. As a part of embedded software, its role cannot be ignored and its impact is far-reaching. The development effect of the control system can be improved and the research and development cost can be reduced by using the single-chip microcomputer.1. Application status of automation control systemThe application fields of the automation control system are very extensive, and the automation control system involves many fields, such as elevators, smart grids, and fire alarms.1.1 Elevator automatic control systemThe pace of urbanization in my country is getting faster and faster. Many large factories, high-rise buildings, and some large and medium-sized supermarkets, shopping malls and other buildings are rising. Elevators are the most convenient means of transporting passengers up and down the stairs. There are many kinds of elevator components, including: elevator switch door, elevator passenger compartment, as well as cables, display screens and buttons, etc. There are so many devices, and only when they are all integrated together can they provide feasible conditions for the overall stable operation of the elevator. The elevator automatic control system can truly exert its most essential and powerful functions. The composition of the elevator automatic control system must be mixed with other contents such as single-chip microcomputer, integrated circuit, etc., so that the elevator can run normally without accidents, and the elevator can safely go up and down, open and close the door of the elevator passenger compartment, voice broadcast, etc. Only in this way can the automatic operation state of the elevator be realized.1.2 Fire alarm control systemSingle-chip microcomputer is used in fire alarm control system, and it implies a wide range of content. The control system can also set the fire extinguishing equipment and communication equipment on the computer, and then form a very powerful fire alarm automatic control system. This system guarantees the safety of the working environment and living environment. The single-chip microcomputer is used in the fire alarm control system. Once a fire occurs and the working status of the control system changes immediately, it will automatically alarm and take fire-fighting measures after the alarm. Good personnel safety evacuation work and other content, a very complete fire alarm control system has rich and complete functions, a certain instrument in the fire alarm control system can monitor indoor and outdoor smoke, fog, high temperature There are also fires, etc., which will be converted into electrical signals to allow the fire alarm control system to play its actual role.1.3 Electric power automatic control systemThe single-chip microcomputer included in the electric power automatic control system is mainly to let the smart grid equipment run information with the help of some kind of instrument, and then let the single-chip microcomputer work, and it is responsible for transmitting these information to the monitoring system of the power grid. The power automatic control system is an indispensable content in industrial production, and has higher requirements on the speed of real-time response. The power automatic control system can also do some information calculation work on the basis of completing information collection. The power automatic control system can complete various types of operation control through setting programs, and can also improve adaptability. The power automatic control system includes rich content. Through various contents, a power equipment control system that meets the development requirements of people's life is finally formed, and the monitoring of the operation status of power equipment is done well, so as to ensure that the relevant control signals complete the information transmission and response work.2.Single-chip technology analysisThe single-chip microcomputer has many advantages in the design of the automatic control system, such as: anti-interference of other objects, very flexible, etc. The single-chip microcomputer inside the automatic control system contains various functional components. Simplify the single-chip microcomputer structure to a certain extent. After the automatic control system is inserted into the single-chip microcomputer components, the application will control the entire operating system through the single-chip microcomputer. The single-chip microcomputer must be accurately placed in the correct position in the automatic control system. Only when the position is correct can the single-chip microcomputer play its full role. The single-chip microcomputer has For the specific usage description, only in strict accordance with the requirements of the automatic control system and a good understanding of the description, can we truly execute various operating instructions according to the requirements. This kind of operation explanation is mainly to enable the microcontroller to prevent various errors that occur in the automatic control system. The invention and application of single-chip microcomputers can be said to have changed the development path of society in a big way, and can be said to have changed the design status of the automatic control system in a small way. The automatic control system presents a more convenient and simplified state, allowing the automatic control system to have a more streamlined operation. This also indirectly shows the important position of the single-chip microcomputer in the design of the automatic control system. By rationally designing the single-chip microcomputer in the automatic control system, the advantages of the single-chip microcomputer can be maximized.Single-chip microcomputers have obvious advantages in automatic control systems, such as: effectively saving computer programming development time, convenient and flexible use methods, high economic and social benefits, and can also improve the automation level of society. The single-chip microcomputer is a microcomputer, and the connection equipment of the single-chip microcomputer is more flexible and expandable. The development and control system of the single-chip microcomputer does not have the complicated operation of dismantling the wiring of the junction box, and the design process is relatively simple and can be shared. The user interface of the single-chip microcomputer has good interactivity, saves equipment resources, and can reduce capital costs. The single-chip microcomputer is small in size, and the internal structure is a modular design structure, which can realize automatic collection of the operating status of electrified equipment, control the system, and have high efficiency in real-time modification, upgrade and maintenance of equipment.3. Application of single-chip microcomputer in automatic control system and its design3.1 Application of single chip microcomputer in automatic control systemThe automotive field and the coal mine field are two typical fields where single-chip microcomputers are used in automatic control systems. In the automotive field, its production and design links have relatively strict measurement requirements, and part data of parts are emphasized in production. Pay attention to each part of the data in the design. On this basis, the installation speed can be guaranteed. In the field of coal mines, single-chip microcomputers are mainly used in leakage protection, substation operation control, and underground safety monitoring.3.2 The application of single chip microcomputer in the design of automatic control system(1) Structural design of the single-chip microcomputer: The structural design of the single-chip microcomputer will directly affect the practical application of the automation control system. From the perspective of the software structure of the single-chip microcomputer, what practical designs does it have in the automation control system? Inside the automation control system, the single-chip microcomputer has various work requirements. Through the work requirements, the operating parameters of the single-chip microcomputer are configured to allocate various tasks and make good time arrangements. Only in this way can the automatic control system maintain a balanced working state. The operating system used in the single-chip software structure will divide the single-chip microcomputer into two parts: the main program and the interrupt program: the main program is mainly used to collect the information of the single-chip computer in the automatic control system under normal operation Various data; the interrupt program is mainly responsible for early warning and diagnosis of faults. The man-machine exchange mode under the automation control system provides you with the operating parameters of the motor automation control system, such as: speed, working conditions, etc., and adjusts the actual operation of the automation control system through manual operation to ensure the stability and reliability of the automation control system .(2) Control design of single-chip microcomputer: The main content of the control design of single-chip microcomputer in the automation control system is the dialogue mode of human-machine interaction. This dialogue mode of human-machine interaction involves various equipment in the control system. Not only that, it It can also promote the intelligent development of the system. People discuss the control design of the single-chip microcomputer by studying the single-chip microcomputer in the motor automation control system. There are many control modules in the single-chip microcomputer. There are two parts of the control module, one is the LED, and the other is the keyboard part. The keyboard part of the single-chip microcomputer inputs certain data, and then scans in all directions, and these data will be input to the The interior of the automatic control system ensures the safe and stable operation of the motor, and can also prevent safety accidents. The single-chip microcomputer is connected to the general-purpose keyboard through the interface device to display various operating data in the motor automation control system, so as to ensure the controllability of the automation control system in the motor structure.(3) Program design of the single-chip microcomputer: The program design of the single-chip microcomputer is based on the operation requirements of the automatic control system. After the program design is done, the motor is controlled to work. The important role of program design in single-chip microcomputer is equivalent to the role of the heart in the human body. The single-chip microcomputer realizes the operation effect of preventing the motor from deviating from the automatic control system by recording the specific operating parameters and the operating speed of the motor. During the program design, the single-chip microcomputer can interrupt the opening part of the motor, realize the function conversion of the automatic control system, and ensure that the motor can enter the automatic operation mode by itself. This programming method can better reflect the intelligent development of technology.(4) Computer PC design: PC refers to the computer terminal, and the PC terminal part plays an obvious role in the design of the single-chip automatic control system. The PC end is integrated into the design of the single-chip microcomputer, which can provide man-machine dialogue operation for the overall design of the automation control system. This kind of system works according to human instructions, and finally comes to the overall control. The PC part of the single-chip microcomputer needs to use the circuit to carry out the work of transmitting instructions. These instructions can be stored in the software, so that there will be no conflicts in the control instructions in the automation control system, and then they can be stored and executed. When the instructions conflict , the PC end will be automatically interrupted and no longer run, achieving the purpose of protecting the automation control system. The single-chip microcomputer perfects the communication process of the automatic control system by creating a new communication mode.4.The development trend of single-chip microcomputer in automatic control system4.1 Reduction or even miniaturizationThe size of the single-chip microcomputer will become smaller and smaller, just like when the computer was first invented. It occupies the whole room, but now the computer is getting smaller and thinner, and the same is true for the single-chip microcomputer. It will be reduced or even miniaturized in the future. The single-chip microcomputer in the automatic control system can be miniaturized after many improvement attempts . The advantage of this development trend lies in reducing the weight of the single-chip microcomputer and reducing the volume of the single-chip microcomputer, but this development trend cannot be shortened and optimized. The anti-interference ability and green design should also be paid attention to at the same time, and at the same time, attention should be paid to reducing noise. For the development of miniaturization, the single-chip microcomputer must meet the system requirements of the automatic control system, and we must pay attention to improving the structure of the single-chip microcomputer according to the needs of the automatic control system, reflecting the practical benefits of the miniaturized single-chip microcomputer.4.2 IntelligenceWith the development and changes of the times, the automatic control system has new development requirements in the process of operation, that is, the development of intelligence. This directly promotes the intelligent development level of the single-chip microcomputer. Although the application of the automatic control system to the single-chip microcomputer in the development of the motor in our country has made progress, it is still in the preliminary stage. In order to ensure that the single-chip microcomputer is better used in the automatic control system, the requirements for the use of the single-chip microcomputer must have intelligent requirements. Only by actively improving the operation status of the single-chip microcomputer, and designing the intelligent operation of the single-chip microcomputer on the basis of the original automation, can the development of the single-chip microcomputer be more intelligent. Only in this way can the manpower be reduced slowly, the pressure of the staff can be relieved, and the unmanned automatic control motor operation can be realized.4.3 MarketizationThe market is the "invisible hand" that regulates the economy, and going to the market is an inevitable requirement and inevitable result of a long-term development and continuous rise. The single-chip microcomputer of the automatic control system must adapt to the needs of the market and be prepared for market challenges. In order to promote the development of all walks of life.The single-chip microcomputer selected in the automatic control system has 8 digits, etc. The single-chip microcomputer also puts forward market-oriented development requirements in the future development scenario. This broadens the market for single-chip microcomputers. The market-oriented development of single-chip microcomputer can make the automatic control system suitable for various motors. my country can fully learn from foreign advanced technology in the research of single-chip microcomputer, design around the automatic control system, and increase the number of single-chip microcomputers used in the automatic control system.epilogueWhile my country's economy continues to develop, various fields are also developing and expanding. These fields are inseparable from the application of single-chip microcomputers. By applying highly intelligent single-chip microcomputers to all walks of life to improve the automation control system and integrate intelligent equipment Together, to build a powerful and advanced control operating system, so that the operating system can do a variety of tasks, so that the accuracy and reliability of industrial production and life can be greatly improved, and human resources, financial resources, Material resources are filled in the most suitable way, environmental management content is done well, the economic benefits of the industry are improved, and the environmental situation is really improved fundamentally.The above is the application and technology of single-chip microcomputer in the automation control system introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Songix single-chip microcomputer and Yingguang single-chip microcomputer agent, selling and developing the MCU and voice IC solutions of Songix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-27
2021
Intelligent Temperature and Humidity Control System Based on SCM TechnologyIn the field of measurement object, temperature and humidity are very important. Whether it is human survival or living environment, industrial and agricultural production, military, meteorological observation, temperature measurement and control, and humidity measurement and control are all very important links. With the advancement of computer technology, communication technology, electronic technology, sensor and sensor material technology, both temperature and humidity detection have achieved leapfrog development. It is also very meaningful to measure and monitor temperature and humidity.Through the research on the characteristics of the intelligent temperature and humidity sensor, a reasonable hardware circuit is designed, and efficient processor software is written to display the temperature and humidity information, and then control the heating and ventilation device according to the temperature and humidity information. The temperature and humidity information is obtained by the sensitive element of the sensor, and its output is amplified, linearized, and interfered with by the signal conditioning circuit to obtain an analog signal compatible with the A/D converter, which is converted into a micro Processor accepts digital signals. The software and hardware processing circuit with the single-chip microcomputer as the core processes the collected signals and outputs them to the display module to reflect the temperature and humidity values in real time. The SHT11 produced by Swiss Sensiri-on company is a single-chip fully calibrated digital new relative temperature and humidity sensor with a two-wire serial interface. It integrates sensor technology with CMOS chip technology, and can be used to measure parameters such as zero point, relative temperature, and relative humidity. It has the characteristics of digital output, calibration-free, peripheral circuit-free, debugging-free, and full interchangeability. , High reliability, high integration temperature and humidity measurement and control system provides a solution.1. Hardware design of intelligent temperature and humidity control system1.1 Overall hardware designThis design takes the AT89C52 single-chip microcomputer system as the core. Firstly, the temperature and humidity data of the scene are collected through the SHT11 temperature and humidity sensor, and then converted into digital codes through the A/D converter of the SHT11 temperature and humidity sensor itself; Set the upper and lower limits at the same time for the temperature and humidity value; when the current temperature and humidity exceed the preset upper limit, the alarm will be activated and the light will be on, and the heating and ventilation device will be activated at the same time; gas unit works. Different limit values can be set according to different requirements so that its wide temperature and humidity measurement range can be widely used in temperature and humidity monitoring.1.2 Temperature and humidity collection(1) Introduction to SHT11: SHT11 launched by Swiss company Scnsirion is a digital temperature and humidity sensor chip integrating temperature sensor and humidity sensor. Therefore, the SHT11 sensor is used in the real-time temperature and humidity monitoring system, which has the characteristics of low cost, small size, high precision, and simple interface. Moreover, the anti-interference ability of the SHT11 chip is also higher than that of similar chips, because the chip integrates a 14-bit A/D converter and uses digital signal output.(2) Interface circuit between SHT11 and MCU: MCU (MCU) and SHT11 sensor communicate using serial two-wire interface DATA and SCK, where DATA is the data line and SCK is the clock line. However, the I2C protocol and the second-line serial communication protocol are Incompatible. At the beginning of the program, the MCU needs to use a set of "start transfer" timing to indicate the start of data transfer. As shown in Figure 2-3, when the SCK clock is high, DATA flips to low; then SCK becomes low, and then becomes high again; when the SCK clock is high, DATA again flipped high.As shown in Figure 2-4, it is the interface circuit between the SHT11 sensor and the microcontroller. SHT11 has only two pins, one digital serial pin is connected to the P1.0 port of the microcontroller, and the SCK pin is connected to the P1.1 port of the microcontroller. A 4K resistor R2 should be connected between the power supply and the digital serial pin. R2 is a pull-up resistor, because the P1 port drive capability of the microcontroller is limited, the purpose is to make the data received by the sensor reliable.2. Software design of intelligent temperature and humidity control system2.1 Overall software designSoftware design is carried out on the basis of hardware design, and good software design is an important part of realizing system functions. Whether the system can run normally, in addition to the reasonable design of the hardware, largely depends on the software design with perfect functions and advanced algorithms. This system uses AT89C52 as the core of the hardware design system. The system software mainly includes data acquisition module, data display module, and alarm module. The data acquisition module includes temperature and humidity acquisition, data processing A/D conversion, and the alarm module includes alarm indication. and alarm handling. The data acquisition module collects the received analog signal from the sensor to the single chip microcomputer. The data processing module performs real-time processing and conversion on the received sampling signal, and finally realizes data communication, drive display, etc. The software system block diagram is shown in the figure below: These programs are independent of each other and are called sequentially in the main program. The single-chip microcomputer processes the digital signal, and the digital signal can be obtained by collecting the received data; the data processing module is realized by the single-chip microcomputer, which performs real-time control, data communication, drive display, drive operation, etc. of the sampling signal; the display part mainly uses LCD display, The LCD is driven by a microcontroller.2.2 Flow chart of software design program(1) Main program flow chart: The main program is the main body of the design and is composed of subroutines with different functions. The operation of the main program of this system is as follows: serial port initialization. After the initialization operation is completed, the keyboard is scanned in a circular manner. If the setting range is exceeded, an alarm will be given, and the alarm indicator light will be on, the buzzer will alarm, and the heating and ventilation circuit will be started at the same time.(2) Alarm circuit program flow chart: The alarm module has two functions, namely alarm light and sound alarm. The sound alarm alerts the user audibly, while the alarm light alerts the user visually. When the read temperature value exceeds the upper and lower limits, the red light is on and an alarm is given; when the humidity value exceeds the upper and lower limits, the yellow light is on and an alarm is given.(3) SHT11 reads the temperature and humidity program flow chart: the communication between the MCU and SHT11 uses a two-wire serial digital interface, and the I/0 port of the MCU needs to be used to simulate the communication sequence, because this communication protocol is different from the general I2C bus protocol. Compatible. For the control of SHT11, the MCU is realized through five six-digit command codes. The meanings of the command codes are: 00101: measure humidity; 00011: measure temperature; 00110: write internal status register; 00111: read internal status register; 11110: Reset command to restore the default value of the internal status register; others to set the resolution.At the beginning of the program, first initialize the temperature and humidity sensor SHT11 to check whether it is working normally, then the MCU sends an instruction to connect with SHT11 to measure the temperature and humidity, then the temperature and humidity sensor SHT11 performs temperature and humidity calculation and A/D conversion, and then sends it to the host, and calls it repeatedly Reset, write and read data subroutines, and then through data conversion, displayed by the digital tube, continuous cycle.The program first initializes the LCD1602 to check whether it is busy, if not, the host sends a mode setting command or a display command to write into the LCD1602, then specifies the actual address of the character display, writes the data into the LCD1602, and displays the temperature and humidity.3. Simulation debugging of intelligent temperature and humidity control systemThe hardware simulation of this design is realized by Protues software, the software debugging is realized by KeilC51 software, and the simulation of the overall design is realized through the combination of software and hardware.SummarizeSince the core of the system is a high-efficiency single-chip microcomputer, the main acquisition and measurement system is SHT11, which integrates temperature sensors and humidity sensors, and has its own A/D converter, so the temperature and humidity controller has small size, low cost, and high precision High, simple interface and good anti-interference ability, coupled with the optimization program, this system has high practicability in a certain sense.The above is the design process of the intelligent temperature and humidity control system based on single-chip technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-26
2021
Design of intelligent watering system based on single chip computerNowadays, the concept of high-quality life has penetrated into all aspects of life, so whether it is at home or in work and study places, you will see some potted plants, which can not only improve air quality, but also improve the taste of life. However, due to the busy work in life, the flowers and plants will dry up and die if they are not watered in time, which will bring economic losses and spiritual unhappiness.Existing intelligent flower watering products have high cost, poor practicability and low sales volume. This work starts from the perspective of smart home, based on the AT89C51 chip, using some simple components such as triodes, relays, and humidity sensors, to design this smart watering system. It is simple and reasonable, low in cost, high in practicability, and low in power consumption. It can work for a long time and has a good application prospect.1. The composition and working principle of the intelligent watering systemThe intelligent watering system for detecting soil moisture mainly includes a main control module, a sensing module, a power supply module, an input module, a pumping action module and a display module.The main control module takes the AT89C51 chip as the core, and cooperates with the reset circuit and the clock circuit to form the minimum single-chip system; the sensing module is mainly composed of a soil moisture sensor, which can monitor the soil moisture in real time and has high accuracy; the power module is through The 5V power supply interface realizes the power supply to the system; the display module displays the soil humidity and the current mode through the LCD1602 liquid crystal screen, and the input module uses key input to realize the selection of automatic watering and manual watering modes and the setting of the upper and lower thresholds of humidity; the action module is controlled by pumping water Composed of motor and active buzzer. The system can detect soil humidity in real time, and has two modes to choose from—manual mode and automatic mode. In manual mode, artificial watering can be realized through buttons; When the water pumping motor does not operate, the buzzer will not alarm. When it is lower than the set lower limit, the buzzer will alarm. At the same time, the pumping motor will pump water for irrigation until the humidity reaches the set upper limit. The system will automatically stop the irrigation function, and at the same time The buzzer alarm is released.2. Hardware design of intelligent watering system(1) Single-chip microcomputer control module: AT89C51 is a low-voltage, high-performance CMOS 8-bit single-chip microcomputer produced by Atmel. At the same time, AT89C51 has a cheap price, and it has good compatibility with MCS-51 series. Therefore, AT89C51 is used as the control chip in this system. The main performance parameters of AT89S51 are completely compatible with MCS-51 series.(2) Soil moisture sensor module: This work uses the YL-69 humidity sensor module. YL-69 is a simple soil moisture sensor. Its principle is a humidity-sensitive capacitor. When the humidity of the environment changes, the medium in the environment where the humidity-sensitive capacitor exists will change, resulting in a change in the capacitance value in the humidity-sensitive capacitor. , the capacitance value is proportional to the humidity value. Since the humidity sensitive capacitor has the characteristics of high sensitivity, fast response, and small hysteresis, the humidity sensitive capacitor is easy to miniaturize and integrate. In the system, the collection of soil moisture data is completed by YL-69.(3) Key input module: S1 bit reset key, S2 bit set humidity value key, S3 humidity value adjustment plus key, S4 humidity value adjustment minus key.(4) Liquid crystal LCD1620 display module: The display of liquid crystal display LCD1602 is realized through the principle of the physical characteristics of liquid crystal, and the use of voltage can control the display area. When there is electricity, the liquid crystal can display images.3. Software Design of Intelligent Watering SystemThe software part is mainly based on the system design idea, clarifying the operation logic, and using keil for programming. The system software design includes soil moisture detection program, program for analog-to-digital conversion of collected data, program for setting upper and lower limits of humidity, display program, buzzer program, etc.The idea of the whole program of the soil moisture detection device is: the soil moisture sensor collects the signal, performs analog-to-digital conversion, the single-chip microcomputer reads the value of the humidity, after processing, and then sends the humidity value to the liquid crystal display for display, when the value is less than the minimum value When the value is greater than the minimum value, the pump is turned on and the water pump is turned off.On the basis of this system, functions such as temperature control, light control, remote control watering, and wireless control can also be added to further maintain plants, which can be used for subsequent expansion research.4. Test of intelligent flower watering system(1) Test conditions:Under indoor room temperature conditions, power on the system, set the appropriate upper and lower thresholds for soil moisture, and place the soil moisture sensor in the soil of potted plants. At this time, observe the current value of soil moisture on the LCD display. The setting mode is manual mode, press the button, the motor pumps water, after pumping for a period of time, press the button to stop pumping, and realize the manual start and stop function. The setting mode is automatic mode, three situations. If the current soil humidity is within the set upper and lower limits, the pumping motor and buzzer will not act; if it is lower than the set lower limit, the buzzer will alarm, and the pumping motor will pump water until the soil humidity reaches the set upper limit; if the current If the soil humidity is higher than the set upper limit, the buzzer will alarm.(2) Test results:Set the upper limit threshold to 60% and the lower limit threshold to 30% to test the response of the system under different soil moisture conditions.After multiple tests in manual mode and automatic mode, the system has zero error in action, which proves that the system can work normally, and has high reliability and strong practicability.The above is the design technology of the intelligent watering system based on the single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-25
2021
Application of C language in the development of single-chip microcomputerWith the continuous development of today's computer application technology, under the role of single-chip microcomputer, today's society has gradually entered the era of intelligent development. The research and development of single-chip microcomputer has been highly valued by all fields of society, and has become an important symbol for judging the degree of social modernization in the new era. . In the past, the development of single-chip microcomputers was mostly carried out with the help of simple and convenient assembly language, but in the face of the urgent needs of various functions of single-chip microcomputers in various fields of society, single-chip microcomputers urgently need to realize the optimization of structure and function under the influence of multiple languages. As a result, C language has appeared in the development of single-chip microcomputers by virtue of its strong portability and high-level language features, which has greatly promoted the future development of single-chip microcomputers. It can be said that the application of C language in the development of single-chip microcomputer has become a general trend, which is of great significance to the long-term development of single-chip microcomputer development. For this reason, as an ordinary single-chip microcomputer researcher, it is necessary for us to conduct an in-depth analysis and discussion on the application of C language in the development of single-chip microcomputers in combination with the analysis of the current social and technological development forms, so as to promote the development of C language in all aspects. The full play of the advantages can provide more reference opinions and suggestions for the development of high-quality and multi-functional single-chip microcomputers.1. Analysis of concepts related to C language and single-chip microcomputer1.1 Introduction to C languageC language is a commonly used computer programming language, which is mainly used for the underlying software development of the network base end and system background, so it shows a good function in dealing with low-level software development problems. The main goal of the C language at the beginning of its development was to effectively improve the effectiveness of computer programming work, to effectively deal with low-level memory programming problems with the simplest compilation method, and to endow the C language with good performance while reducing the generation of machine codes as much as possible. The cross-platform adaptability makes it easy to run freely even in the absence of operating environment support. The difference between the C language and the common C++, Java and other languages is that its programming tasks are mainly process-oriented rather than objects. The basic features of C language mainly include: First, C language has advanced language attributes. It perfectly combines the basic structural features of high-level languages and the practical features of low-level languages; secondly, C language is a structural language. Provide users with recyclable and easy-to-call program statements in the form of functions, so as to separate data from code, ensure a clear program structure and make each part have good program independence; finally, the C language code level can be Realize cross-platform operation. C language can run freely in Windows, UNIX, DOS and other operating systems, and it has lower requirements on the hardware environment for language operation. Therefore, compared with other languages, C language is more flexible and convenient to use.1.2 Introduction to MCUSingle-chip microcomputer is also called single-chip controller, and its function is not to solve a single logic problem, but to include various functions of the entire computer system. In particular, the single-chip microcomputer can integrate CPU, RAM, ROM, A/D converter, interrupt system, pulse width modulation circuit, etc., into a small silicon chip under the action of VLSI technology to form a fully functional microcomputer system. Therefore, we can regard the integrated circuit chip as a single-chip microcomputer as a special microcomputer. Compared with a real computer, although it lacks I/O equipment, it has unique advantages in terms of price, quality, and volume. Advantages, which provide great convenience for the development of its various functions and applications in multiple fields. Today, with the continuous development of computer technology in our country and the deepening of the research on single-chip microcomputers, the current single-chip microcomputers perform well in various fields of society, and have a very wide range of application markets, as small as navigation systems, household appliances, and communications in our daily life. Equipment, smart IC cards, smart toys, as large as the implementation of industrial control, smart meters, data transmission, robot research and development, medical equipment, etc. are all under the role of single-chip microcomputers to realize the intelligent upgrade of products in the new era.2. The advantages of C language in the development of single-chip microcomputer2.1 Contribute to the improvement of developer work efficiencyIn the development of single-chip microcomputer, although assembly language has many advantages in terms of program execution efficiency and resource occupation, it still has a large gap with C language in terms of program language portability. This is also an important reason why C language is gradually replacing assembly language and is widely used in the development of single-chip microcomputers. With good program portability and environmental adaptability, the C language can be read by programmers under any circumstances and used to solve various programming problems, which greatly saves the work efficiency of programmers and reduces Complexity due to multiple language variations. At the same time, the C language also has good advantages in the integrity of the program structure, etc., and performs well in terms of compilation efficiency and operation speed, which makes programmers do not have to worry about trivial problems in program design. , which greatly improves the work efficiency of program developers.2.2 Contribute to the improvement of the development quality of single-chip microcomputerWith the development of intelligence in today's society, from the research and development of high-tech products to all kinds of electrical appliances and electronic products in people's daily life, it is necessary to use the single-chip microcomputer to give these products unique functions, and then to meet people's desire for convenience. , Intelligent life needs. However, in the face of the rapidly changing computer information technology, people have higher and higher expectations for intelligent life while learning more about computer information technology knowledge, which requires us to always keep the development of single-chip Constantly innovating, in order to make certain improvements in terms of function and quality according to social needs. Due to the advantages of both high-level and low-level languages, the C language can directly access various hardware during the application process, and it also supports programming design from the top down, which provides the possibility for the innovation of single-chip functions. Contribute to the improvement of the development quality of single-chip microcomputer.2.3 Contribute to the optimization of MCU development programWe have also mentioned in the overview of the article that one of the important features of the C language is that it has the characteristics of a structured language, that is, the programs are separated from each other in terms of data and code, and they communicate with each other except for information exchange. Independent and hierarchical. Applying C language to the development of single-chip microcomputer can promote the modular evolution of each program of single-chip microcomputer under the function of this feature of C language, and then realize segmented problem solving in the stages of use, debugging, maintenance, etc. The processing is clearer and more efficient, and promotes the optimization of the single-chip microcomputer development program.3. The specific application steps of C language in the development of single chip microcomputer3.1 Development tool downloadThe download of C language development tools is the primary link for the smooth application of C language in the development of single-chip microcomputers. For this reason, we can download the C language development tools we need from various software download websites. For example, TC2.0, VC++6.0, visualstudio, codeblock, VisualStudioCode, etc. These tools are different in function and difficulty, and we can choose reasonably according to the specific single-chip design. After the download task is completed, it is necessary to decompress and install the installation package, and enter the correct serial number while accepting the genuine inquiry, and then complete the installation step by step under the guidance of the software installation prompt.3.2 Create C source fileFirst, we need to create a new project in the downloaded tool, and then create a new file in the created project or add the content of the previous program file to the project. After that, it is necessary to create a new language program file, and use the basic language structure of C language such as void, signed, intint, void, restrict, return, continue to write the required single-chip program step by step in the text editing window, and write After the task is completed, save the file to generate the final C language file.3.3 Debugging and compiling the programDebugging and compiling programs is an important intermediate link in the application of C language in the development of single-chip microcomputers. It serves the purpose of checking and improving the written programs. Under the function of debugging, errors in the source files can be effectively found and corrected in time. For this reason, at this stage, the designer is first required to adjust the software to the debugging mode, and then carry out the debugging task at the level of the source program with the help of an emulator. In this process, the designer must check whether the content of the source file is correct or not Carry out careful observation, and complete compilation of the source program, and generate the target module under the action of the editor. After debugging, it is necessary to link the compiled target modules to generate a complete file.3.4 Generate HEX fileAfter the C language program is compiled, it can be acquired and executed by the microcontroller by generating the format file HEX with the help of various compilers. Therefore, the generation of the HEX format file can be regarded as the last link in the application of the C language in the design of the microcontroller. Whether the HEX format file generation task can be executed smoothly or not will have extremely important practical significance for the development level, efficiency, performance, and power of the single-chip microcomputer. To do this, first of all, we need to align the task object with the task file, and make full use of its function of programming the chip by generating a HEX file. At the same time, it is necessary to write the single-chip microcomputer HEX format file into the memory under the function of the editor, and debug the performance of the designed single-chip microcomputer under the function of the emulator.4. Precautions for the application of C language in the development of single-chip microcomputer4.1 Focus on the improvement of programming code efficiencyUnder the background of continuous expansion of MCU research work, C language has become an extremely important programming language in MCU design, and has played an extremely important role in the innovation of MCU functions and performance enhancement. But we must also realize that the C language has been used in single-chip microcomputers for a short time, so various problems will inevitably arise in the process of programming, which will delay the development of single-chip microcomputers. Therefore, when using C language in the development of single-chip microcomputers, one of the important issues we need to pay attention to first is the improvement of the efficiency of C language programming codes. For this reason, before writing the C language MCU program, it is necessary for us to have a full understanding of the various C language editors we use and come into contact with, so as to make a reasonable choice of the editor used in combination with the actual work. . At the same time, it is also necessary to summarize the C language programs that appear frequently in the programming of single-chip microcomputers, and summarize the number of assembly language lines corresponding to them, so as to make a clear understanding of the compilation efficiency of each language. understanding. Furthermore, in the future work, the compilation and execution efficiency of C language programming codes will be effectively improved through the flexible use of compilers and the accurate selection of high-efficiency compilation languages.4.2 The definition of variable type should be clearAffected by programming habits, some programmers are used to directly defining new variables at the initial position of the program without considering the inside and outside of the function. Although this practice does not constitute a programming error in principle, it does This practice is likely to have a certain impact on the subsequent execution of the program, so it is not advisable. For this reason, we must pay attention to the clarity of the variable type definition, and make a reasonable choice of the variable placement position according to the different compiler versions. For example, generally speaking, in the C90 version of the compiler, global variables belong outside the function and can only be placed before the reference, while in the latest C99 version, local variables can be flexibly placed at any location.SummarizeIn short, through the above research and discussion, we have a clearer understanding of the advantages and functions of C language in the application of single-chip microcomputers, and we have also seen the important social development trend of C language in the design of single-chip microcomputers. In order to effectively enhance the advantages of C language in the design of single-chip microcomputers, we will continue to increase the research work on single-chip microcomputers and C language in the future work, and strive to explore the bright points of design. development efforts.The above are the details of the application of C language in the development of single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Songix single-chip microcomputer and Yingguang single-chip microcomputer agent, selling and developing the MCU and voice IC solutions of Songix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-24
2021
Application analysis of single-chip technology in electronic products of the Internet of ThingsNowadays, electronic technology has become an indispensable driving force to promote the development of industrial society and the establishment of computer information society, and it has also completely changed the way of life of human beings. From life entertainment to communication, from industrial control to automatic technology, it brings people immersive sensory enjoyment of sound, light, electricity, etc. In the construction work of industrial control, its precise automatic control and management system not only greatly It saves the cost of manual management and improves the accuracy and efficiency of management. Electronic equipment affects the process of the whole world from all aspects, and all of this depends on the development of electronic product control system, that is, single-chip microcomputer technology.1. The principle and concept of single-chip microcomputerThe emergence and development of single-chip microcomputer is inseparable from the development of computer technology. Early electronic product equipment can only rely on simple current effects to control sensors or mechanical components to achieve control functions. This control method has a single function and low function execution rate. With the development of computer technology, it was not until the emergence of VLSI in the 1980s that the single-chip technology officially entered the stage. The electronic control equipment in large-scale industrial industries is complex and cumbersome, and it is not easy to deploy. However, with the development of electronic entertainment equipment in thousands of households and the miniaturization, intelligence and integration of machinery, it is necessary to implement control functions on it. Electronic control systems obviously cannot be applied to circulation and general commercial fields. Therefore, it is necessary to take advantage of the advantages of integrated circuits to integrate a small computer operating system with many functions such as control, feedback, calculation, and storage into one chip to realize all the functions of an ordinary computer system. Execution on a small chip is widely used in home entertainment, industrial control, aerospace and other aspects due to its complete functions and small size compared with traditional computer control systems.2.The development history of single-chip microcomputer(1) Concept proposal: From the beginning of the birth of single-chip microcomputer, it is to solve the control problems of industrial equipment and electronic equipment. Contrary to the concept of traditional computer system adopting desktop control mode, the original intention of single-chip microcomputer design is to solve the problem of industrial control system and circulation electronic equipment. The internal space of the equipment is small and the structure is compact. Therefore, the design of its structure and integration method has become the standard that needs to be determined at the very beginning, and the design standard of single-chip microcomputer has been used until now.(2) Function expansion: Due to the increasingly diverse and complex functions of electronic equipment, for the design of single-chip microcomputers, the main task at this stage is to understand the functions that various electronic equipment needs to achieve according to specific service objects, and promote the design of single-chip microcomputers to continuously meet The development needs of all walks of life.(3) System formation: With the increasing application range of single-chip microcomputers in social and economic life, the improvement of interface circuits in various industries has driven the continuous improvement and development of its design functions, and the functional design of single-chip microcomputers has gradually matured. Driven by technology, the current single-chip microcomputer can completely concentrate the entire electronic control behavior and perform systematic analysis and processing, officially entering the category of systematic control solutions.3. Application of single-chip microcomputer technology in electronic equipment of the Internet of ThingsThe technical core of the Internet of Things is to apply computer network information technology to issue commands to the control system in electronic equipment through network instructions to complete various functional operations. People can also control electronic products from a long distance, and can keep track of the operation status of industrial equipment, aircraft equipment or electronic equipment at any time, which greatly improves work efficiency and reduces labor costs. At the same time, because it can be operated from a long distance, it can achieve effective management for dangerous environments or areas that are difficult to reach manually. Therefore, for the Internet of Things industry, the single-chip microcomputer is an important factor that promotes the development of the Internet of Things industry.3.1 Application of single-chip microcomputer in electronic monitoring industrySingle-chip microcomputer technology has completely changed the way electronic monitoring and access control security monitoring work. With the improvement of living standards and material life, people have higher requirements for safety monitoring. The traditional cable-type closed-circuit monitoring equipment can only be connected to the monitor and the video recorder through the TV optical cable, which requires a large investment in transformation, and requires security personnel to observe the monitoring probe 24 hours a day in order to detect abnormalities in time. When people go out, for abnormalities The situation cannot be responded to in a timely manner, and at the same time, the exposed monitoring equipment is also vulnerable to sabotage. Ordinary families simply cannot invest such a large amount of manpower and material resources. Therefore, for a long time, electronic monitoring has only been popularized in public institutions and large enterprises, and has not been able to enter ordinary families.With the popularization of computer network technology and wireless network, monitoring equipment using single-chip Internet of Things technology can not only remotely control the lens stretching, rotation, alarm and evidence collection operations of monitoring equipment at any time through the Internet of Things control means, but also because Wireless transmission can be used, so there is no need to consider the erection of monitoring cables when deploying monitoring equipment. At the same time, you can also view the monitoring screen in real time no matter where you are, and respond to various abnormal situations in time to ensure Safe operation of facilities such as home security and industrial equipment.3.2 Application of SCM in industrial production managementDue to the characteristics of the industry itself, the working environment of industrial production enterprises is generally an extreme environment of high temperature, high heat, and high pressure, and even toxic gases and radiation pollution will inevitably be produced. The management of this extreme environment cannot be done by manpower. Therefore, only Adopt mechanical control means to monitor and manage the work. The traditional single control equipment only has control functions, but does not have functions such as data analysis and working environment monitoring. Therefore, the awareness of crisis response is poor, and it is often only possible to take countermeasures when a safety accident occurs. However, due to the harsh environment on site Usually, it is necessary to do a good job in the safety investigation of the accident site before the construction personnel can be allowed to enter. Before that, there is nothing to do.Utilizing the highly integrated features of the single-chip embedded system, for areas that cannot be reached by manpower, the operation of various industrial instruments and equipment can be controlled, supervised and evaluated at any time on site, and the risk prediction of possible industrial accidents can be made. Keep abreast of industrial production dynamics. Moreover, by installing controllers in multiple key facilities and channels, the spreading channel can be cut off quickly when a crisis occurs, the loss can be minimized, and the enterprise's risk self-examination and self-rescue capabilities can be improved.3.3 Application of MCU in aviation navigation, flight safety and positioningThe development of all science and technology in human society is inextricably linked, and they promote and interact with each other. The history of human aviation development is the combination of aviation industry, electronic technology, radio communication technology, satellite positioning system, computer navigation equipment, automatic driving system and other high-tech aspects.Since the invention of airplanes in the early 20th century, pilots can only determine the flight azimuth and altitude by sight or gyroscopes. These methods will be interfered by weather factors, thus severely restricting the development of the aviation industry. However, with the application of high-tech electronic equipment, aviation flight has gradually got rid of the limitation of human navigation. With IoT analysis technology, the navigation center can guide and supervise the flight status of the main components during the flight at any time. If necessary, it can take over the flight control system through the electronic device control program to ensure flight safety. Microsoft announced in 2016 that it will cooperate with Rolls-Royce to use Internet of Things technology to monitor the flight status of aero-engines in an all-round way, so as to improve the working stability and safety of aero-engines.epilogueThe application of single-chip microcomputer technology in the Internet of Things industry is only a part. It has been applied in various industries such as human life entertainment, communication electronics, infrastructure industry, and national defense construction. In today's information society and artificial intelligence technology. The development of communication and voice control is worth looking forward to. Whether in the Internet of Things industry or other industries, it is necessary to fully implement the research and development and education work in the field of single-chip control, and follow the pace of global economic development in the information age.The above is the application analysis of the single-chip microcomputer technology introduced to you by Shenzhen Zuchuang Microelectronics Co., Ltd. in the Internet of Things electronic products. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Songix single-chip microcomputer and Yingguang single-chip microcomputer agent, selling and developing the MCU and voice IC solutions of Songix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-23
2021
Pet smart collar design based on STM32 microcontrollerIn recent years, more and more people keep pets, and the corresponding incidents of pet biting emerge in endlessly. However, no one claims the biting pets, and giving pets an "ID card" has become an urgent matter to be solved. Like an ID card, an electronic tag is designed for the pet, and a "name" is given to the pet with RFID technology.1. Pet smart collar designThe functional modules we need include positioning module, electronic label module, sensor module, and communication module. Since there are many serial ports involved, we use the STM32 single-chip microcomputer with relatively powerful performance as the control core.There are three mainstream short-range wireless communications, namely wifi technology, zigbee technology and bluetooth technology. We need to choose the required communication module. Smart collars are worn by pets and must be worn continuously, so the communication technology we need is low power consumption. When the pet exceeds a certain distance from the owner, we hope to trigger the recall function through the weakening of the communication module signal. Therefore, the communication range does not need to be too large. After clarifying the design requirements, let's look at the characteristics of the three communication technologies. WiFi technology, WIFI is currently the most widely used wireless communication technology, the transmission distance is 100-300M, the rate can reach 300Mbps, and the power consumption is 10-50mA. Zigbee technology, the transmission distance is 50-300M, the rate is 250kbps, and the power consumption is 5mA. The biggest advantage is that it can self-organize the network. The powerful networking capability is incomparable to other technologies. The maximum number of network nodes can theoretically reach 65535. Bluetooth (Bluetooth) technology, the transmission distance is 2-30M, the rate is 1Mbps, and the power consumption is between zigbee and WIFI. Bluetooth technology is committed to enabling all mobile or non-mobile devices that support this technology to easily establish network connections, voice and data communications within a space of 10 to 100 m. In terms of power consumption, we exclude WiFi, and zigbee's powerful networking capabilities cannot be reflected in this design, while Bluetooth's low power consumption and limited communication distance just meet our design requirements.2. Design of each module of pet smart collar2.1 STM32 microcontroller system designBecause I have not systematically studied single-chip microcomputers, but I know that single-chip microcomputers are microcontrollers, which are integrated circuit chips. I/O port and interrupt system, timer/timer and other functions (may also include display driver circuit, pulse width modulation circuit, analog multiplexer, A/D converter and other circuits) integrated on a single silicon chip A small but perfect microcomputer system, widely used in the field of industrial control. The smallest system of single-chip microcomputer uses STM32F103 as the control core, and STM32F103 is an ARM with ultra-low power consumption. The Cortex-M3 processor core has the advantages of high performance, low cost, and low power consumption. The maximum operating frequency can reach 72MHz. The on-chip 512KB Flash memory STM32F103 has five serial ports. Since there are many serial ports involved in this project, the performance of STM32 is also relatively powerful, which is especially suitable for the control of smart pet wearable devices.2.2 Design of Bluetooth moduleWhen I found the use of STM32 MCU as my minimum control system in the literature, the Bluetooth module used by the STM32 MCU in the literature is HC-06, but there is no complete introduction to HC-06, so I found on the Internet using HC-05 Bluetooth The design that the module is connected with the one-chip computer. The HC-05 master-slave integrated Bluetooth serial port module adopts the BlueCore4 series chip of the British CSR company, which complies with the Bluetooth 2.0+EDR specification, and can be paired with intelligent terminals such as computers, Bluetooth hosts and mobile phones with the same Bluetooth function. The HC05 Bluetooth module communicates with STM32 through the serial port to complete the sending and receiving of data. Use USART2 on the STM32 board to communicate with the Bluetooth module.2.3 Electronic label designElectronic tags are also called radio frequency tags, transponders, and data carriers; readers are also called readout devices, scanners, reading heads, communicators, and readers (depending on whether the electronic tags can rewrite data wirelessly). The spatial (non-contact) coupling of radio frequency signals is realized through the coupling element between the electronic tag and the reader; in the coupling channel, energy transmission and data exchange are realized according to the timing relationship.2.4 GPS moduleGPS positioning belongs to outdoor positioning, just in line with the habit of pets running around outside. GPS uses a network of 24 artificial satellites to triangulate the position of the receiver and provide latitude and longitude coordinates to achieve accurate positioning. However, the position of GPS positioning needs to be in the place where artificial satellites or orbits can be seen, so it is only used for outdoor positioning. It is a positioning technology that combines GPS technology, image processing technology, wireless communication technology and GIS technology, and can realize tracking and positioning, track playback, map making, mileage statistics, vehicle information management, monitoring and dispatching, SMS notification, voice prompt and alarm and other functions. In this device, after the STM32 microcontroller receives the requested GPS positioning information, it will communicate with the GPS module through the serial port. After the GPS module locates and obtains the positioning information, it will send the positioning message to the STM32 through the serial port. After the STM32 receives the data, it will pass the data through the serial port. Forward to the GSM module, and finally the GSM module sends the data to the user's mobile phone or the STM32 forwards the data to the Bluetooth module, and the data is sent to the user's client through the Bluetooth module, and the accurate location information of the device can be obtained.SummarizeThe pet smart collar designed in this design should be able to realize the functions of tracking and positioning, electronic pet ID card, temperature detection, detection of abnormal calls and music (owner's voice) comfort, and call back (voice) pets. After clarifying the requirements of this design, I can choose the appropriate equipment module to meet my design requirements. Position tracking can use positioning module and GPS positioning; electronic pet certificate can use RFID technology to realize the status writing of pets (name, owner's phone number, age and vaccination status); temperature detection, detection of abnormal calls and music (or owner Sound) pacification function can be implemented with multiple sensors. When the pet’s barking frequency reaches a certain limit value, the speaker will be activated to play the owner’s recording to appease and notify the owner, so a communication module is also needed; when the pet runs out more than After a certain range and a certain period of time, the speaker will also be triggered to play the recall recording. The owner can perform various operations and obtain information through the Bluetooth connection on the terminal device.The above is the pet smart collar design technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-22
2021
Although the single-chip microcomputer has its own programming language, if we use the programming language of the single-chip microcomputer to make practical things, it is very difficult. For example, if you do a division with sixteen digits, you have to compile dozens of statements. If you don't have special experience in studying single-chip microcomputers, I believe it will be difficult to do it. But if you use C language, one sentence is enough, and the program written is streamlined, easy to detect errors, and debugging is relatively simple. As long as you have some hardware understanding of single-chip microcomputers, you can use C to compile some more complicated programs. Now the execution speed of the single-chip microcomputer is very fast, and the clock frequency can reach 40MHz. There is no such thing as the inefficiency of the C language that will affect your program operation. In addition, C language, as a high-level programming language, has good structure and portability. The introduction of C language in single-chip microcomputer can greatly facilitate the programming and development of single-chip microcomputer.1. Overview of MCU system(1) Definition of single-chip microcomputer: the English full name of single-chip microcomputer is single chip microcomputer, translated as single-chip microcomputer, which mainly integrates various components such as CPU, semiconductor memory, I/O interface, interrupt system and timer into a semiconductor chip In general, the entire digital electronic computer composed of software and hardware is called a single-chip microcomputer, also known as an MCU (Micro controller Unit).(2) The system composition of the single-chip microcomputer: The single-chip microcomputer system usually includes two parts: the hardware system and the software system. The hardware system mainly refers to various components integrated on the single-chip microcomputer chip and the controlled object. A software system usually consists of many main programs or subroutines, which are written in assembly language or C language, and have functions such as system monitoring.(3) Functional characteristics of single-chip microcomputer: As a kind of microcomputer, single-chip microcomputer has many functional characteristics. First, the components of the single-chip microcomputer are highly integrated, suitable for making large-scale or very large-scale integrated circuits, and have strong reliability and anti-interference ability. Second, due to the high degree of integration, the price of single-chip microcomputer is relatively low, and the cost performance is high. Third, the instructions of the single-chip microcomputer are relatively rich and have powerful control functions. Fourth, many single-chip microcomputers only need 2.2V or even lower voltage to run, so their operating voltage is low and power consumption is low. Fifth, the single-chip microcomputer is small in size and easy to carry.(4) The scope of application of single-chip microcomputer: the powerful features of single-chip microcomputer determine the wide range of applications. In aspects such as national defense, military agriculture, industry, agriculture, etc., the single-chip microcomputer has played its usefulness to some extent. To sum up, it is mainly in household appliances, mechatronics, intelligent instrumentation, real-time process control, and distributed multi-machine systems.2.The characteristics of C language in the development of single-chip microcomputerAs a structured programming language, C language has strong functionality, structure and portability. The use of C language to develop single-chip microcomputer systems allows programmers to write perfect single-chip programs without knowing the instruction set of single-chip microcomputers. In the stand-alone chip system based on C language, the data can be processed professionally, and non-asynchronous damage during operation can be avoided. Among all computer languages, C language is the most widely used. In the development of single-chip microcomputer, the use of C language will show the following advantages.(1) Rich library functions and good portability: C language is a compiled programming language with fast calculation speed and high compilation efficiency. It has a complete function library and is more readable than assembly language. Because it is an object-oriented language, its portability is good.(2) It is widely used and convenient for development. Compared with assembly language, C language is more in line with the way of human thinking. Many programmers are accustomed to C language, programming in C language can reduce their effort on hardware matching, so that they have more time to debug programs and optimize algorithms.(3) Perfect program structure and good compatibility: programs compiled in C language often have a relatively complete modular structure, which can be modified and supplemented at any time in subsequent development. It is precisely because the program structure of the C language is relatively complete that it is widely used in modular design. The single-chip microcomputer program written in C language adopts a top-down structured program. Corresponding to different modules, different functions are designed to make the entire program function modular and achieve different compatibility. This structured module can make the structure of the whole program clear and facilitate subsequent debugging and modification.3. MCU development technology based on C language3.1 Single-chip microcomputer development environment based on C languageAmong the numerous MCU program development software, KEILC5l is the most widely used software, which integrates editing, compiling, simulation and other functions, and can support MCS51 chips produced by different companies. At the same time, KEILC51 software has a friendly operation interface, and has integrated C language, and also supports assembly language, so it has powerful programming and debugging functions. The development environment of KEILC51 includes compiler, assembler, real-time operating system, project manager, debugger and other parts. The source files of the written target program can form different groups, and the project manager can be used to easily correspond to the target, group or single file. The browser integrated in KEILC51 includes a global search function, which can help users quickly search files and find information. The source code editor is integrated in the KEILC51 software, and its operation interface is friendly, and many features are familiar to users. Using the natural and convenient programming environment of the source code editor, the compiler can edit and debug the code at any time in the editor, and can quickly check the error and optimize the code of the written program.3.2 Development steps of MCU based on C languageWhen using the C language to develop a single-chip program, it is usually divided into: the process of writing and compiling the program code, connecting and converting the object code. After writing the program code and debugging the program, the program should also be compiled into a HEX file so that it can be transplanted to the microcontroller and execute the compiled code. The development steps of single-chip microcomputer based on C language mainly include four processes.The first step is to install the software. Log in to the official website of KEIL, download the required commercial software installation package to the computer. After the download is complete, decompress the installation package, then double-click the SETUP.EXE file, agree to its terms of agreement, enter the serial number according to the prompt information, and complete the installation process step by step. You can perform a complete installation and make corresponding settings.The second step is to create the source file. First, open the software to create a new project, or add an existing project, and then create a new blank program. In the text editing window of the new program, write the required code to produce the source file of the C language program.The third step is to compile and debug. This is also an intermediate stage in the development process of the single-chip microcomputer. The developer switches the software to the debugging mode, and then uses the simulation function of the software to debug the source code one by one. Check and find wrong codes, correct and perfect them in time. Use the C51 compiler to debug and compile the source program to generate object code or module 1. Finally, connect the modules together to finally generate the file.The fourth step is to generate a HEX file. Use the hexadecimal byte width proposed by Intel to save the HEX file, then generate the HEX file from the compiled target program, and finally burn the file into the chip of the single-chip microcomputer through the compiler for subsequent simulation and debugging.in conclusionTo sum up, the single-chip microcomputer technology based on C language has powerful functions, which can realize the function specified by the hardware. The emergence of single-chip microcomputer has greatly promoted the rapid development of computer technology, and has been applied to all aspects of production and life such as household appliances and automotive electronics. C language has gradually replaced assembly language and has become the most suitable language in the development of single-chip microcomputers. In future applications, the technology of single-chip microcomputers based on C language will have more room for development.The above are the technical details of the single-chip microcomputer based on C language introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-21
2021
Realization Method of Watchdog Technology in Single Chip Microcomputer System1. Overview of single-chip microcomputer and watchdog technologySingle-chip microcomputer systems are more and more widely used in military, industrial, and civilian products. It completes many functions realized by hardware in the past by software, which is small in size, rich in functions and highly intelligent. Affected by the system structure, manufacturing process, selection and installation of components, these are the interference factors of the single-chip microcomputer system, which bring many problems to the reliability of the system. These disturbances will cause the single-chip program to fly to a temporarily formed infinite loop or the PC pointer to fall outside the address of the program memory chip. In this case, redundant instructions and software traps cannot be resolved, and the system will be completely paralyzed. In this case, only reset. Therefore, the watchdog technology is a timer circuit that can issue a reset signal. Setting the watchdog is an important way to prevent the single-chip from crashing and improve the anti-interference performance of the single-chip system. The watchdog technology can be divided into single-time watchdog, dual-time watchdog, and timing reset watchdog. This article mainly introduces the implementation method and principle of watchdog technology.The most widely used watchdog circuit is actually a special timer circuit. The watchdog counts at a fixed rate, and when the preset time is over, an overflow pulse is sent to reset the microcontroller. If the timer is forced to be cleared every time before the timer overflows, no overflow pulse will be issued. The clearing pulse is sent by the CPU, and the watchdog will not overflow in the microcontroller. Once the program enters an infinite loop without feeding the dog statement. This article calls this kind of watchdog a typical watchdog. Typical watchdogs have been integrated, such as MAX706, MAX791, X5045, etc. There are also many single-chip computers that integrate this kind of watchdog, such as P89C669 and P89V51RD2 of NXP. And other single-chip microcomputers, the specific circuit can refer to the technical information of these chips. The following will take the X5045 as an example to introduce the implementation of single-time limit and double-time limit watchdog.2. Single-time watchdogThe method of using only a single watchdog timer to control the reset terminal of the single-chip microcomputer is called a single-time limit watchdog, which is relatively simple in circuit implementation, and can effectively control the normal operation of the single-chip microcomputer system under normal circumstances. Figure 1 shows the hardware circuit diagram of the single-time limit watchdog realized by the X5045 watchdog chip. In the figure, P1.0 of the single-chip microcomputer provides chip selection signal for X5045, P1.1 receives serial data of X5045, P1.2 provides serial clock, P1.3 sends serial data to X5045, RST pin of X5045 and single-chip microcomputer The RST pin is connected to reset the microcontroller. In the MCU control program, a "feed the dog" instruction is placed at a certain time interval, which is less than the preset timing time of X5045, so as to ensure that X5045 will not overflow when the program is running normally; and once the program is abnormal, X5045 will time out and overflow , and send a reset signal through the RST pin to reset the MCU and start running the program again.3. Dual time limit watchdogThere is a wrong view: add a watchdog, the microcontroller will not crash. In fact, the watchdog sometimes fails completely. When the program enters an infinite loop, and the infinite loop contains the dog feeding statement, the watchdog will never overflow, the single-chip microcomputer will never get a reset signal, and the program will never escape from this infinite loop. In view of this drawback, it is necessary to design a dual-time limit watchdog system. Figure 2 shows the dual-time limit watchdog hardware circuit. One X5045 watchdog chip is added on the basis of the single-time watchdog, and the two watchdogs are connected to the RST pin of the microcontroller in the form of an OR gate. As long as there is one X5045 timeout overflow, the microcontroller is reset.The dual-time limit watchdog has two timers: one is a short timer and the other is a long timer. The timing of the short timer is T1, and the timing of the long timer is T2, 0<T1≤T2; the feeding of the long and short timers is independent. The short timer works like a typical watchdog, which ensures that the watchdog has a fast response speed under normal circumstances; the timing T2 of the long timer is greater than the time for the CPU to execute a main loop program, and each main loop only feeds the dog once , used to prevent the watchdog failure.In this way, when the program enters an infinite loop, if the infinite loop contains a short timer feeding dog statement but does not contain a long timer feeding dog statement. Then the long timer will eventually overflow and reset the microcontroller. Cleverly arrange the position of the long timer feeding dog statement, which can ensure that the probability of crash is extremely low.Almost all watchdogs currently rely on the CPU (depending on the CPU to feed the dog). This can be compared to: whether an insurance device can play an insurance role also depends on the behavior of the object it protects. Obviously, the watchdog that relies on the CPU cannot guarantee that the single-chip microcomputer will not crash 100%.4. Timing reset watchdogThe main body of the regular reset watchdog is also a timer, and when the predetermined time is reached, an overflow pulse is sent out, and this overflow pulse causes the single-chip microcomputer to reset forcibly. Timed reset watchdog does not need CPU to feed the dog.In short, the regular reset watchdog is to reset the MCU forcibly at regular intervals. In this way, even if the device is dead, its maximum dead time will not be greater than the timing time of the timer. Obviously, as long as the hardware is intact, this kind of watchdog can guarantee 100% that the microcontroller will not crash for a long time.It is more commonly used to use the 555 timer as a watchdog to connect with the RST of the single-chip microcomputer, as shown in Figure 3, when the power is turned on, C4 is charged through the resistors R1 and R2, and the pin 3 outputs a low level, and the power-on reset of the single-chip microcomputer starts normal work. By adjusting the resistance value of resistor R2, the time T of the output level of the 555 timer can be adjusted to meet the time requirement of the reset of the single-chip microcomputer. The time output by the 555 should be able to meet the working time of the main cycle of the single-chip microcomputer, so that the single-chip microcomputer can work completely .epilogueThis article briefly introduces several typical watchdog working methods and principles. In the specific design process, actual needs should be considered, and the most suitable watchdog design scheme should be adopted to obtain better anti-interference effect. On the contrary, an unreasonable design of the watchdog system will not only fail to provide system reliability, but will cause the system not to work normally. Therefore, when designing a single-chip microcomputer system, watchdog design is an important consideration.The above are the details of the implementation method of the watchdog technology in the single-chip microcomputer system introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have software and hardware function development needs for smart electronic products, you can rest assured to entrust them to us. We have rich experience in customized development of electronic products, and can evaluate the development cycle and IC price as soon as possible, and can also calculate PCBA quotations. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, Bluetooth IC and module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth wifi development, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-20
2021
Design and realization of automatic light control curtain based on single chip computerWith the development of high-tech and electronic devices, people's living environment has been greatly improved, and smart homes have been realized. Smart curtains are a part of smart home. At present, the research on smart curtains is based on visual gestures, infrared remote control and other designs. Many studies only stay in the scheme design, or the design is cumbersome and costly, or lacks human considerations. This paper proposes an automatic curtain system based on single-chip microcomputer control, which can not only solve the inconvenience of pulling the curtains by hand every day, but also show the convenience and grade of life, and can also automatically control the opening and closing of the curtains according to the light and darkness to adjust the indoor light. This design is a light-controlled curtain based on AT89C52 single-chip microcomputer control. The hardware part of the system mainly uses the signal generated by the photosensitive sensor as the input signal of the single-chip microcomputer to control the motor; the software part uses C language for programming. Considering the user's habits and weather reasons, this program also sets a selection switch, and the user can choose the automatic or manual control mode at will when using the curtains. The system has the characteristics of humanized design, economical and practical, and high reliability.1. The overall design scheme of automatic light control curtainsThis design is realized as shown in block diagram 1, AT89C52 single-chip microcomputer is the core control device. The photoresistor is used as the light collector. After the photoresistor collects the photoelectric signal, it is converted into a digital signal by the sensor PCF8591. The single-chip microcomputer reads the digital signal and sends it to the motor driver chip ULN2003, which drives the 28BYJ48 stepper motor to perform forward and reverse rotation, thereby realizing light control. Function. The 28BYJ48 stepper motor is a four-phase eight-beat motor with a voltage of DC5V~DC12V. When a series of continuous control pulses are applied to the stepper motor in a certain order, it can rotate continuously. Each pulse signal changes the energization state of a certain phase or two-phase winding of the stepping motor once, which corresponds to a certain angle of rotation of the rotor. When the change of energization state completes a cycle, the rotor turns through one tooth pitch.Using the principle of light control, when the light intensity is greater than 130lx, the curtain will automatically open; when the light intensity is less than 50lx, the curtain will automatically close; when the light intensity is between 50lx and 130lx, the state of the curtain will remain unchanged.2. Main hardware design of automatic light control curtain2.1 SCM systemAT89C52 is a low-power, high-performance CMOS 8-bit microcontroller produced by STC, with 8k in-system programmable Flash memory. AT89C52 uses the classic MCS-51 core, but has made a lot of improvements to make the chip have functions that traditional 51 single-chip microcomputers do not have. On a single chip, with smart 8-bit CPU and in-system programmable Flash, AT89C52 provides a highly flexible and ultra-effective solution for many embedded control application systems. The minimum system has a clock circuit, a microcontroller, a reset circuit, input/output devices, etc.2.2 Photoelectric sensor signal acquisition moduleThe photoelectric sensor is used to collect light signals. The chip adopts PCF8591, which is a chip integrated with a photoresistor. After the photoresistor collects the light intensity signal, PCF8591 performs A/D conversion and outputs a digital signal. The module chip adopts PCF8591 integrated module, which has a power indicator light, and the indicator light will be on after the module is powered, so that it is convenient to observe the short circuit situation during debugging. The module has a DA output indicator light. When the module DA output interface voltage reaches a certain value, the panel will light up.2.3 Motor drive circuitULN2003 is a high-voltage, high-current Darlington transistor array series product, which has the characteristics of high current gain, high working voltage, wide temperature range, and strong load capacity. It is suitable for various systems that require high-speed and high-power drives. ULN2003 is small in size, directly welded near pin 40 of the microcontroller, and connected with the power supply of the microcontroller, reducing the connection of power lines. In hardware design, in1 of the driver chip is connected to the p0.0 port of the microcontroller, in2 is connected to p0.1, in3 is connected to p0.2, and in4 is connected to p0.3. Also according to the position of the motor, directly plug in and connect it, and place the switch. The motor part can be directly connected with a straight socket and a driver. At dawn, the photosensitive sensor receives a high level, and the stepper motor rotates forward and clockwise according to the program, and the curtain is slowly opened at a certain speed. When it reaches the limit position, the curtain touches the travel switch SW3 on the right. , the switch is closed and the enabling terminal is closed, and the motor stops rotating. On the contrary, the AD value collected by the photosensitive sensor triggers the output of low level, the motor rotates counterclockwise, and the curtain opens.2.4 Clock circuit designThe clock circuit is composed of two ceramic capacitors C2, C3 and a quartz crystal oscillator. The size of C1 and C2 is 30pF, and the quartz crystal oscillator is a 12M crystal oscillator. The two capacitors C1 and C2 are connected in parallel, and then connected in series with the quartz crystal oscillator. The two ports X1 and X2 of the clock circuit are respectively connected to the XTAL1 and XTAL2 pins of the microcontroller, and the internal oscillator can generate self-oscillation. In addition, to check whether the crystal oscillator has an oscillation effect, you can use an oscilloscope to see the sine wave output by XTAL2, or you can use a multimeter to measure it. You must adjust the gear to DC. When measuring, you will find that the unstable voltage is around 2V .2.5 Manual reset button circuit connectionWhen people press the button by hand, the +5V level of the power supply will be directly connected to the RST terminal. Due to the relatively slow manual ability of the human being, the button will remain on for tens of milliseconds, and the human eye has a persistent visual effect. Therefore, the reset circuit can be manually reset to meet the time required for the reset. The S1 port of the reset circuit is connected to the RST port of the single-chip microcomputer. The RST port has a reset function. When the single-chip microcomputer is powered on, a high level with a width of more than two machine cycles (24 oscillation cycles) will appear on this pin, so that MCU reset. Therefore, the reset circuit is connected with the RST port of the microcontroller.2.6 Forward and reverse button circuit designDue to the external weather and the need to open and close the curtains at ordinary times, this design adds two manual buttons to control the forward and reverse of the curtains, so that the design meets the requirements of humanization. When you need to close the curtains during the day, just press the reverse button, and the curtains will close automatically; otherwise, the curtains will open automatically. The p2.0 and p2.1 of the button are respectively connected with the special interface p3.2 and p3.3 of the single-chip microcomputer. The second functions of these two I/O ports are the external interrupt INT0 port and the external interrupt INT1 port of the single-chip microcomputer respectively. This enables manual functionality.3. Software design of automatic light control curtainThe programming language of single-chip microcomputer is mainly assembly and C language. C language programming software has relatively complete library functions, which has many advantages such as fast speed, high efficiency, portability, and direct hardware control. Therefore, this design is realized by C language. The software consists of a main program, a display subroutine, a delay subroutine, and a key scanning program. The initialization part includes the initialization of the 1602 display screen and the initialization of the I/O port of the control stepper motor; the acquisition and display part realizes that the voltage value of the collected photoresistor is displayed on the 1602 display screen and converted into a brightness display; the interrupt part mainly reflects In the realization of the button function, the button part uses an interrupt mechanism to ensure the real-time performance of the button. Two buttons are used, one manually controls the opening of the curtain, and the other manually controls the closing of the curtain; the motor control part intelligently controls the opening and closing of the curtain according to the brightness of the environment.In short, the automatic light control curtain realizes the function of automatic switch according to the intensity of the outside light. Taking into account the different living habits of individuals, a humanized design has been carried out, and a manual switch has been added to realize the automatic switch while retaining the function of the original curtain. The overall structure of the design is simple, the price of the components is low, the design cost of the product is reduced, the device is economical and reliable, the control is flexible, and it has a certain market application prospect.The above are the details of the design and implementation of automatic light control curtains based on single-chip microcomputers introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
03-19
2021
Design of air pressure detection system based on single chip microcomputerIn the past, our country used the imported full static pressure system in-situ detector to detect the air pressure of the aircraft. These detectors are general-purpose equipment developed in the 1970s. They have a single purpose and cannot meet the inspections of various instruments and sensors on the aircraft, and cannot perform quantitative performance inspections. With the development of sensor intelligent technology, the introduction of function chain neural network (FLANN) and data fusion technology has realized the nonlinear correction and temperature compensation of sensors. Taking the single-chip microcomputer as the core, a detection system is constructed. The function and accuracy of the air pressure detection device developed based on this method are greatly improved.1. Air pressure detection system hardwareThe block diagram of the hardware part of the system is shown in Figure 1. It is composed of five parts: power supply, pressure sensor, embedded microprocessor system, vacuum pressure pump unit, gas circuit and control combination switch, among which the embedded microprocessor system is composed, as shown in Figure 2. When the pressure sensor senses the external pressure, after frequency/digital (F/D) conversion and analog/digital (A/D) conversion, the result is collected by the main microprocessor, and after calculation, compensation, correction and filtering, the result is displayed The interface is delivered to the display. At the same time, the synchronization interface of the communication processor is used to synchronize the data and the data of the downlink command. The collection of the touch keyboard interface and data collection are also carried out by the main processor, so that the user can change the display content through the keyboard. Data calculation method, instrument operation status, etc. The communication processor is used to realize the RS-232 communication interface function, the optional IEFE-488 instrumentation (GP1B) bus interface function, and the optional configuration printer interface function. Accept the downloaded information.1.1 Processor unitThe main processor selects MCS-51 single-chip microcomputer series 8031 to form the minimum application system. A piece of 27512 (64K8) EPROM and a piece of 6264 (8K8) RAM are used as the program memory and data memory for the external expansion memory. A piece of ATMEL company's ATF16V8PLD device is used to design the address decoder, which realizes the function that the traditional design method needs multi-chip or multi-level decoding to complete.The communication processor adopts the MCS-51 single-chip microcomputer series 8751, which is used to realize the RS-232 communication interface function, the IEEE-488 instrumentation (GPIB) bus interface function, and the printer printing interface function. The RS232 interface uses MAX202 receiver/transmitter from MAXIM Company. 8255 is selected for the printer interface, and data printing is realized through parallel I/O expansion. When communicating with the main processor, the DS1609 chip is used to realize the batch data exchange between the main processor and the communication processor, which realizes the separation of data transmission and data processing functions, makes them perform their own duties, and ensures the real-time performance of the system. It also effectively solves the addressing problem of the upper computer to the lower computer.1.2 SensorsThe pressure sensor used in the instrument is a resonant cylinder pressure sensor with high precision (0.02%-0.007% FS) and high stability (0.01% FS per year). Its working principle is shown in Figure 3: (1) Composition: The resonance cylinder is made of special constant elastic material with a wall thickness of 0.08mm. The material of the outer protective cylinder is similar to that of the resonant cylinder. A piezoceramic disc is used to excite and pick up the resonant rate of the cylinders, with a high vacuum between the two cylinders. (2) Principle: The pressure to be measured is passed inside the resonant cylinder, so that the resonant cylinder is subjected to a tension force. Different pressures and different tension forces have different natural frequencies. An electromechanical closed oscillator (positive feedback) is formed by using an amplifier, an exciting (pick-up) vibration element and a cylinder. They resonate at the natural frequency point of the lowest resonance level and output. That is to say, different pressures correspond to different frequencies, and the pressure can be known by measuring the frequency. Since the outside of the vibrating cylinder is vacuum, the measured pressure is absolute pressure. (3) Features: The resolution of the sensor is very high, corresponding to the pressure range of 10-1070hPa, the output change is 350,000 words, that is, each word corresponds to 0.1Pa, and the output change is 70-750,000 words corresponding to 10-3400hPa. Are in the 1 ~ 3 / million. It adopts constant elasticity and undergoes multiple aging chemical treatments, so it has good long-term stability and even better short-term stability.1.3 Interface technology(1) F/D (frequency/digital) conversion interface: Since the output of the sensor is frequency (period value), an ASIC chip (FDC9201) that converts frequency into digital is used. The input and output ports of FDC9201 are compatible with TTL/CMOS; the sampling cycle is divided into 4 levels according to the input high-frequency clock; the conversion accuracy varies between 0.1% and 0.001% depending on the situation; it has F/D self-test function; single +5V power supply. FDC9201 has four sets of independent low-frequency 12-bit binary counters and a set of high-frequency 20-bit high-speed synchronous counters, all of which are cycle counters. The low-frequency counter is connected with the data bus through the buffer, and the high-frequency counter is connected with the data bus through the latch. The synchronous controller is the core part of the chip. It is used for synchronous counting control, and ensures that the high-frequency count value of the latch is an integer multiple corresponding to the measured cycle, and at the same time generates an RDY signal to notify the CPU that the high-frequency and low-frequency data have been completed. Ready to read. In addition, there is a standard sampling cycle controller, which is used to generate four grades of standard timing cycles, and use IN-TR as a timing signal to notify the CPU. The length of the cycle depends on the external clock CLK.(2) A/D (analog/digital) conversion interface: Although the temperature coefficient of the sensor is very small, one millionth per degree, it is still not negligible for high precision, so the sensor is added Temperature sensor (AD590JH), the temperature sensor has a linearity of 0.1%, which is converted into a voltage signal of 0-5V by the amplifier, and then converted by 12-bit A/D, and the temperature compensation of the vibration cylinder is carried out by the CPU. Within the range (military products: -55°C ~ 85°C, civilian products 0°C ~ 50°C), the instrument can guarantee the accuracy mentioned above without any correction.(3) Keyboard display control interface: The system selects 8279 chip as the touch keyboard interface, and completes the scanning work of the touch keyboard by programming it, and the user can change the display content, data calculation method, instrument operation status, etc. by touching the keyboard. In addition, the user can also perform nonlinear correction on the current data through the data keypad. The system adopts VFD fluorescent digital tube display, the visible size is 150×35mm, and the display content is divided into two rows, upper and lower, with 20 characters in each row, generally composed of three parts: “parameter symbol + parameter value + unit”. When there are three parameters, the upper row is Pt or Ps, and the lower row shows the relative sensor cycle value (μs) and temperature voltage value (V).2. Main features of air pressure detection system(1) Can independently measure and display the following parameters: Ps, Pt, Qc, H, Vi, Vt, M, Mi, ΔH, H and other 10 kinds of parameters combined display, such as: Ps+H, Ps+Pt, H+H, H+M, Qc+Mi, H+Vt, Qc+Vi, etc.(2) When testing the airtightness of the static pressure system and the total pressure system of the aircraft, the instrument provides precise timing and standard measurement parameters. The timing and test points can be set by the user (password protection by designated personnel) , and can be stored for a long time (ten years), and can perform sound prompts and parameter display, and simultaneously display the set value and timing value. When the set timing time is up, the time, pressure change value or altitude change value will stop changing, and an audible reminder will be issued.(3) This instrument not only compares its flight atmospheric parameters with the instruments on the aircraft to check the consistency and validity in the in-situ detection, but also can be used as a standard for infield detection of flight parameters.(4) This instrument can be used in both the outfield and the infield (repair shop), mainly in the outfield. However, its technical parameter indicators have reached the technical indicators of ZHY-type flight atmospheric parameter comprehensive tester and GCY-1A high-precision comprehensive tester. The air path control combination switch of this instrument can control the detection of any flight air pressure instrument and sensor.(5) Sensor correction function: Any sensor has long-term stability problems. This correction function is specially designed for the convenience of users. It can be done as long as the user has pressure conditions. The instrument has two correction functions, namely linear correction and non-linear correction, which are password protected.(6) Modification function of air pressure in-situ detection parameters: parameters such as pressure air tightness timing time, pressure air tightness inspection test pressure, maximum allowable value of pressure leakage, maximum allowable value of vacuum pressure change speed, etc. can be modified. Since the above parameters are different for different aircrafts, users or qualified persons are allowed to modify them and have password protection.(7) With multiple protection functions: power supply 27V, reverse polarity protection; lifting speed protection, prevent overshoot, overshoot alarm; airspeed protection, prevent overvoltage, overvoltage alarm; air tightness There is an alarm prompt when the air leakage is out of tolerance; the connection switch Kst, the lifting speed setting value switch Pv and the maximum pressure value setting switch Pc are reminded by a white alarm circle, special attention should be paid to the operation, do not operate casually, the alarm mode has sound, Light display, flashing, etc.(8) Self-inspection function: Automatically detect EPROM, SRAM, EEPROM, F/D, A/D, sensors, etc. when power on, with fault location function.(9) Adaptive function for wide power supply changes: the 27V DC power supply in the external field has a large range of changes, so this instrument provides a wide input voltage range: it can work normally at 20-36V.3. Design of air pressure detection system software3.1 Software functions and block diagramIn terms of software programming, it is written in PLM assembly language, which can operate the hardware, is easy to improve and expand, has strong readability, reliability, and structure, and can provide users with high-quality conversion codes. Functionally, the program is divided into six parts: the main control program, the initialization program, the frame diagram of the data acquisition map 4 software system and the calculation program, the keyboard interrupt service program, the display program, and the self-test program.The main control program is the backbone of the whole program, and the system usually runs in the main program cycle. After receiving the keyboard interrupt signal, it turns to execute the corresponding interrupt service routine for data acquisition and pressure conversion. In addition, the main control program also completes the initialization and self-test tasks of 8279, timer, etc. The sampling interrupt service program has the highest priority, and the sampling period is 52.4288ms. After responding to the interrupt, the calculation of the sampling period is first completed, and then the period is calculated, so that the pressure value is obtained for use by various flight parameters.The self-inspection program detects the CPU, external RAM, F/D, and sensors. If there is a fault, the display window will report fault location information for maintenance personnel to troubleshoot. "CPUERR" means CPU fault, "RAMERR" means external RAM fault, " "F/DERR" means F/D failure, "SENERR" means sensor failure. When the MCU responds to the 8279 keyboard interrupt, the program first analyzes the key, obtains the key value, and transfers to the corresponding parameter calculation program. At the same time, it continuously accepts the pressure value of the F/D sampling interruption to calculate the flight parameter. The flight parameters to be calculated are: altitude (H), ascending and descending speed (H′), Mach number (M), indicated airspeed (Vi), and true airspeed (Vt). In terms of memory address allocation, the program memory 27512 is 0~3FFFH, and the data memory 6264 is 8000~9FFFH. In terms of interrupt distribution, F/D sampling interrupt priority is high, timer timing interrupt priority is low, and 8279 keyboard interrupt priority is low.3.2 Data collection and calculation program compilationIn the data acquisition and calculation program, the data acquisition and storage are mainly realized, and the data fusion technology based on the function chain neural network is used to linearize the data and perform temperature compensation.The program mainly includes the following parts:(1) String conversion. This part of the program includes functions such as data comparison, binary to string and string to hexadecimal. By calling this program in the following programs, table lookup, data comparison and measurement data storage are realized.(2) Data collection. Store the collected period values, call the pressure calculation program to solve the pressure, and convert the calculation results into strings and store them in the data memory.(3) Calculate the pressure according to the fitting formula. Substitute the obtained cycle and temperature values into the formula calculation, and realize the nonlinear correction and temperature compensation of the pressure at the same time.(4) Look up the table to calculate the temperature. The temperature value of the sensor during measurement is calculated according to the look-up table method.(5) Solve the height, Mach number, vacuum number, etc. according to the pressure. Get the pressure value Pt, and then solve other atmospheric parameters according to the Pt value: barometric altitude H, true air velocity Vt, indicated air velocity Vi, Mach number M, indicated Mach number Mi, and ascending and descending speed H, etc.(6) Sensor calibration. The user only needs to have a pressure reference with an accuracy higher than 0.02% to perform regular calibration on the equipment. The equipment provides sensor linearity and nonlinear correction functions. The user only needs to input 10, 50, 150, 200, 250, 300 at different temperatures , 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1025, 1045, 1070 A total of 22 pressure values, the sensor can be nonlinearly corrected.The above are the details of the design technology of the single-chip microcomputer-based air pressure detection system introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.