Assembly language is a symbolic language that uses mnemonics to represent machine instructions. It is the language closest to machine code. Its main advantages are that it takes up less resources and has high program execution efficiency. However, different CPUs may have different assembly languages, so it is not easy to port.
For the 8-bit RISC architecture MCU that is currently commonly used, its internal ROM, RAM, STACK and other resources are limited. If it is written in C language, a C language instruction will become many machine codes after compilation, which may easily cause problems such as insufficient ROM space and stack overflow. Moreover, some microcontroller manufacturers may not be able to provide C compilers. In assembly language, one instruction corresponds to one machine code, and it is very clear what action is performed at each step. In addition, the program size and stack call status are easy to control, and debugging is also more convenient. Therefore, in the development of microcontrollers with fewer resources, we still recommend the use of assembly language.
C language is a compiled programming language that takes into account the characteristics of multiple high-level languages and has the functions of assembly language. C language has rich library functions, fast computing speed, high compilation efficiency, good portability, and can directly control system hardware. C language is a structured programming language, which supports the top-down structured programming technology widely used in current programming. In addition, C language programs have a complete module program structure, which provides a strong guarantee for the use of modular programming methods in software development. Therefore, using C language for programming has become a mainstream in software development. Using C language to write target system software will greatly shorten the development cycle, and significantly increase the readability of the software, making it easier to improve and expand, thereby developing a larger scale and more complete system.
In summary, using C language for single-chip microcomputer programming is an inevitable trend in single-chip microcomputer development and application. Therefore, as a single-chip microcomputer developer who is comprehensive in technology and involved in large-scale software system development, it is best to master basic C language programming.
Previous article:What is the addressing of a single-chip microcomputer (with examples)
Next article:What are the characteristics of C language and assembly language in microcontroller development?
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- RT-Thread uses printf or rt_kprintf function for serial port printing
- IoT Basics: Important Information for Today and Tomorrow
- [Erha Image Recognition Artificial Intelligence Vision Sensor] 3. General Settings and Face Recognition
- Prize-winning quiz: Find the "know-it-all" expert on Intel Vision Accelerated Design online
- Disassembly of GM520 differential pressure gauge
- I've seen wire winding, but I've never seen one so creative!
- Please recommend a domestically produced isolated 485 chip with a single power supply
- 【ufun learning】Part 4: Serial port printing output
- About MOS tube recommendation
- How to keep the AD schematic synchronized with the PCB after it is split?