I think 51 is better. Because 51 is a relatively standard complex instruction microcontroller. By learning 51, you can have a relatively comprehensive grasp of microcontroller and general CPU knowledge, and achieve the purpose of learning by analogy (Z80 is also good, but unfortunately it is a bit outdated and the development tools are also backward). PIC is a reduced instruction system. Although the machine code is easy to understand, it has great limitations, that is, it will overemphasize the understanding of MicroChip's design ideas. In fact, it is more cost-effective to fully master the microcontroller technology than to master a certain chip (don't be bound by a certain company).
There are many chips similar to PIC, such as AVR, MSP430, Z8, etc. After mastering the structure and instruction system of 51, it is easy to understand the principles of these microcontrollers. On the other hand, it may be necessary to defeat them one by one.
Some more reasons:
As for chips: 51 single-chip microcomputers have very low prices and countless derivative chip series, which cover almost the entire automatic control field from low speed (1MPS) to high speed (30MPS). The price of new chips ranges from 5 yuan to hundreds of yuan, and of course there are a large number of disassembled chips available, which is very convenient for self-study and self-help experiments.
As for development tools: 51 has completely free C language compilers and real-time task systems, and of course there are a large number of evaluation versions (including D version) of the world's top development tools, such as KEIL / Tasking / HITech / Resonance / Franklin (the predecessor of Resonance). Of course, appreciating these grand development environments under the premise of non-profit is undoubtedly helpful for cultivating systematic thinking and meticulous insight.
As far as debugging tools are concerned: the 51 series emulators are the cheapest and have the most variety.
For the PIC series:
The use of a single chip is relatively limited, and it is greatly restricted by the capacity of the machine itself, that is, its versatility is slightly poor. This is also the reason why MicroChip's product line is very long. Of course, this idea of MicroChip is very beneficial to business operations, and it is well integrated with users in terms of cost/performance and mass production.
In addition, the PIC instruction system has certain defects, which are often felt by users, forcing people to fall into the maze of MicroChip chip selection and often hesitate on small issues.
In China: The price of PIC is also a fatal reason that hinders its large-scale application, and the supply variety is not sufficient.
So I think:
First learn general-purpose microcontrollers, that is, the 51 series, and then choose to learn other commonly used microcontrollers based on specific application requirements. Think flexibly and choose flexibly. For example, when a small amount of switching resources is needed, use 89C2051, when simple A/D resources are needed, choose PIC16F873, and when a large number of I/Os are needed, consider 89C52; when low speed is required, try to consider the 51 series, when medium speed is required, consider the PIC series, when high speed is required, consider the 90S AVR series, and when very high speed is required, return to consider the 51-compatible SOC series. When low power consumption is required, consider the MSP430 series.
By the way, the PIC16F74/84 that everyone often talks about can be completely replaced by 89C2051, because the general design plan has a speed margin, and these chips do not have A/D, and their basic structures are similar. In order to use PIC, you have to use pure assembly (compilers are hard to find), while with the 51 series, you can use C code calmly, and there is RTOS support.
Finally, a suggestion: in terms of speed, PIC is not the best. The AVR series has achieved single-cycle instructions and pipeline operations. Under the same power consumption, AVR is much faster than PIC and much cheaper (of course, slightly more expensive than the low-end 51 series). AVR is a new model worthy of attention.
Although C should be used as much as possible when doing projects, in order to use C well, you must first learn assembly. After learning the regular assembly system of the 51 series, it feels really easy to appreciate the assembly environment of each small manufacturer. I have to admire Intel's knowledge and planning ability in CPU technology. It is worthy of being a giant in the computer industry.
Previous article:How to use C code to control LED flashing in PIC microcontroller
Next article:How to switch from assembly to PICC
Recommended ReadingLatest update time:2024-11-16 13:55
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Fundamentals and Applications of Single Chip Microcomputers (Edited by Zhang Liguang and Chen Zhongxiao)
- Single chip microcomputer control technology (Li Shuping, Wang Yan, Zhu Yu, Zhang Xiaoyun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- 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
- [Ready to use] LIS2DTW12 functional demonstration project (STM32G474)
- Code migration process of MSPBoot
- Why is there a 2 in the denominator when calculating the baud rate of the serial port communication of the 51 single-chip microcomputer? I have always wondered why it is divided by 2
- Please share the basic principles of 5G
- Why does the g2553 circuit board omit the external 32.768k crystal oscillator?
- [Xingkong Board Python Programming Learning Main Control Board] LED and light sensor usage experience-automatic light controller implementation
- Wearable network design solutions based on Bluetooth and ZigBee technologies
- [Hua Diao Experience] 06 Building a Xingkong board development environment - Thonny programming
- The most comprehensive collection of circuit postgraduate entrance examination questions and tutorials, a benefit for postgraduate entrance examination candidates!
- GD32E231C_START ADC code evaluation