Spark Logic

Atmel AT89C52 connection guide

Atmel AT89C52 (PQFP-44) connection guide. Power and internal code selection. Drive XTAL1 with a bench clock.

PackageContactsDetails
PDIP-40 40 40P6, 15.24 mm (0.600 in) row spacing. Ordering suffix P.
PLCC-44 44 44J, J-shaped leads at 1.27 mm pitch. Ordering suffix J.
TQFP-44 44 44A, 0.80 mm lead pitch, 11.75–12.21 mm lead span and 1.20 mm maximum height. Ordering suffix A.
PQFP-44 44 44Q, 0.80 mm lead pitch, 12.95–13.45 mm lead span and 2.45 mm maximum height. Ordering suffix Q.

Atmel

Device variants · PQFP-44

DeviceDetails
AT89C52-12 Up to 12 MHz, 4.0–6.0 V. AT89C52-12QC: 0–70 °C. AT89C52-12QI: −40–85 °C. 8 KiB Flash and 256 B RAM.
AT89C52-16 Up to 16 MHz, 4.0–6.0 V. AT89C52-16QC: 0–70 °C. AT89C52-16QI: −40–85 °C. 8 KiB Flash and 256 B RAM.
AT89C52-20 Up to 20 MHz, 4.0–6.0 V. AT89C52-20QC: 0–70 °C. AT89C52-20QI: −40–85 °C. 8 KiB Flash and 256 B RAM.
AT89C52-24 Up to 24 MHz, 4.0–6.0 V. AT89C52-24QC: 0–70 °C. AT89C52-24QI: −40–85 °C. 8 KiB Flash and 256 B RAM.

Power and internal code selection

Required

Power VCC from a regulated 5 V supply (±5% for these examples). Place a 100 nF ceramic bypass between VCC and GND. The high strap on EA selects the installed Flash at reset address 0000h.

  • VCC rail
    • Regulated supply +
    • C1.1
  • Ground
    • Supply return
    • C1.2
100 nF between VCC rail and GroundVCC rail100 nFGround

Bench checks

  • Confirm the package pin 1 mark before applying power and measure VCC relative to ground at the IC.
  • Use a 100 nF X7R capacitor rated at least 16 V as the local high-frequency bypass. Keep its loop short.
  • Confirm the on-chip Flash contains the intended startup code before selecting internal execution.
  • With lock bit 1 programmed, a valid reset latches EA. Keep the pin at the latched level during operation.

Atmel AT89C52, 0313H–02/00, pp. 4, 13, 17, 22

Drive XTAL1 with a bench clock

Required

Apply an 11.0592 MHz logic-level bench clock to XTAL1, with a shared ground. Keep XTAL2 open. Use the generator’s actual unloaded output voltage at the board.

  • Clock
    • Clock generator OUT
    • →
  • Ground
    • Clock generator GND

Bench checks

  • Set the clock swing from 0 V to the measured MCU supply, which is 5 V ±5% in this example. Set the generator for a high-impedance load or measure the actual voltage with the selected termination.
  • At the pin, verify HIGH ≥ 0.7 × VCC, LOW ≤ 0.2 × VCC − 0.1 V and peaks within the supply rails. Verify both high and low times ≥ 15 ns and rise/fall times ≤ 20 ns.
  • Enable the drive after the MCU supply is up. At 11.0592 MHz the nominal period is 90.42 ns. A 50% clock leaves about 45 ns per state before edge effects.

Atmel AT89C52, 0313H–02/00, Figure 8 and pp. 17, 20, 22

Apply an active-high bench reset

Required

Use a separate push-pull reset driver with a manual pulse or a programmable startup sequence. Drive RST between GND and the measured MCU VCC. Hold RST HIGH as the clock starts, then drive it LOW after the required reset interval.

  • Reset
    • Reset driver OUT
    • →
  • Ground
    • Reset driver GND

Bench checks

  • Power the MCU first and use a source referenced to its GND. Verify reset HIGH ≥ 0.7 × VCC and LOW ≤ 0.2 × VCC − 0.1 V.
  • Keep RST HIGH for at least two machine cycles after the oscillator is running. At 11.0592 MHz this is 2.18 µs rounded up. A 1 ms manual test pulse gives margin after clock stabilization.
  • The RST pulldown can draw 105 µA at 5.25 V in its 50 kΩ corner. Verify the driver maintains its HIGH specification at this load.
  • Restore VCC to its normal operating level before asserting hardware reset. Keep RST HIGH through oscillator stabilization and the reset interval. Hardware reset is the only exit from Power-down.
  • Hardware reset can let code run for up to two machine cycles after leaving Idle. The instruction immediately after entering Idle must avoid writes to port pins and external memory.

