Welcome to Hong Kong Bitfoic Electronics Co., Ltd
Home > Components >AT89S52 CMOS 8-bit microcontroller: Pinout, Datasheet, CAD Model and Features

AT89S52 CMOS 8-bit microcontroller: Pinout, Datasheet, CAD Model and Features

3/13/2023

The AT89S52 is less power-consuming, highly reliable, has the ability to get data up to eight-bit, and is constructed with the CMOS (Complementary metal-oxide-semiconductor) technique. This post will share the AT89S52 pinout, datasheet, CAD Model, Features, and application.

 

 

AT89S52 Description

 

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. Combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller that provides a highly-flexible and cost-effective solution to many embedded control applications.

AT89S52 integrates a general-purpose 8-bit CPU, memory (including RAM and Flash ROM), parallel IO interface, timer/counter, interrupt control functions, etc. on one chip, and the functional modules in the chip are connected to each other through the internal bus. AT89S52 has three package structures, and the pin arrangement of the PDIP package is shown in Figure 4.1. The main functional modules of the AT89S52 microcontroller are introduced as follows.

 

CAD Model

 

Symbol

 

Symbol

Figure1-1 Symbol

 

 

Footprint

 

Figure1-2 footprint

 

 

 

CAD Model

 

 

Figure1-3 CAD Model

 

 

 

AT89S52 Pinout

 

 

 40-lead PDIP 

 

 AT89S52 Pinout

Figure1-40-lead PDIP 

 

44-lead PLCC

 

 

 

Figure2-44-lead PLCC

 

 

 

lead TQFP

 

 

Figure3-44-lead TQFP

 

 

 

AT89S52 Pin Configuration

 

Pin Number

Pin Name

Description

1

P1.0 (T2)

Timer/Counter or 0th GPIO pin of PORT 1

2

P1.1 (T2.EX)

Timer/Counter/External Counter or 1st GPIO pin of PORT 1

3

P1.2

2nd GPIO pin of PORT 1

4

P1.3

3rd GPIO pin of PORT 1

5

P1.4

4th GPIO pin of PORT 1

6

P1.5 (MOSI)

MOSI for System Programming or 5th GPIO pin of PORT 1

7

P1.6 (MISO)

MISO for System Programming or 6th GPIO pin of PORT 1

8

P1.7 (SCK)

SCK for System Programming or 7th GPIO pin of PORT 1

9

RST

Making this pin high will reset the Microcontroller

10

P3.0 (RXD)

RXD Serial Input or 0th GPIO pin of PORT 3

11

P3.1 (TXD)

TXD Serial Output or 1st GPIO pin of PORT 3

12

P3.2 (INT0’)

External Interrupt 0 or 2nd GPIO pin of PORT 3

13

P3.3 (INT1’)

External Interrupt 1 or 3rd GPIO pin of PORT 3

14

P3.4 (T0)

Timer 0 or 4th GPIO pin of PORT 3

15

P3.5 (T1)

Timer 1 or 5th GPIO pin of PORT 3

16

P3.6 (WR’)

Memory Write or 6th GPIO pin of PORT 3

17

P3.7 (RD’)

Memory Read or 7th GPIO pin of PORT 3

18

XTAL2

External Oscillator Output

19

XTAL1

External Oscillator Input

20

GND

Ground pin of MCU

21

P2.0(A8)

0th GPIO pin of PORT 2

22

P2.1 (A9)

1st GPIO pin of PORT 2

23

P2.2 (A10)

2nd GPIO pin of PORT 2

24

P2.3 (A11)

3rd GPIO pin of PORT 2

25

P2.4 (A12)

4th GPIO pin of PORT 2

26

P2.5 (A13)

5th GPIO pin of PORT 2

27

P2.6 (A14)

6th GPIO pin of PORT 2

28

P2.7 (A15)

7th GPIO pin of PORT 2

29

PSEN’

Program store Enable used to read external program memory

30

ALE / PROG’

Address Latch Enable / Program Pulse Input

31

EA’ / VPP

External Access Enable / Programming enables Voltage

32

P0.7 (AD7)

Address / Data pin 7 or 7th GPIO pin of PORT 0

33

P0.6 (AD6)

Address / Data pin 6 or 6th GPIO pin of PORT 0

34

P0.5 (AD5)

Address / Data pin 5 or 5th GPIO pin of PORT 0

35

P0.4 (AD4)

Address / Data pin 4 or 4th GPIO pin of PORT 0

36

P0.3 (AD3)

Address / Data pin 3 or 3rd GPIO pin of PORT 0

37

P0.2 (AD2)

