Single chip microcomputer, single chip microcomputer. Generally speaking, it is a chip. But it is a special chip because it does not realize a single logical function. It integrates a whole computer system into this chip. This computer system includes an arithmetic unit, a controller, a memory, an input device and an output device.
In fact, the learning of MCU is not much different from the learning of computer, including the learning of arithmetic unit, controller, memory, and input and output devices.
Calculator
The arithmetic unit is composed of arithmetic logic unit (ALU), accumulator, calculator and other components.
Controller
The difficulty of learning lies in the operations involving instructions. The controller consists of a program counter, an instruction register, an instruction decoder, a timing generator and an operation controller.
The development process of the microcontroller:
The development process mentioned here is not the one that starts with task analysis as described in general books. We assume that the hardware has been designed and manufactured, and the next step is to write the software. Before writing the software, we must first determine some constants and addresses. In fact, these constants and addresses have been determined directly or indirectly during the design stage. For example, when the connection design of a device is completed,
Its address is determined. When the function of the device is determined, its control word is also determined. Then use a text editor (such as EDIT, CCED, etc.) to write the software. After writing, use a compiler to compile the source program file and check for errors until there are no syntax errors. Except for very simple programs, the software is generally debugged using a simulator until the program runs normally.
After the program runs correctly, you can write to the chip (solidify the program in the EPROM). After the source program is compiled, a target file with the extension HEX is generated. Generally, programmers can recognize files in this format. You only need to call this file to write to the chip.
Choice of development language
At present, many people do not recognize assembly language. It can be said that mastering the C language microcontroller programming is very important, which can greatly improve the efficiency of development. However, beginners do not need to understand the assembly language of the microcontroller, but they must understand the specific performance and characteristics of the microcontroller, otherwise it will be fatal in the field of microcontrollers. If you do not consider the hardware resources of the microcontroller, using C in KEIL
Programming indiscriminately will only result in problems that cannot be solved! It is safe to say that the best C language MCU engineers are programmers who have come from assembly language, because although the C language of MCU is a high-level language, it is different from VC++ on desktop personal computers. The hardware resources of MCU are not very powerful, unlike the high-level languages such as VC and VB that we use in
Programs are written on desktop PCs. After all, the hardware of desktop computers is very powerful, so there is no need to consider the hardware resources. In addition, although C language is convenient for programming and easy for people to read, its execution efficiency is 10% to 20% lower than that of assembly language. Therefore, which language to use to write programs depends on the specific occasion.
Programming requires the flexible use of assembly language and C language to allow the powerful functions of the microcontroller to be displayed to users with the highest efficiency.
Commonly used microcontroller types
STC MCU
STC's microcontroller is mainly based on the 8051 core. It is a new generation of enhanced microcontroller. The instruction code is fully compatible with the traditional 8051. The speed is 8~12 times faster. It has ADC, 4-way PWM, dual serial ports, a globally unique ID number, good encryption, and strong anti-interference.
PIC microcontroller:
It is a product of MICROCHIP. Its outstanding features are small size, low power consumption, streamlined instruction set, good anti-interference, high reliability, strong analog interface, good code confidentiality, and most chips are compatible with FLASH program memory chips.
EMC microcontroller:
It is a product of Taiwan Elan Corporation. A large part of it is compatible with PIC 8-bit microcontrollers . The resources of compatible products are relatively more than PIC, the price is cheap, and there are many series to choose from, but the anti-interference is poor.
ATMEL MCU (51 MCU):
ATME1's 8-bit microcontrollers include AT89 and AT90 series. The AT89 series is an 8-bit Flash microcontroller, compatible with the 8051 series microcontrollers, with a static clock mode; the AT90 series microcontroller is an enhanced RISC structure, fully static working mode, and built-in online programmable Flash microcontroller, also called AVR microcontroller.
PHLIPIS 51LPC series MCU (51 MCU):
PHILIPS's MCU is based on the 80C51 core, embedded with power-off detection, simulation, and on-chip RC oscillator functions, which enables 51LPC to meet various performance requirements in high-integration, low-cost, and low-power application designs.
HOLTEK MCU:
Taiwan Shengyang Semiconductor's single-chip microcomputers are cheap and have a wide variety of products, but they have poor anti-interference and are suitable for consumer products.
TI's single-chip microcomputer (51 single-chip microcomputer):
Texas Instruments provides two series of general-purpose microcontrollers: TMS370 and MSP430. The TMS370 series microcontroller is an 8-bit CMOS microcontroller with multiple storage modes and multiple peripheral interface modes, suitable for complex real-time control occasions; the MSP430 series microcontroller is an ultra-low power, high-function integrated 16-bit low-power microcontroller, especially suitable for occasions requiring low power consumption.
SONIX MCU:
It is a single chip from Taiwan Songhan Company, most of them are 8-bit machines, some of them are compatible with PIC 8-bit microcontrollers , cheap, with more system clock frequency division options, PMW ADC internal oscillation and internal noise filtering. Disadvantages: RAM space is too small, and anti-interference is better.
Samsung MCU
Samsung MCUs include KS51 and KS57 series 4-bit MCUs, KS86 and KS88 series 8-bit MCUs , KS17 series 16-bit MCUs and KS32 series 32-bit MCUs . Samsung also produces ARM MCUs for ARM , such as the common S344b0. Samsung MCUs have OTP type ISP on-chip programming function. SST MCU
The SST89 series microcontrollers launched by the American SST company are standard 51 series microcontrollers, including SST89E/V52RD2, SST89E/V54RD2, SST89E/V58RD2, SST89E/V554RC, SST89E/V564RD, etc. It is compatible with the 8052 series microcontrollers. It provides system online programming (ISP function). The internal flash can be erased and written more than 10,000 times, and the program storage time can reach 100 years.
There are many excellent MCU manufacturers that are not collected here. Each company has its own characteristics. Everyone chooses MCU according to needs and pursues low prices while fully realizing functions. Of course, this is not the best. In practice, the choice of MCU is closely related to the developer's application habits and development experience.
Microcontrollers and embedded systems:
Embedded systems originate from embedded applications of computers. Early embedded systems were general-purpose computers that were modified and embedded in various electronic systems in object systems, such as ship autopilots and engine monitoring systems. An embedded system is first a computer system, and secondly, it is embedded in an object system to realize data collection and processing required by the object in the object system.
The computer in the embedded system has functions such as processing, status display, and output control. Since it is embedded in the object system, the computer in the embedded system does not have the independent form and function of the computer. The single-chip microcomputer is designed completely according to the requirements of the embedded system, so the single-chip microcomputer is the most typical embedded system. The early single-chip microcomputer was just a computer single chip integration designed according to the requirements of embedded application technology, so the single-chip microcomputer was designed according to the requirements of embedded application technology.
Subsequently, the single-chip microcomputer has continuously enhanced its control function and peripheral interface function to meet the requirements of embedded applications, especially the control function, so the single-chip microcomputer has been renamed as microcontroller unit (MCU) internationally.
Previous article:Input and output devices I/O device summary
Next article:Several addressing modes of single chip microcomputer
- 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
- 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)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- High-performance lossless data compression IP based on LZO
- MSP340F149 card number reading reference routine
- Summary of comprehensive test lists in various regions
- Use CCS to connect to a running C2000 chip
- Answer questions to win prizes | TI Industrial Essentials selection, exquisite content, worth reading!
- A request for help from a newbie
- Wind speed and light irradiance synchronous tester based on MSP430
- Convert gerber file to ad format pcb
- USB Development Encyclopedia (4th Edition)
- 76 Rules for China's Artificial Intelligence