Atmel AT89C52, 0313H–02/00, pp. 3, 12, 17

Connection scenarios

Connect a logic-level UART

Complete the required steps for this scenario: Power and internal code selection·Drive XTAL1 with a bench clock·Apply an active-high bench reset

Wire RXD and TXD to the opposite UART signals, with a shared ground. Use the logic-level side of a compatible adapter and keep its TXD from driving an unpowered MCU. Leave RST on its separate reset circuit. A conventional RS-232 port requires a transceiver.

  • MCU receive
    • Adapter TXD
    • ↔
  • MCU transmit
    • ↔
    • Adapter RXD
  • Signal reference
    • Adapter GND

Bench checks

  • At 5 V ±5%, verify adapter TXD HIGH ≥ 1.95 V and LOW ≤ 0.85 V. Adapter RXD must accept the 2.4 V guaranteed MCU HIGH at no more than 60 µA source load.
  • After the clock is running and RST has returned LOW, the installed firmware must set the P3.0 and P3.1 latches to 1 and select serial mode 1. Match baud rate, framing and parity at both ends.
  • At 11.0592 MHz, Timer 1 mode 2 with TH1 = TL1 = FDh and SMOD = 0 gives 9600 baud nominal. The calculation is 11.0592 MHz ÷ (12 × 32 × 3).

Atmel AT89C52, 0313H–02/00, pp. 3, 11, 17, and Intel MCS-51 User’s Manual, serial interface

PQFP-44 wiring map

External wiring example · Connect a logic-level UART

Highlighted contacts are used in the required steps or selected circuit. Select a contact to highlight its wiring nets.

PQFP-44

4 · RST · Left side, contact 4 from the top

Marking side, index corner at upper left. Pin 1 is the topmost lead on the left edge.
Selected pin details

4 · RST

Input · Reset / preset

Active-high reset. Hold HIGH for at least two machine cycles after the oscillator is running. A valid reset starts code at 0000h.

Wiring requirements

  • Reset. Keep RST HIGH for at least two machine cycles after the oscillator is running.

  • Program memory. Strap EA to GND for external code from 0000h or to VCC for internal Flash at 0000h–1FFFh. With lock bit 1 programmed, a valid reset latches EA. Keep the pin at the latched level during operation. Lock mode 4 disables external execution.

  • Wake from Power-down. Restore VCC to its normal operating level before asserting hardware reset. Keep RST HIGH through oscillator stabilization and the reset interval. Hardware reset is the only exit from Power-down.

  • Hardware reset from Idle. Hardware reset can let code run for up to two machine cycles after leaving Idle. The instruction immediately after entering Idle must avoid writes to port pins and external memory.

After reset · Return RST LOW after the valid HIGH pulse to allow execution.

Atmel 0313H–02/00, pp. 1, 3–5

Connected nets

Electrical limits · Pin in the reference

  • Reset
    • Reset driver OUT
    • →

Manufacturer documents

This reference resolves the abbreviated 89C52 name to Atmel’s AT89C52, document 0313H. It covers all four package drawings and the listed 12/16/20/24 MHz speed grades. Check the full marking on parts from other manufacturers. The AT89S52 uses its own programming interface and datasheet.

  • Datasheet for AT89C52· Atmel 0313H–02/00, February 2000. Pin configurations p. 1, pin descriptions pp. 3–4, SFR reset p. 5, Timer 2 pp. 6–10, oscillator and low-power modes p. 12, lock bits p. 13, DC p. 17, clock drive p. 20, ordering and package drawings pp. 22–23. SHA-256 f8d392b5cc25322766180e74d323b5c8abd647c98f9d4fbfc6f99a7d1f89e4bd.
  • Intel MCS-51 Family User’s Manual· Intel 272383-002, February 1994, chapter 3. Core operation, port latches and serial interface. The AT89C52 datasheet governs its own electrical limits and Timer 2 extensions.