Part 1 Introduction to MCU
MSC-51 microcontroller refers to a microcontroller with 8051 as the core, which was launched by Intel Corporation of the United States in 1980. 80C51 is a typical variety in the MCS-51 series; CMOS process microcontroller products developed by other manufacturers with 8051 as the base core are collectively referred to as the 80C51 series.
Single chip microcomputer: A microprocessor (CPU), memory (ROM and RAM), and I/O interface circuits are integrated on an integrated circuit chip, thus forming a single-chip microcomputer, also called a microcontroller (MCU).
CPU (Central Processing Unit): It consists of operation and control logic, as well as an interrupt system and some external special function registers;
RAM (Random-Access Memory): used to store data that can be read and written, such as intermediate results of calculations, final results, and data to be displayed;
ROM (Read-Only Memory): used to store programs, some raw data and tables;
I/O (input/output) port: Four 8-bit parallel I/O ports, which can be used for both input and output;
T/C (timer/counter): two timers/counters, which can work in both timing mode and counting mode;
There are only two levels in digital circuits: high and low
The microcontroller is TTL level: high +5V low 0V
RS232 level: Computer serial port high -12V low +12V
Therefore, when the computer communicates with the microcontroller, other chips such as max232 and other level conversion chips are needed.
The evaluation characteristics of digital circuits are determined by the two-level system:
Binary logic operations, AND, NOT, and XOR
type of data:
Because the 51 microcontroller is 8-bit, its data type is generally unsigned char.
Part 2 Pin Introduction
1. Power pin: Vcc (pin 40): power supply terminal, connected to +5V power supply.
Vss(Gnd) (pin 20): ground terminal, connected to +5V power supply ground terminal
2. External crystal pins: XTAL1 and XTAL2
The 89C51 has an oscillator and clock generation circuit inside.
XTAL1 (pin 19): On-chip oscillator circuit inverting amplifier input
XTAL2 (pin 18): Output of the inverting amplifier of the on-chip oscillation circuit. When the internal clock is used, a quartz crystal and a fine-tuning capacitor are connected outside the chip to generate the original oscillation pulse signal.
When using an external clock, XTAL1 inputs the external clock pulse signal and XTAL2 is left floating.
3. Control signal pins: RST, ALE, PSEN, EA
RST (pin 9): Reset signal input terminal, high level is valid.
When the high level is maintained for two machine cycles, the reset operation is completed.
ALE/PROG (30 legs) :
Address latch enable output terminal/programming pulse input terminal
Under normal circumstances, it continuously outputs a positive pulse signal of 1/6 of the oscillator frequency.
When accessing off-chip memory:
As the control signal for latching the low 8 bits of the address of port P0.
When programming the ROM on the 8751 chip: it serves as the programming pulse input terminal.
PSEN (pin 29): External program memory read select output signal
When accessing the off-chip ROM, a negative pulse is output as a read ROM strobe.
It is often connected to the output enable terminal (OE) of an off-chip ROM chip as the read select signal of the external ROM.
EA/Vpp (pin 31):
External program memory address enable input/programming voltage input. Normally, when connected to "1", the CPU accesses the 4KB ROM on the chip. When the address exceeds 4KB, it automatically switches to the program in the external ROM. When connected to "0", the CPU only accesses the external ROM. The second function Vpp is the programming voltage input when programming 8051.
4. Input/output port pins P0, P1, P2, P3
Four 8-bit parallel input/output ports, a total of 32 pins. As a general-purpose input/output port
General purpose input/output ports
Quasi-bidirectional port: When inputting, you must first write "1" to the latch. The default startup is initialized to a high level
P0 port (P0.0-P0.7, pins 39-32):
Quasi-bidirectional port with open drain, no internal pull-up resistor, in the resistance state, can not output high and low levels normally, need to connect pull-up resistor (10K) when used as I/O
P1 port (P1.0-P1.7, pins 1-8):
Quasi-bidirectional port with internal pull-up resistor.
P2 port (P2.0-P2.7, pins 21-28):
Quasi-bidirectional port with internal pull-up resistor, similar to P1
P3 port (P3.0-P3.7, pins 10-17):
Quasi-bidirectional port with internal pull-up resistor, similar to P1 when used as I/O, with a second function
The second function of P3 port
Previous article:51 MCU Introduction - Register Function List
Next article:The production process of the minimum system board of 51 single-chip microcomputer
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- Europe's three largest chip giants re-examine their supply chains
- Breaking through the intelligent competition, Changan Automobile opens the "God's perspective"
- The world's first fully digital chassis, looking forward to the debut of the U7 PHEV and EV versions
- Design of automotive LIN communication simulator based on Renesas MCU
- When will solid-state batteries become popular?
- Adding solid-state batteries, CATL wants to continue to be the "King of Ning"
- The agency predicts that my country's public electric vehicle charging piles will reach 3.6 million this year, accounting for nearly 70% of the world
- U.S. senators urge NHTSA to issue new vehicle safety rules
- Giants step up investment, accelerating the application of solid-state batteries
- Guangzhou Auto Show: End-to-end competition accelerates, autonomous driving fully impacts luxury...
- Simple application examples of PIC16F877 peripheral function modules (2)
- Summary of msp430 built-in functions __bic_SR_register(), __delay_cycles(x)
- A brief discussion on electrolytic capacitors for power supply filtering
- Tektronix MDO4000C Series Oscilloscopes on Sale!
- IMX6-A9 series: display function test
- Flathead RVB2601 board ultrasonic ranging
- Gifts redeemed
- Let’s talk about creativity with the contestants
- Real-time system specification, verification and analysis
- PIC mid-range microcontroller series instruction set