Address / Data pin 2 or 2nd GPIO pin of PORT 0

38

P0.1 (AD1)

Address / Data pin 1 or 1st GPIO pin of PORT 0

39

P0.0 (AD0)

Address / Data pin 0 or 0th GPIO pin of PORT 0

40

VCC

Positive pin of MCU (+5V)

 

 

AT89S52 Microcontroller Features

 

 

CPU

8-bit PIC

Number of  Pins

40

Operating Voltage (V)

4 to 5.5 V

Number of Programmable I/O pins

32

ADC Module

Nil

Timer Module

16-bit(1)

Comparators

Nil

DAC Module

Nil

Communication Peripherals

UART(1)

External Oscillator

Up to 23Mhz

Internal Oscillator

Nil

Program Memory Type

Flash

Program Memory (KB)

8KB

CPU Speed (MIPS)

-

RAM Bytes

256 x 8-bit

Data EEPROM

Nil

 

 

AT89S52 Specifications

 

 

Features and Peripherals

Availability

Architecture

8-bit PIC

Pin Count

40

RAM

256 Bytes

EEPROM/HEF

No

Program Memory

8 KiloBytes

CPU speed

33 MHz

Internal Oscillator

No

Number of Comparators

2

ADC

No

DAC

No

Number of Programmable I/O pins

32

Window Watchdog Timer

No

External Oscillator Frequency

23 MHz (max)

Resolution of PWM

No

Number of 16-bit Timers

3

Program Memory Type

Flash

UART module

1

Power-off Flag

Yes

Dual Data Pointer

Yes

Operating Voltage

4V – 5.5 V

Operating Temperature

-550C – 1250C

 

 

AT89S52 Features

 

  • Compatible with MCS®-51 Products
  • 8K Bytes of In-System Programmable (ISP) Flash Memory – Endurance: 10,000 Write/Erase Cycles
  • 4.0V to 5.5V Operating Range
  • Fully Static Operation: 0 Hz to 33 MHz
  • Three-level Program Memory Lock
  • 256 x 8-bit Internal RAM
  • 32 Programmable I/O Lines
  • Three 16-bit Timer/Counters
  • Eight Interrupt Sources
  • Full Duplex UART Serial Channel
  • Low-power Idle and Power-down Modes
  • Interrupt Recovery from Power-down Mode
  • Watchdog Timer
  • Dual Data Pointer
  • Power-off Flag
  • Fast Programming Time
  • Flexible ISP Programming (Byte and Page Mode)
  • Green (Pb/Halide-free) Packaging Option

 

 

AT89S52 Block Diagram

 

 

 

Figure4-40-lead PDIP 

 

 

How to Select your Atmel Microcontroller

 

Microchip provides a wide variety of Microcontrollers from the PIC family and the Atmel Family. Their collection has just piled up after Microchip acquired Atmel. Each MCU has its own advantage and disadvantage. There are many parameters that one has to consider before selecting an MCU for his/her project. The below points are suggestions that might help one select an MCU.

  • If you are a beginner learning Microcontroller, selecting an MCU with good online community support and wide applications will be a good choice. For Atmel AT89S52 or ATmega328 will be a good choice.
  • Consider the operating voltage of your system. If they are 5V then select a 5V MCU some sensors or devices work and communicate on 3.3V in such case a 3.3V MCU can be selected
  • If size and price are limitations then you can choose small 8-pin MCUs like Attiny1614. These are also comparatively cheaper.
  • Based on the sensors and actuators used in your project, verify which modules you might need for MCU. For example, is you are reading many Analog voltages then make sure MCU has enough ADC channels and supportive resolution. The details of all modules are given in the table above.
  • If your project involves communication protocols like UART, SPI, I2C, CAN, etc make sure your MCU can support them. Some MCU can support more than one module of the same protocol

 

 

Applications

 

  • Multiple DIY Projects
  • Excellent choice if you are learning ATmel
  • Projects requiring Multiple I/O interfaces and communications
  • Replacement for Arduino Module
  • Ideal for more advanced level A/D applications in automotive, industrial, appliances, and consumer applications.

 

 AT89S52 Package PSDIP

 

 

Figure5-package

 

 

 

How to program AT89S52 8-bit Microcontroller

 

Different software and compilers available in the market can be used to program the Atmel microcontrollers family.

Support Compilers

 

Components Needed

  • IDE
  • IPE
  • a suitable compiler
  • a programmer/debugger to develop a program

 

A programming environment is what an IDE (Integrated Development Environment) is there to deliver. The software is transformed into readable HEX files by the compiler. HEX files are burned in AVR MCUs using the IPE (Integrated Programming Environment). We frequently use Keil uVision IDE for IDE.

 

