Design mode and development trend of embedded development

After more than 20 years of development, the variety of single-chip microcomputers has been increasing, the functions have been continuously enhanced, the scope of application has been continuously expanded, and the development time (TIme to Market) has become shorter and shorter. To save time, embedded microprocessors are used in 16-bit and 32-bit applications, and a large number of microcomputer programs can be directly referenced.

In software development, programming in assembly language, high-level language C programming, and programming on the real-time operating system (Real TIme OperaTIng System, RTOS for short).

In hardware design, the use of discrete components and microcomputer interface chips turned to a more integrated design mode - CPU + PLD + AD / DA.

The CPU is the MCU or MPU, and the PLD can program the logic device. Analog-digital hybrid ICs are difficult to design and manufacture. At present, analog circuits such as AD/DA analog-to-digital and digital-to-analog converters also use traditional design methods. The PLD chip can be programmed in ISP (In System Programming), the hardware has been softened and can be modified at any time.

This design pattern has been adopted in the 1999 National Undergraduate Electronic Design Competition and the hardware design of many products. In order to further shorten development time and strengthen management, the platform concept has been gradually introduced into the product design and development process. From random development to platform development mode is the development trend of embedded application software and hardware design and development.

Software development

The number of MCU manufacturers is increasing, and the variety of MCUs is endless. The wide selection of microcontrollers is an important part of today's product development. The instruction system of each MCU series is different, and the assembly mnemonics corresponding to the instruction system are different. The incompatibility of assembly language makes the program programmed on one type of single-chip microcomputer unable to run on another type of single-chip microcomputer. The program must be re-programmed after re-selection of the one-chip computer. Assembly language is difficult to read, difficult to read, and easy to confuse, each assembly programmer has the same feeling. When the program you have compiled is modified over a period of time, you often have to reread a large part of it. After a long period of time, you can find the problem. Modify the assembly source program left by others. If the comment description of the program is not detailed, the idea of ​​the program is not clear, and the subprogram is not used enough, it is better to re-edit it.

Programming with C language is an inevitable trend in the development of single-chip software. C language is a compiled programming language that takes into account the characteristics of many high-level languages ​​and has the function of assembly language. C language has a rich library function, fast computing speed, high compilation efficiency, good portability, and can directly control the system hardware. C language is a structured programming language that supports the top-down structured programming techniques widely used in current programming.

The C language does not have to have a deep understanding of the structure of the microcontroller and the hardware interface. The compiler can automatically complete the allocation of the variable storage unit. The programmer can focus on the design of the application software part, which greatly speeds up the development of the software. The C language can be used to easily transplant the program of the MCU, which is beneficial to the re-selection of the MCU in the product.

Using C language, a general driver function can be programmed for the interface chip commonly used by the single chip microcomputer, and corresponding functions are compiled for commonly used function modules and algorithms. These functions can be integrated into the expert library function for the majority of MCU enthusiasts to use and improve, which can greatly improve the design level of domestic MCU software. The characteristics of C language readability make it easier for everyone to learn from the development experience of their predecessors and improve their software design level.

For the space-time efficiency of C-generated code, in general, the program code length is increased by 20%, and the program execution speed is reduced by about 20%. This is not a major consideration in today's on-chip program memory, which is constantly expanding and the crystal frequency is increasing.

Moreover, this is a comparison with the excellent assembly programmer code. Of course, the occasion of very important attention to code efficiency can be based on C language, supplemented by assembly language. Assembly language masters that as long as you can read the program, you can optimize the program in a time-critical module. In terms of portability, the M language of the MCU complies with the ANSI C standard. The difference is mainly related to the different configurations and uses of on-chip resources. This can be achieved by using a small number of header files and a small amount of processing.

With the improvement of the development level of domestic MCU development tools, the current MCU emulator generally supports the debugging of C language programs, which provides convenient conditions for the use of C language for MCU programming. The C language of the MCU is much better than the C language of the microcomputer. It does not have the use of files related to the C language of the microcomputer, nor does it have to master the format requirements related to standard input and output devices.

