Detailed information about 51 microcontroller pins

Publisher:Delightful789Latest update time:2023-06-25 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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


Reference address:Detailed information about 51 microcontroller pins

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
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号