AT89C2051 is a simplified version of the 51 microcontroller. It has simplified the P0 and P2 ports and only has 20 pins. However, it integrates a very practical analog comparator inside, which is especially suitable for developing streamlined 51 application systems. After all, many times we develop simple When building a product, all 32 I/O ports cannot be used. It is more suitable to use AT89C2051. The chip size is smaller, and the minimum operating voltage of AT89C2051 is 2.7V, so it can be used to develop portable products powered by two AA batteries.
This article explains the AT89S51 and AT89C2051 microcontrollers of the 51 series family produced by ATMEL. These two microcontrollers are currently the most commonly used microcontrollers. Among them, AT89S51 is a standard 51 microcontroller. Of course, its functions are more powerful than the early 51 microcontrollers and support ISP in System programming technology, built-in hardware watchdog. . .
1. AT89S51 microcontroller pin introduction
AT89S51 has three packaging methods: PDIP, PLCC, and TQFP. The most common one is the dual-row direct PDIP packaging using 40Pin packaging. The appearance structure is shown in the figure below.
The chip has a total of 40 pins. The pins are arranged in the order of 1, 2, 3, and 4 starting from the column of pins on the left side of the notch on the chip (see the picture on the right). . . 40, there is a concave spot on the top of pin 1 of the chip (see the picture on the right). Among the 40 pins of the microcontroller, there are 2 power supply pins, 2 external crystal oscillator pins, 4 control pins and 32 8-bit programmable I/O pins in 4 groups.
1. Main power pins (2 pins)
VCC (Pin40): power input, connected to +5V power supply
GND (Pin20): Ground wire
2. External crystal oscillator pins (2)
XTAL1 (Pin19): input terminal of the on-chip oscillation circuit
XTAL2 (Pin20): The output terminal of the on-chip oscillation circuit
3. Control pins (4)
RST/VPP (Pin9): Reset pin. A high level on the pin for 2 machine cycles will reset the microcontroller.
ALE/PROG (Pin30): Address latch enable signal
PSEN (Pin29): External memory read strobe signal
EA/VPP (Pin31): Internal and external strobe of the program memory. If connected to a low level, instructions are read from the external program memory. If connected to a high level, instructions are read from the internal program memory.
Actual picture of chip Chip pin function
4. Programmable input/output pins (32 pins)
The AT89S51 microcontroller has 4 groups of 8-bit programmable I/O ports, namely P0, P1, P2, and P3 ports. Each port has 8 bits (8 pins), 32 in total. Each pin can be programmed, such as to control motors, traffic lights, neon lights, etc. When developing products, we use these programmable pins to achieve the functions we want. Use your imagination to realize your dreams. Want it:) Extremely powerful. . .
PO port (Pin39~Pin32): 8-bit bidirectional I/O port line, named P0.0~P0.7
P1 port (Pin1~Pin8): 8-bit quasi-bidirectional I/O port line, named P1.0~P1.7
P2 port (Pin21~Pin28): 8-bit quasi-bidirectional I/O port line, named P2.0~P2.7
P3 port (Pin10~Pin17): 8-bit quasi-bidirectional I/O port line, named P3.0~P3.7
The above is a brief introduction to the pins of the AT89S51 microcontroller. The pins of other 51 series microcontrollers such as 8031, 8051, and 89C51 are compatible with the 89S51, but the function definitions of individual pins are different.
2. AT89C2051 microcontroller pin introduction
AT89C2051 is a 20-pin small package, 2K internal program memory, 15 programmable I/O lines, 16 I/O lines without P0 port and P2 port, and an analog comparator integrated inside. The pin arrangement of AT89C2051 microcontroller is shown in the figure below.
Actual picture of chip Chip pin function
The chip has a total of 20 pins, and the order of the pins is 1, 2, and 3, counting counterclockwise from the column of pins on the left side of the notch on the chip (see the picture above). . . 20. Among the 20 pins of the microcontroller, there are 2 power supply pins, 2 external crystal oscillator pins, 1 reset pin and 15 programmable I/O pins on the P1 and P3 ports.
1. Main power pins (2 pins)
VCC (Pin20): power input, connected to +5V power supply
GND (Pin10): Ground wire
2. External crystal oscillator pins (2)
XTAL1 (Pin5): input terminal of the on-chip oscillation circuit
XTAL2 (Pin4): The output terminal of the on-chip oscillation circuit
3. Control pin (1)
RST/VPP (Pin1): Reset pin. A high level on the pin for 2 machine cycles will reset the microcontroller.
4. Programmable input/output pins (15 pins)
P1 port: 8-bit quasi-bidirectional I/O port line, P1.0~P1.7, 8 lines in total
P3 port: 8-bit quasi-bidirectional I/O port line, P3.0~P3.5, P3.7, 7 lines in total
If you are smart, you will definitely find that the standard 51 microcontroller has 32 programmable I/O lines. After 89C2051 streamlines the 16 I/O lines of P0 and P2, there should be 16 I/O lines. Now there are only 15 Root, where did the other root go? ! As mentioned earlier, AT89C2051 integrates an analog comparator. It is precisely because the integrated analog comparator occupies another lead. The output end of the comparator occupies an I/O port, which is the P3.6 port. The pin P3.6 is not connected, so there is one less I/O port line. When programming, P3.6 can only be used to read the status of the comparator. It cannot be used to drive external indicators and other devices like other I/O ports. However, the analog comparator is very practical and can be used during development. Save yourself the trouble of adding an external comparator. The picture on the right shows the principle of the comparator.
3. Introduction to main performance parameters
AT89S51
·Completely compatible with MCS-51 product command system
·4k bytes in-system programming (ISP) Flash memory
·1000 erase and write cycles
·4.0-5.5V operating voltage range
·Fully static working mode: 0Hz-33MHz
·Three-level program encryption lock
·128×8 bytes internal RAM
·32 programmable I/O lines
·Two 16-bit timers/counters
·6 interrupt sources
·Full-duplex serial UART channel
·Low-power idle and power-down modes
·Interrupt can wake up the system from idle mode
·Watchdog (WDT) and dual data pointers
·Power-off identification and fast programming features
·Flexible in-system programming (ISP byte or page write mode)
AT89C2051
·Completely compatible with MCS-51 product command system
·2k bytes rewritable flash memory
·1000 erase and write cycles
·Operating voltage range of 2.7V-6V
·Fully static operation: 0Hz-24MHz
·Two levels of encrypted program memory
·128×8 bytes internal RAM
·15 programmable I/O lines
·Two l6-bit timers/counters
·6 interrupt sources
·Programmable serial UART channel
·Output port that can directly drive LEDs
·Built-in an analog comparator
·Low-power idle and power-down modes
Previous article:Design of infrared counter based on 51 microcontroller
Next article:Design of insulator pollution level measurement system using AT89C52 and AT89C55
Recommended posts
- iTOP-iMX6 development board-device tree kernel-default file configuration
- Thisdocumentmainlyexplainsthedefaultfileconfigurationofthedevicetreekernel(4.1.15)oftheiTOP-iMX6Q/D/PLUSdevelopmentboard. Herewetaketheqtsystemkernelcompilationofimx6q(similartoimx6dandplus)asanexample,thekerne
- 砂舞的玩笑 Embedded System
- "The Great Chip" Reading Activity 13 Chapter 6 - Early Chinese Semiconductor Industry
- ThankstotheElectronicEngineeringWorldwebsite!ThankstoChinaIndustryandInformationTechnologyPublishingGroup!ThankstotheauthorWangJian!ThankstotheElectronicIndustryPress!ThankstotheElectronicEngineeringWorldForumeewor
- 还没吃饭 Integrated technical exchanges
- Battery Management System BMS Technical Data Transfer
- 1:2:3:4:5:6:7:8:3:Batterypackcurrentdetection;4:Singlecell/batterypackSOCcalculation;5:BatterypackSOHevaluation;6:Chargeanddischargebalancefunction;
- q2512262471 Automotive Electronics
- Guess what development board this is?
- Ijustreceivedadevelopmentboardtoday.Canyouguesswhatkindofdevelopmentboarditis?Whatchipdoesituse?Whatareitsmainfunctions? TheproductfromQuectelshouldsupportsomethingopen,eithernbiotor4G. Cat1,80%i
- dcexpert MicroPython Open Source section
- Very detailed introductory article FPGA_SOPC_starter
- 至芯科技FPGA大牛 FPGA/CPLD
- A Japanese popular science scholar said that he encountered many bottlenecks in mathematics, such as the square root of -1. Solving this problem opened up new fields.
- AJapanesepopularsciencescholarsaidthatheencounteredmanybottlenecksinmathematics.Hesolvedthesebottlenecksandcreatedmanynewfields.Forexample,thesquarerootof-1wassolvedandanewfieldwasopened.Whichpopularscienceboo
- 深圳小花 MCU
- 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...
- How to express the volt-ampere characteristic of a field effect tube? Take an N-channel junction field effect tube as an example to explain the output characteristics of the field effect tube.
- I'm almost driven crazy by AD
- stm32 pwm fails after eight cycles
- DSP code optimization instructions in CCS
- Microsoft's first MP3 player to be shipped this year, 30GB, priced at $299
- Discussion on Configuration of Emergency Stop System
- TI M4 (Cortex M4) MCU DMA Operation
- EEWORLD University - Ultra-low power consumption and secure Simpleink WIFI third generation product new features and Homekit introduction
- [LPC8N04 Review] 4. Detailed explanation of LPC8N04 chip NFC
- Summary of MCU delay methods