Transcript for:
Understanding Integrated Circuits and Microcontrollers

In the household appliances and electronic devices used in our daily life, there are various integrated circuit boards. The parts on the circuit boards enable electronic products to have multiple functions. Among the integrated circuit boards, the most important part is the microcontroller, which is an integrated circuit chip. It uses VLSI technology to integrate the Central Processing Unit, CPU, with data processing capabilities, memory. and multiple I.O. interfaces. In 1971, the world's first computer microprocessor, with a model number of 4004, was launched by Intel Corporation of the United States. At the same time, the technology of microcontroller has gradually developed and been widely used. Microcontroller is also called single-chip microcomputer, which can be understood as a simplified version of the computer. The microcontroller is mainly composed of three parts. namely CPU, memory and I.O. interfaces. What are the functions of these three parts? The main function of the CPU is calculation and control. The calculation is to perform various mathematical calculations. The control is to control the input and output according to the program code. Then, where is the program code stored? The program code is stored in the memory. The memory in the microcontroller is generally divided into two types. One is the read-only memory ROM. The other is the Random Access Memory RAM. The read-only memory is used to store the programs compiled by the user. When the microcontroller is running, the CPU reads instructions directly from read-only memory. Temporary data generated during instruction execution, such as variables, are placed in Random Access Memory RAM. So it can be understood as, read-only memory ROM is used to store programs, Random Access Memory RAM is used to store data. IOS and input and output interfaces. Mainly used for communication between external circuits and CPU. So what is the specific workflow of these parts? This is a microcontroller, which contains CPU, read-only memory ROM, random access memory RAM and IOS input and output interfaces. Firstly, upload the program to the read-only memory of the microcontroller through the programmer. Then the program enters the CPU one by one. and executes in the CPU. For example, the CPU can follow the instructions of the program and output a high level through the I-O interface to light up the external light emitting diode. If the instruction corresponding to the program is an arithmetic instruction, the CPU executes during the calculation process. If a variable is generated during the calculation process, the generated variable will be stored in the random access memory RAM. Because there is no place for storing variables, inside the CPU. The I-interface is the interface between the microcontroller and the outside world and can be used as a data interface such as read and write external memory. It can also be used as a control interface to output control commands such as motor control, relay control, etc. It can also be used as a human-computer interaction interface such as screen display, keyboard input, etc. Each module in the microcontroller works synchronously according to a unified beat, which comes from the clock of the microcontroller. The clock signal is a high and low level interval signal. The microcontroller can only execute one instruction in a clock cycle, and the time unit of the microcontroller is an integer multiple of the clock cycle. The clock signal comes from the oscillator, which is divided into internal or C-oscillation oscillator, and external crystal oscillator. due to the relatively large error of the internal RC oscillator, generally use an external crystal oscillator and incorporate with the crystal oscillator circuit to generate a clock signal of a certain frequency after power on. Each component of the microcontroller must work in coordination according to the clock signal. The length of the clock cycle affects the speed of the microcontroller. So the crystal oscillation frequency is also called the main frequency of the microcontroller. The higher the main frequency, the higher the performance of the microcontroller. The frequency of the microcontroller is generally at the level of 100 MHz, while the frequency of the computer CPU is generally at the level of GHz. Generally speaking, a microcontroller is an integrated circuit chip. It uses VLSI technology to integrate the central processing unit CPU, memory and various i.o. interfaces with data processing capabilities. The main function of the CPU is computing and control. Read-only memory RAM is used to store programs. Random access memory RAM is used to store data. IO interface is an input and output interface. It can be used as data interface, control interface or human-computer interaction interface. Each module in the microcontroller is based on a unified beat working synchronously. This unified beat comes from the clock of the microcontroller. The clock signal is provided by the crystal oscillator. The crystal oscillation frequency is also called the main frequency of the microcontroller. The higher the main frequency, the higher the performance of the microcontroller.