The AT89S2051/S4051 is a low-voltage, high-performance CMOS 8-bit microcontroller with 2K/4K bytes of In-System Programmable (ISP) Flash program memory. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89S2051/S4051 is a powerful microcontroller which provides a highly-flexible and cost-effective solution.
This manual describes the AT89S2051/AT89S4051 low‑voltage 8‑bit CMOS microcontroller, its 2 KB/4 KB ISP flash, 256 B RAM, 15 I/O pins, timers, UART, PWM, analog comparator and power‑saving modes. It includes a full description, pin‑out diagrams, block diagrams, and electrical characteristics.
The document also covers special function registers, instruction restrictions, lock‑bit protection, reset sources (power‑on, brown‑out, external), and mechanical dimensions for the 20‑lead SOIC package. Revision history and package drawings are provided at the end.
| Flash Program Memory | 2 KB / 4 KB |
|---|---|
| Operating Voltage | 2.7 V to 5.5 V |
| CPU Operation Speed | 0 Hz to 24 MHz (x1 and x2 Modes) |
| Internal RAM | 256 × 8‑bit |
| Programmable I/O Lines | 15 |
| Timer/Counters | Two 16‑bit |
| Interrupt Sources | Six |
| UART | Programmable Serial UART Channel |
| Analog Comparator | On‑chip with selectable interrupt |
| PWM | 8‑bit PWM |
| Power‑saving Modes | Low Power Idle and Power‑down |
The device operates from 2.7 V up to 5.5 V.
It provides 15 programmable I/O lines.
The microcontroller supports power‑on reset, brown‑out reset, and external reset.