A single-chip microcomputer integrates the main components of a microcomputer, such as the CPU, memory, and input/output interface, on a very large-scale integrated circuit chip.
It consists of a CPU system, program memory, data memory, various I/O ports, and basic functional units (timers/counters, etc.).
1. CPU system
The CPU system includes CPU, clock system, reset, and bus (BUS, the common channel for signals) control logic.
(1) CPU
The CPU in a single-chip microcomputer is different from the CPU in a microcomputer. Its characteristics are that it is control-oriented, embedded system-oriented, and single-chip-oriented.
(2) Clock system
The clock system is used to generate the clock signal required for the operation of the single-chip microcomputer. It must meet the clock requirements of the CPU and each unit circuit in the single-chip microcomputer. The operating frequency of the clock oscillator is generally 1.2~12MHz.
(3) Reset circuit
The reset circuit should meet the requirements of power-on reset and signal-controlled reset.
(4) Bus control logic
The bus control logic should meet the CPU's control requirements for the internal bus and external bus.
2. Program memory
Program memory is a kind of read-only memory ROM (Read Only Memory), which is used to solidify the application program of the microcontroller and some table constants. Microcontroller manufacturers form different types of microcontroller structures according to the different structures of the program memory inside the microcontroller, including:
(1) Mask ROM type (2) EPROM type (3) ROM less type (4) OTP ROM (5) Flash ROM (MTP ROM) type
The first three types of program memory microcontrollers are early products, and EPROM and ROM Less types are rarely used nowadays.
3. Data memory RAM
RAM is a readable and writable memory, also called random access memory. In addition to the working registers, bit flags and stack areas, all units inside the microcontroller RAM can be used as data buffers to store input data or calculation results.
Since the microcontroller is mainly used for measurement and control systems, the data storage capacity inside the microcontroller is relatively small, usually no more than 256 bytes, and static random access memory SRAM (Static Random Access Memory) is used.
4. Various I/O ports
I/O ports are the input and output interfaces of computers (T stands for input and O stands for output). The I/O ports in a microcontroller are the auxiliary input/output pins of the chip. These I/O ports can be divided into the following types:
(1) Bus input/output port
(2) User I/O port: used by the user for input/output control of external circuits.
(3) Input/output ports of the internal functions of the microcontroller, such as the count input of the timer/counter, the external interrupt source input, etc.
In order to reduce the number of microcontroller pins, the I/O ports generally have duplex functions. For example, when the external bus is not in use, the bus port can be given to the user as an auxiliary input/auxiliary output port.
From the structure of I/O port, it can be divided into parallel I/O port, that is, multiple bits of data are output or input together, this form of data transmission is fast but uses more pins. Another type of I/O port is called serial I/O port, that is, the data transmission is sequentially output or input, this form can greatly reduce the number of I/O port pins, but the data transmission is slower.
5. Basic functional units
Basic functional units are some circuits set up to meet the measurement and control functions of the single-chip microcomputer. They are some basic circuits used to improve and expand the functions of the computer, such as timers/counters, interrupt systems, etc. Timers/counters play a very important role in practical applications, such as precise timing or counting external events.
|