Design steps of single chip microcomputer application system

Publisher:Amy啊111111Latest update time:2015-04-23 Source: diangonKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1. Equipment preparation
① Necessary equipment: computer, simulator, programmer, digital multimeter, electric soldering iron, pliers, screwdriver and other tools. The simulator is used to debug the program. Different single-chip computers need different simulators. For example, the 51 series single-chip computer needs the 51 series single-chip simulator. There are general simulators and special simulators. The general simulator is suitable for multiple series and has a high price; the special simulator is only suitable for a certain series and has a low price. The programmer is used to solidify (or write) the chip. The programmer is also divided into simple type and general type. The difference between the two is mainly the number of solidified chips. The former has a small number and the latter has a large number. The price difference is also very large. Beginners can choose a simple programmer that can solidify the chip they use. Whether it is simulation or programming, it needs to be connected to the computer, and the simulation or programming is done through the computer.
② Other equipment: dual-trace oscilloscope, multi-function signal generator, DC regulated power supply, etc.
2. Overall design
The overall design is divided into two types: product structural design (or mechanical design) and electrical design.
The structural design mainly considers the shape, volume, and panel size of the product; the layout of buttons, indicator lights, and displays on the panel; the size of the instrument backplane, how to introduce signal lines and power lines on the backplane; how to arrange the wiring terminals, etc.
Electrical design includes software and hardware design, the selection of single-chip microcomputers, the selection of peripheral circuit devices, the selection of programming languages, etc. In the end, the structural block diagram of the single-chip microcomputer application system should be drawn, and the block diagram of the selected single-chip microcomputer and the block diagram of each functional block should be included in the structural block diagram.
3. Hardware design
Hardware design mainly refers to the design of hardware circuits that can realize the required functions. Draw the circuit schematic diagram based on the system structural block diagram designed in the previous overall design, and then draw the printed circuit board diagram in combination with the product structure and process design. When designing the hardware of the single-chip microcomputer application system, the following should be considered:
① The specific circuit involved in the hardware design should first be a ready-made circuit that you have used in other projects before. You know best whether this circuit is good or not. Secondly, learn from other people's circuits. Note that when using other people's circuits, you must debug them first and cannot put them directly in the circuit.
② The hardware circuit adopts modular design. For example, a single-chip microcomputer application system has a single-chip microcomputer minimum system, a clock circuit, an A/D conversion circuit, an LED or LCD display circuit, a serial communication circuit, etc., which can be designed as independent modules. The advantage of modular design is that it can be "divide and conquer". If each module is debugged, the hardware of the entire system is basically debugged, and the debugged modules can be easily transplanted to other single-chip microcomputer application systems.
③ Choose components with sufficient market supply and common use, especially integrated circuit chips. Exclusive products cannot be selected. Exclusive products are firstly too expensive, and secondly, once out of stock, there is nothing to do.
④ When designing hardware circuits, the driving capabilities of each part of the system must be fully considered. If the driving capabilities are insufficient, the system cannot work reliably or cannot work at all.
⑤ When drawing the circuit schematic, the structural design and process design of the product must be fully considered. It must be completed before making the printed circuit board diagram, otherwise the number, size and shape of the printed circuit board cannot be determined.
⑥ There are many popular tools for drawing circuit diagrams, among which Protel 99SE/Protel DXP is the best and most commonly used. However, when using Protel 99SE/Protel DXP to draw printed circuit boards, the problem of electromagnetic interference must be fully considered.
⑦ When using Protel 99SE/Protel DXP to draw printed circuit board diagrams, there are several minimum size values ​​that must be paid attention to: the line width should generally be greater than or equal to 15mil; the via diameter should not be less than 30mil; the line spacing (the minimum spacing between two adjacent lines) should not be less than 10 mil. Mil is the imperial unit of length, which is one thousandth of 1in (1in=0.0254m).
⑧ When drawing printed circuit board diagrams, the width and spacing of most component pins are standard, but some multi-pin connectors are difficult to draw. Even if they are measured with a vernier caliper, sometimes they cannot be plugged in. The solution is: after drawing the PCB diagram, print a copy at a ratio of 1:1, then find a relatively flat piece of plastic foam, paste the PCB diagram on it, and then insert the components to see if it fits. If not, modify it again until it fits.
4. Hardware debugging
Hardware debugging is performed on the PCB with components soldered on. The steps are as follows:
① Check the PCB. Before installing and soldering the components, check with your eyes and a multimeter whether there are short circuits and open circuits on the PCB.
② Pay attention to the direction of the components during installation. Keep the PCB surface clean during soldering, and pay attention to whether there are leaks, wrong soldering, or continuous soldering.
③ Power on without load. Check whether the power output is correct, whether the power and ground potentials on the microcontroller pins are correct, and whether the power and ground potentials on other integrated chips are correct.
④ Power on. After the no-load power-on check is correct, you can insert each chip into each socket, officially power on, and then check whether the potentials of each point are correct. If the potential is not right or a component is hot or even smoking, turn off the power immediately and find the cause until the fault is eliminated before turning on the power again.
⑤ Simulation debugging. The emulator of the microcontroller is a special tool to help designers debug the application system. Without power, first connect the emulator to the parallel port, USB port or serial port of the PC, and then insert the emulator head into the dedicated socket of the microcontroller application system. In this way, the microcontroller, emulator and PC constitute an online development system.
5. Software design
In software design, the following points should be noted:
① Similar to hardware design, the program involved in software design to realize a certain function is first of all a ready-made program module that has been used in other projects before; secondly, learn from other people's program modules, the specific way is to search on the Internet, including hardware circuits and source code, and also must be debugged before use.
② Software design should also be modular. The advantage of modularization is that it is easy to test, modify and expand. Debugging work can be carried out in parallel, and several debuggers can debug different modules at the same time.
③ Reasonably allocate memory resources, reserve enough RAM area for the stack, and do not let the stack overflow.
④ Use anti-electromagnetic interference measures in software, such as using software filtering when sampling; software cooperation is also required when using the watchdog circuit. 
⑤ To improve the readability of the program, add necessary comments to the program module.
⑥ Choice of programming language. Assembly language is the language used in the early development of single-chip microcomputers. Due to its shortcomings such as poor readability, portability, and maintainability, it has gradually been replaced by C language. C language is a concise and efficient high-level language with good readability, high reliability, rich function library, fast computing speed, high compilation efficiency, good portability, etc., and can directly realize the control of hardware. Therefore, it has gradually become the mainstream programming language in the development of single-chip microcomputer application systems.
6. Software debugging
Software debugging is related to the selected software structure and programming technology. If modular programming technology is used, after adjusting each module one by one, the system program will be debugged.
For modular structure programs, each subroutine should be debugged separately. When debugging a subroutine, it must meet the on-site environment, that is, the entry and exit conditions. The means of debugging can be single-step operation mode and breakpoint operation mode. By checking the site of the user system CPU, the content of RAM and the status of the I/O port, the program execution result can be detected to see whether it meets the design requirements. Through detection, dead loop errors, machine code errors and transfer address errors in the program can be found. At the same time, hardware failures, software algorithms and hardware design errors in the user system can also be found. During the debugging process, the software and hardware of the user system are constantly adjusted, and program modules are gradually passed.
After each independent program module is debugged, the functional blocks can be combined to conduct comprehensive debugging of the overall program. If a fault occurs at this stage, it can be considered whether each subroutine destroys the site during operation, whether the buffer unit conflicts, whether there is a design error in the establishment and clearing of the zero position, whether the stack area overflows, whether the status of the input device is normal, etc. (Copyright http://www.diangon.com/) If the user system is running under the monitoring program of the development system, it is also necessary to consider whether the user buffer unit conflicts with the working unit of the monitoring program.
After single-step and breakpoint debugging, continuous debugging should also be performed. This is because single-step operation can only verify whether the program is correct or not, but cannot determine the timing accuracy, real-time response of the CPU and other issues. After all are completed, it should be run repeatedly for many times. In addition to observing the stability, it is also necessary to observe whether the operation of the user system meets the original design requirements and whether the arranged user operations are reasonable. If necessary, appropriate corrections should be made.
7. Curing
After the target program is debugged by the emulator, it can be cured. The machine code generated by the source program after compilation and connection has two formats (*.HEX format or *.BIN format) and can be cured. There are two methods of curing: one is the curing function equipped with the emulator; the other is a dedicated programmer. There are many kinds of dedicated programmers, which are divided into simple and general programmers. The former can cure a small number of chips, while the latter can cure a large number of chips.
8. Run test
The run test includes functional testing and reliability testing. Functional testing is to check whether each function is realized one by one according to the design task book. Reliability testing, also known as "baking machine", has an uncertain "baking machine" time, which can be 48 hours, 72 hours or longer. The purpose is to test whether the system can operate normally within the specified time. In addition to testing the running time, high temperature and low temperature tests and anti-electromagnetic interference tests are also required. When both the functional test and the reliability test are passed, the microcontroller application system is successfully developed. 
Keywords:MCU Reference address:Design steps of single chip microcomputer application system

Previous article:The main interference forms of single chip microcomputer application system
Next article:Single chip microcomputer application system and its composition and classification

Recommended ReadingLatest update time:2024-11-17 00:00

Four working modes of 51 single-chip microcomputer timer/counter T0|T1
• When selecting mode 0, mode 1, mode 2, the working conditions of T0|T1 are the same • When mode 3 is selected, the operation of T0|T1 is different Mode 0: 13-bit timer/counter, high 8 bits of TH0, low 5 bits of TL0 Mode 1: 16-bit timer/counter, high 8 bits of TH0, low 8 bits of TL0 Mode 2: 8-bit counter with a
[Microcontroller]
Four working modes of 51 single-chip microcomputer timer/counter T0|T1
Design of Shared Controller Based on Single Chip Microcomputer
With the continuous development of electronic equipment technology and the continuous increase of product functions, in general, product functions usually require the cooperation of multiple computers to achieve. On the other hand, in the process of product design, in order to improve the reliability of products, co
[Microcontroller]
Design of Shared Controller Based on Single Chip Microcomputer
51 MCU Programming Section 5: Keyboard Driver
Section 5: Keyboard Driver It means providing some functions for tasks to call, get key information, or read key values. Define a header file KEY.H to describe the available functions, as follows: Code 1. #ifndef _KEY_H_ //Prevent repeated references to the document. If the symbol _KEY_H_ has not been defined,
[Microcontroller]
MCU reset types and descriptions
During the execution of user applications, special requirements may be required to implement a soft reset of the microcontroller system (one of the hot restarts). Since the traditional 8051 microcontroller does not support this function in hardware, users must use software simulation to implement it, which is troubleso
[Microcontroller]
A method to realize DSP online debugging using microcontroller
Normally, when developing and debugging DSP systems, an SRAM chip must be equipped as an off-chip program RAM. When debugging, use the corresponding simulation board to download the program into SRAM, so that the DSP system implements the corresponding operation by running the program code in SRAM. It can be seen that
[Embedded]
The 4 I/O ports of the MCS-51 microcontroller
The four I/O ports of the 8051 microcontroller are basically the same in structure, but each has its own characteristics. These four ports are all 8-bit bidirectional ports, each of which includes a latch, an output driver and an input buffer. In a system without external expansion memory, each of these four ports can
[Microcontroller]
MCU Basics (VII): Serial Communication Concept and Working Principle
Basic concepts of communication According to the direction of information transmission, communication is divided into three types: simplex, half-duplex, and full-duplex. Simplex: one end sends, one end receives Half-duplex: Both parties can send and receive, but at the same time, the data transmission direction is s
[Microcontroller]
MCU Basics (VII): Serial Communication Concept and Working Principle
Design based on ARM+MCU+CPLD/FPGA
0 Introduction Traditional data acquisition systems generally use single-chip microcomputers, and most systems complete data transmission through the PCI bus. Its disadvantages are poor mathematical computing capabilities; limited by the number of computer slots and interrupt resources; inconvenient to conn
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号