Beijing University of Aeronautics and Astronautics Press published "C-language application programming" (revised edition) textbook is designed for people without C-based, a large number of examples can guide you into the C-computer era. Embedded microprocessors are programmed in C, C++, and even JAVA languages, and RTOS is commonly used.

The use of RTOS in embedded applications is due to the fact that embedded applications are typically computer real-time systems with two important features: real-time and reliability. Real-time standards are often measured by the "system response time", which is how long the system can respond to an event when an external event occurs. RTOS is divided into real-time and weak real-time. Strong real-time RTOS is used in situations where time requirements are strict. The reliability standard common system average fault-free running time, that is, the average time between failures MTBF.

An operating system (OS) is a collection of computer programs that effectively control and manage the hardware and software resources of a computer, ie, reasonably schedule resources and provide a convenient application interface for the user. It provides an operating environment for application support software, which provides a powerful and easy-to-use development environment for program developers. The predecessor of the OS is the monitoring program, similar to the monitoring program of the microcontroller emulator.

The RTOS is multi-tasking. Each user's application can be designed into multiple different tasks. These tasks can be executed concurrently, improving system throughput and making more efficient use of system resources. Commonly used task scheduling algorithms are: priority plus polling, non-preemptive priority scheduling, and scheduling algorithms based on priority preemption. The communication and synchronization mechanism between tasks is: mailbox, queue, semaphore, event flag. When dividing tasks, there should be as little communication as possible between tasks, which simplifies the design.

Task-based design is scalable, manageable, and greatly enhances system reliability. The RTOS provides the user with various system calls. Interrupts, time bases, and timing management are all done by the RTOS. Programming with RTOS can significantly reduce program development time. RTOS can be tailored and ported for a variety of hardware environments and can be embedded into applications with applications.

With the advent of the post-PC era, Microsoft Venus plans to launch Windows CE, and our son-in-law plans to launch the Hopen real-time multitasking operating system with independent copyright. The "3C" combined information appliance came out, and the RTOS caused great concern in the domestic industry. Domestically, RTOSs such as pSOS, VRTX, VxWorks, QNX, Nucleus, and CMX and RTXC are suitable for RTOS with source code.

RTLinux and μCOS, which are free to expose the kernel, are also hotspots. Tsinghua University Press published "Industrial Control Computer Real-Time Operating System". The internationally renowned monograph "micro C/OS-ii The Real TIme Kernel" on μCOS will soon be translated and published in China. RTOS will be more deeply rooted in people's minds, embedded application software development from assembly, C to RTOS development.

hardware design

A single-chip microcomputer, that is, a chip is a computer, which represents the ideal of computer miniaturization. With the development of VHSIC (Very High Speed ​​Integrated Circuit), the design and manufacture of ASIC (System On a Chip) has become or has become a reality.

The microcontroller and SOC are the products of a highly integrated hardware design. High integration increases system reliability, reduces size and reduces costs. The integration of integrated circuit products still maintains a growth rate of doubling every 18 months (Moore's Law), and the life cycle of products is shrinking. Therefore, it is urgent to increase the design speed of ASIC chips. The most important of these is to reuse the existing design results as much as possible, using functional blocks with intellectual property, namely the Intellectual Property Core.

Therefore, we must pay attention to the development and reuse of IP cores. The electronic design automation (EDA) tool was used in the design method, and the hardware design was implemented using VHDL and Verilog hardware description language HDL (Hardware Description Language). VHDL supports behavioral level descriptions, and has IEEE 87 and IEEE 93 standards. Design efficiency is significantly higher than Verilog and is more popular. From the point of view of integrated circuits, the single-chip microcomputer is an IP core, and the commonly used interface chips 8255, 8250, 8279, etc. also have IP cores with similar functions. The 8051 MCU has received support from many manufacturers such as Philips and Atmel, as well as the exchange and transfer of its IP core. Programmable logic devices with CPUs have been included in the production planning of integrated circuit manufacturers. Analog-digital hybrid ICs also have design and manufacturing difficulties.

24V Power Battery

24V Power Battery,Lithium Pack Charger,Lithium Battery Technology,Lithium Polymere Battery

Sichuan Liwang New Energy Technology Co. , https://www.myliwang.com