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.
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.
Symbol
Figure1-1 Symbol
Footprint
Figure1-2 footprint
CAD Model
Figure1-3 CAD Model
40-lead PDIP
Figure1-40-lead PDIP
44-lead PLCC
Figure2-44-lead PLCC
lead TQFP
Figure3-44-lead TQFP
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) |
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 |
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 |
Figure4-40-lead PDIP
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.
Figure5-package
Different software and compilers available in the market can be used to program the Atmel microcontrollers family.
Support Compilers
Components Needed
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
AT89S51:
AT89S52:
In AT89S52, all the ports are dual-functionality whereas in AT89S51, only three ports are.
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 >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 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 >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 >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 >