AT89S51 and AT89C2051 microcontroller pin introduction

Publisher:DelightWish123Latest update time:2016-09-30 Source: eefocusKeywords:AT89S51  AT89C2051 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 removed the P0 and P2 ports and has only 20 pins. However, it integrates a very practical analog comparator, which is particularly suitable for developing simplified 51 application systems. After all, many times when we develop simple products, we cannot use all 32 I/O ports. It is more appropriate to use AT89C2051, which has a smaller chip size and a minimum operating voltage of 2.7V. Therefore, it can be used to develop portable products powered by two No. 5 batteries.

  This article uses two MCUs, AT89S51 and AT89C2051, from the 51 series family produced by ATMEL, as examples. These two MCUs are currently the most commonly used MCUs. The AT89S51 is a standard 51 MCU, but of course it is more powerful than the earlier 51 MCUs, supports ISP in-system programming technology, and has a built-in hardware watchdog. . .       

1. Introduction to AT89S51 microcontroller pins
  AT89S51 has three packaging methods: PDIP, PLCC, and TQFP. The most common one is the dual-row direct PDIP package with 40 pins. The appearance structure is shown in the figure below.AT89S51 and AT89C205151 MCU Pin Introduction - Fly with Dreams - Fly with DreamsAT89S51 and AT89C205151 MCU Pin Introduction - Fly with Dreams - Fly with Dreams

  The chip has 40 pins in total. The pins are arranged in the order of 1, 2, 3, 4, and 40 from the left column of pins near the chip notch (see the right picture). Among the 40 pins of the microcontroller, there are 2 power pins, 2 external crystal oscillator pins, 4 control pins, and 32 4 groups of 8-bit programmable I/O pins.

1. Main power pins (2 pins)
VCC (Pin40): power input, connected to +5V power
GND (Pin20): ground wire

2. External crystal oscillator pins (2 pins)
XTAL1 (Pin19): Input of the internal oscillator circuit
XTAL2 (Pin20): Output of the internal oscillator circuit

3. Control pins (4 pins)
RST/VPP (Pin9): Reset pin. A high level of 2 machine cycles on the pin will reset the microcontroller.
ALE/PROG (Pin30): Address latch enable signal
PSEN (Pin29): External memory read select signal
EA/VPP (Pin31): Internal and external select of program memory. If it is connected to a low level, instructions are read from the external program memory. If it is connected to a high level, instructions are read from the internal program memory.   
Actual chip picture 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. Each port has 8 bits (8 pins), for a total of 32 pins. 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. Give full play to your imagination and achieve what you want:) It is 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, 89C51, etc. are compatible with the 89S51, except that the function definitions of individual pins are different.


2. Introduction to AT89C2051 MCU Pins

  The AT89C2051 is a 20-pin small package with 2K internal program memory, 15 programmable I/O lines, 16 I/O lines without P0 and P2, and an analog comparator is integrated inside. The pinout of the AT89C2051 microcontroller is shown in the figure below.

  
                    Actual chip picture Chip pin function


  AT89S51 and AT89C205151 MCU Pin Introduction - Fly with Dreams - Fly with Dreams            AT89S51 and AT89C205151 MCU Pin Introduction - Fly with Dreams - Fly with Dreams

 

         The chip has 20 pins in total. The pins are arranged in the order of 1, 2, 3, and so on, counting counterclockwise from the left column of pins near the notch of the chip (see the figure above). Among the 20 pins of the microcontroller, there are 2 power pins, 2 external crystal oscillator pins, 1 reset pin, and 15 programmable I/O pins of ports P1 and P3.

1. Main power pins (2 pins)
 VCC (Pin 20): power input, connected to +5V power
 GND (Pin 10): ground wire

2. External crystal oscillator pins (2 pins)
 XTAL1 (Pin5): Input of the internal oscillator circuit
 XTAL2 (Pin4): Output of the internal oscillator circuit

 

3. Control pin (1 pin)
 RST/VPP (Pin1): Reset pin. A high level of 2 machine cycles on the pin will reset the microcontroller.

4. Programmable input/output pins (15 pins)
 P1 port: 8-bit quasi-bidirectional I/O port lines, P1.0~P1.7, 8 pins in total 
 P3 port: 8-bit quasi-bidirectional I/O port lines, P3.0~P3.5, P3.7, 7 pins in total

  Smart people 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. Where did the other one go? ! As mentioned earlier, AT89C2051 integrates an analog comparator. It is precisely because of the integration of the analog comparator that another lead is occupied. The output end of the comparator occupies an I/O port, which is P3.6. Pin P3.6 is not connected, so there is one less I/O line. When programming, P3.6 can only be used to read the state of the comparator, and cannot be used to drive external indicator lights and other devices like other I/O ports. However, the analog comparator is very practical, and the trouble of adding an external comparator can be saved in development. The figure shows the principle of the comparator.   

                                                        AT89S51 and AT89C205151 MCU Pin Introduction - Fly with Dreams - Fly with Dreams

