Skip to content
A project ofgwark.dev

Atmel / Microchip · Microcontroller

AT89S52 (8051)

The 8051 that is still buyable and still in every embedded syllabus. Four 8-bit ports, in-system programmable, DIP-40.

Cheat sheet (SVG)
Logic level
4.0-5.5 V
Package
PDIP-40 / PLCC-44 / TQFP-44

1.Pinout diagram

Highlight a signalhover to preview, click to keep

Pins 1-20

AT89S52

Pins 21-40

Pin detail

Hover a pin for its mappings and gotchas. Click to keep it here.

Logic level
4.0-5.5 V
Package
PDIP-40 / PLCC-44 / TQFP-44

Fig. 1. AT89S52 (8051), PDIP-40. Hover or tap a signal to light up every pin that carries it.

2.Watch out

3.Minimum circuit to run

What has to go around the chip before it will run.

VCCGNDAT89S52Wire link between EA (31) and VCCWire link10 uF between RST (9) and VCC10 uF10 kOhm between RST (9) and GND10 kOhm30 pF between XTAL1 (19) and GND30 pF30 pF between XTAL2 (18) and GND30 pF100 nF between VCC (40) and GND100 nF10 kOhm between P0.0 (39) and VCC10 kOhmGND (20) to GNDVCC (40) to VCC11.0592 MHz crystal between XTAL1 (19) and XTAL2 (18)11.0592 MHz crystalRST 9RST 9XTAL2 18XTAL2 18XTAL1 19XTAL1 19GND 20EA 31P0.0 39VCC 40VCC 40
Fig. 2. Minimum circuit to run, drawn from Table 1. Dashed parts are optional. Crossing wires are not connected.
Table 1. External parts, and why each one is there.
PartBetween
Wire linkEA (31) to VCC
10 uFVCC to RST (9)
10 kOhmRST (9) to GND
11.0592 MHz crystalXTAL1 (19) to XTAL2 (18)
30 pFXTAL1 (19) to GND
30 pFXTAL2 (18) to GND
100 nFVCC (40) to GND
10 kOhmoptionalP0.0 (39) to VCC

Reset is active high here, the opposite of almost every other micro on this site. Holding RST high holds the chip in reset.

4.Register configuration

Turning a pin on the diagram into a configured pin.

5.Full pin reference

Every pin, alias and mapping. This is the table that prints.

Table 2. Pin assignments.

Complete pin reference for AT89S52 (8051)
PinNameFunctions

Found a wrong pin? The whole board is one file, data/boards/at89s52.json.

Edit this file on GitHubReport it instead