01. What are the advantages and disadvantages of C language and assembly language when developing microcontrollers?
Assembly language is a symbolic language that uses literal 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, the assembly language of different CPUs may be different, so it is not easy to transplant.
C language is a structured high-level language. Its advantages are good readability and easy transplantation. It is a commonly used computer language. The disadvantage is that it takes up more resources and the execution efficiency is not as high as assembly.
For the currently commonly used RISC architecture 8-bit MCU, its internal ROM, RAM, STACK and other resources are limited. If written in C language, a C language instruction will become many machine codes after compilation, and ROM will easily appear. Issues such as insufficient 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. It is clear what action is performed at each step, and the program size and stack call situation are easy to control, making debugging more convenient. Therefore, in the development of microcontrollers with fewer resources, it is better to use assembly language.
02. C or assembly language can be used in microcontrollers, but can C++?
In the development of microcontrollers, assembly and C are mainly used, and C++ is not used.
03. To engage in microcontroller development, do you have to know C?
Assembly language is a symbolic language that uses literal 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, the assembly language of different CPUs may be different, so it is not easy to transplant.
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 operation 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 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, significantly increase the readability of the software, and facilitate improvement and expansion, thereby developing a system with larger scale and more complete performance.
To sum up, using C language for microcontroller programming is an inevitable trend in the development and application of microcontrollers. Therefore, as a microcontroller developer with comprehensive skills and involved in the development of larger-scale software systems, it is best to master basic C language programming.
04. When developing a more complex project with a short development time, is it better to use C or assembly?
For complex projects with tight development time, C language can be used, but the prerequisite is that you are very familiar with the C language and C compiler of the MCU system. Pay special attention to the data types and algorithms that the C compilation system can support. Although C language is the most common high-level language, different MCU manufacturers have different C language compilation systems, especially in the operation of some special function modules. If you don't understand these features, it will be troublesome to debug, and in the end it may not be as fast as using assembly.
05. Where can I find textbooks on 8088 and 196 chip microcontrollers?
Regarding the textbook in this area, one commonly used in universities is "IBM-PC Assembly Language Programming" published by Tsinghua University Press, which can be found online and in bookstores. In addition, you can also search for many other textbooks on the Internet, such as: "Microcomputer Principles and Assembly Language Tutorial" (edited by Yang Yanshuang, Zhang Xiaodong, etc.) and "16/32-bit Microcomputer Principles, Assembly Language and Interface Technology" (Author: Zhong Xiaojie, Chen Tao, Machinery Industry Publishing House Publishing House), etc., you can find them in larger science and technology bookstores or order them directly online.
06. Should beginners learn C or assembly first?
For beginners of microcontrollers, they should start with assembly. Because assembly language is the language closest to machine code, it can deepen beginners' understanding of the various functional modules of the microcontroller, thereby laying a solid foundation.
07. A junior in college has learned electronic circuits, digital logic, assembly and interfaces, and C language, but always feels confused and seems to know nothing. What should I do?
The university process is a theoretical process with relatively few opportunities for practice, which often results in a disconnect between theory and practice. This is a common problem in the domestic university education system, but students must not aim too high. Generally, you will be exposed to some professional courses starting from your junior year. Electronics-related majors will offer related microcontroller application courses and simple experimental projects. Then you must fully seize the opportunity of experimental classes and practice more practical machine operations. You can usually look at relevant electronic technology magazine websites to see other people's development experience, hardware design solutions and other people's software design experience. If possible, you can also participate in some electronic design competitions. Taking this opportunity for 2-3 people to work together to build a complete system will be more helpful. At the graduation project stage of your senior year, you can also choose relevant topics to do some practical cases to gain experience. Whatever you do, there is a process of accumulation of experience, step by step.
08. As a student, how to learn microcontroller well?
To learn microcontroller well, the most important thing is to practice and gain experience in practice. For school students, there will indeed be fewer practical opportunities, but if there is a chance, you can choose relevant topics for graduation internships, so that you can be exposed to actual projects. And if the principle of microcontroller and microcomputer is a main course, I believe the school will arrange more opportunities for practical computer use. If you are able, you can find some related part-time jobs, which will be more helpful. Moreover, the development and application of microcontrollers require the combination of software and hardware, so you can't just be satisfied with perfect programming skills. You should also pay attention to the accumulation of hardware knowledge, visit more electronic forum websites, and buy some related magazines.
09. How can I become a master of microcontrollers?
To become a master of microcontrollers, you should practice more and always pay attention to the development trends of microcontrollers; you should often visit related websites, where you can find a lot of useful information.
10. How long can 8-bit computers last?
At present, the main focus of MCU products is still in the 8-bit field, which is mainly used in six major markets: automotive applications, consumer electronics, computers and PC peripherals, telecommunications and communications, office automation, and industrial control. Among them, the automotive market is mostly in Europe and the United States. , while the Asia-Pacific region is dominated by consumer electronics, with large quantities and low unit prices as the mainstream products. Currently, there is a considerable price difference between 16-bit MCUs and 8-bit products, and new application areas are still being developed, at least for now. There is still a place for 8-bit MCUs.
Previous article:Microcontroller study notes, three steps to teach you
Next article:Children's shoes, let's talk about the learning methods of microcontroller programming technology.
- 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
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- RISC-V MCU Development (VIII): Project Management
- Infrared remote control
- Job Opportunity Recommendation - Product Development Engineer (Relay)
- Differences between SMBus and I2C
- DSP Image Data Flow Design
- [AT-START-F425 Review] GPIO control LCD12864 display + USART data transmission and reception
- [2022 Digi-Key Innovation Design Competition] If you don’t have enough memory, don’t just do it recklessly
- Yole's forecast for the RF market
- HyperLynx High-Speed Circuit Design and Simulation (I) Transmission Line Impedance and Power Supply Impedance Equal Reflection Experiment
- What is the 3-time initialization self-learning process of subway doors and elevator doors? What kind of technology is it and what aspects should be learned?