3. Introduction of main performance parameters

  AT89S51 
·Fully compatible with the MCS-51 product instruction system
·4k bytes of in-system programming (ISP) Flash memory
·1000 erase and write cycles
·4.0-5.5V operating voltage range
·Fully static operating mode: 0Hz-33MHz
·Three-level program encryption lock
·128×8 bytes of internal RAM
·32 programmable I/O lines
·2 16-bit timers/counters
·6 interrupt sources
·Full-duplex serial UART channel
·Low-power idle and power-down modes
·Interrupts can wake up the system from idle mode
·Watchdog (WDT) and dual data pointers
·Power-down flag and fast programming features
·Flexible in-system programming (ISP byte or page write mode) 
   AT89C2051 
·Fully compatible with the MCS-51 product instruction system
·2k bytes of re-erasable Flash memory
·1000 erase and write cycles
·2.7V-6V operating voltage range


Fully static operation: 0Hz-24MHz
Two-level encrypted program memory
128×8 bytes of internal RAM
15 programmable I/O lines
2 16-bit timers/counters
6 interrupt sources
Programmable serial UART channels
Output port that can directly drive LEDs 
One built-in analog comparator
Low-power idle and power-down modes 

Keywords:AT89S51  AT89C2051 Reference address:AT89S51 and AT89C2051 microcontroller pin introduction

Previous article:Digital tube dynamic display of numbers
Next article:Infrared remote control software decoding principle and program (C language)

Recommended ReadingLatest update time:2024-11-15 13:33

Design of remote current data acquisition system based on power line carrier technology
Introduction: This paper introduces a remote current data acquisition system using semiconductor magnetoresistive current sensor (MRCS) and LM1893 chip. The system hardware mainly consists of AT89C2051 single-chip microcomputer main control circuit, serial ADC0832 analog/digital conversion circuit, LM1893 power line c
[Microcontroller]
Design of remote current data acquisition system based on power line carrier technology
AT89C2051 single chip dual road street lighting controller
  Usually, the street lamps, channel lamps, advertising light boxes and other public lighting fixtures we often see are often on all night, or work when they should not be on during the day, resulting in a waste of electricity. Some of them use a timing control method, but fail to set the controller in time with the c
[Microcontroller]
AT89C2051 single chip dual road street lighting controller
Control design of intersection traffic lights using AT89S51 microcontroller
1. Technical requirements At a certain intersection, as shown in the figure below, a traffic light signal controller is designed to direct the passage of traffic vehicles. Requirements are as follows: 1) The east-west channel and the north-south channel pass alternately. The time of each release of the east-west chann
[Microcontroller]
Control design of intersection traffic lights using AT89S51 microcontroller
The origin of AT89S51 and its difference from C51
Many netizens who are new to 51 microcontrollers have this question: What is AT89S51? Books and online tutorials all mention 8051, 89C51, etc. I have never heard of 89S51? !   Here, beginners need to clarify a product concept in the actual use of microcontrollers. The MCS-51 microcontroller was launched by the Ameri
[Microcontroller]
Circuit design that can automatically identify transistor pins and types
  1 Hardware circuit composition principle   According to the types and pin arrangements of currently commonly used transistors, the designed automatic discrimination circuit includes four parts: central control unit, conversion circuit, detection amplifier circuit and display circuit, as shown in Figure 1, in which
[Microcontroller]
Circuit design that can automatically identify transistor pins and types
AT89S51 Pin Functions
     To master the AT89S51 microcontroller, you should first understand the pins of the AT89S51 and be familiar with and remember the functions of each pin. The pins of the AT89S51 and various models of chips in the 80C51 series are compatible with each other. Currently, the AT89S51 microcontroller mostly uses a 40-pi
[Microcontroller]
AT89S51 Pin Functions
Application Research of Infrared Remote Control System Based on AT89C51 and AT89C2051
  1 Introduction   With the improvement of material and cultural living standards, people's pursuit of product intelligence and convenience is also further enhanced. Infrared remote control devices have become the most widely used means of communication and remote control due to their simple structure, low cost, eas
[Microcontroller]
Application Research of Infrared Remote Control System Based on AT89C51 and AT89C2051
Detailed explanation of AT89C2051 multi-channel servo control circuit
  The servo is a position servo driver. It receives a certain control signal and outputs a certain angle. It is suitable for control systems that require the angle to change continuously and be maintained. In micro-electromechanical systems and aircraft models, it is a basic output actuator. Taking the FUTABA-S3003 ser
[Microcontroller]
Detailed explanation of AT89C2051 multi-channel servo control circuit
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号