USBASP is an In-circuit programmer/debugger which plays an integral role in programming microcontrollers. It supports In-Circuit-Serial-Programming and is operated by a computer to burn the code into AT89S52 8-bit microcontroller. For hardware programming, it is purchased separately. It is advised to simulate the program beforehand on the software for optimization and error-free programs. Furthermore, hardware like a 12 Volts adapter, 7805 Voltage Regulator, Crystal Oscillator, and capacitors are required.

The picture below is the connection diagram for programming the AT89S52 controller:

 

Figure4- connection diagram 

 

 

 

XIII AT89S51 vs AT89S52

 

AT89S51:

  • 8051-based Full Static CMOS controller with Three-Level Program Memory Lock, 32 I/O lines, 2 Timers/Counters, 6 Interrupts Sources, Watchdog Timer, 2 DPTRs 4K Flash, 128 Bytes On-chip RAM.
  •  

AT89S52:

  • 8051-based Full Static CMOS controller with Three-Level Program Memory Lock, 32 I/O lines, 3 Timers/Counters, 8 Interrupts Sources, Watchdog Timer, 2 DPTRs, 8K Flash Memory, 256 Bytes On-chip RAM.
  • In AT89S52, user RAM is from 00H to FFH. In this lower 128 bytes are both directly and indirectly addressed. The upper 128 bytes are only indirectly addressed.

In AT89S52, all the ports are dual-functionality whereas in AT89S51, only three ports are.

 

 

XIV AT89S52 PDF

AT89S52 Datasheet

 

Frequently Asked Questions
1. What is the use of AT89S52?
2. What is the AT89S52 specification?
3. What is the difference between AT89C52 and AT89S52?
4. What is the clock speed of the AT89S52 microcontroller?
logo
Bitfoic is a professional electronic components distributor founded in 2013. Adhering to our business philosophy of customer first and people-oriented, we have won the favor of our customers and established an excellent reputation in international Partner.
Related Articles
  • CR2025 vs CR2016: Which one you should choose ?
    CR2025 vs CR2016: Which one you should choose ?
    5/8/2024 38

    CR2025 is a type of lithium coin cell battery. It's a small, round, flat battery commonly used in various electronic devices such as watches, calculators, remote controls, key fobs, and small electronic gadgets. The "CR" in its name stands for lithium manganese dioxide chemistry, and "2025" refers to its dimensions: 20mm diameter and 2.5mm height. These batteries are known for their long shelf life and stable voltage output, making them popular choices for low-power devices.

    Read More >
  • How to resolve the WiFi and ADC2 Sharing Dilemma?
    How to resolve the WiFi and ADC2 Sharing Dilemma?
    4/19/2024 47

    ESP32-CAM can be used in various Internet of Things situations and is suitable for home smart devices, industrial wireless control, wireless Monitoring, QR wireless identification, wireless positioning system signals, and other IoT applications are ideal solutions for IoT applications.

    Read More >
  • ESP32-CAM Pinout Explanation and How to Use?
    ESP32-CAM Pinout Explanation and How to Use?
    4/18/2024 141

    ESP32-CAM is a development board with an ESP32-S chip, an OV2640 camera, a microSD card slot, and several GPIOs for connecting peripherals. ESP32-CAM is a small-sized camera module. The module can work independently as the smallest system, with a size of only 27*40.5*4.5mm.

    Read More >
  • Stand-Alone Linear Li-Ion / Li-Polymer Charge Management Controller MCP73833
    Stand-Alone Linear Li-Ion / Li-Polymer Charge Management Controller MCP73833
    4/9/2024 74

    The MCP73833/4 is a highly advanced linear charge management controller for use in space-limited, cost sensitive applications. Both a 10-lead, MSOP and a 10-lead, DFN packaging measuring 3 mm by 3 mm are offered for the MCP73833/4. In addition to its tiny size, the MCP73833/4 is perfect for portable applications because it requires a few additional components.

    Read More >
  • Optocoupler IC 4N35: Pinout, Datasheet, Features and Applications
    Optocoupler IC 4N35: Pinout, Datasheet, Features and Applications
    3/26/2024 132

    In the realm of electronics, where connectivity and isolation are paramount, the 4N35 optocoupler IC stands as a beacon of reliability and versatility. This small yet mighty device plays a crucial role in ensuring signal integrity and safety across a wide range of applications. In this article, we delve into the intricacies of the 4N35 optocoupler IC, exploring its datasheet, pinout, circuit diagram, and diverse uses.

    Read More >
Microchip Technology
In Stock: 6000
Popular parts number