【正文】
1 原文: MicrocontrollerAT89S52 Features ? Compatible with MCS 51Products ? 8K Bytes of InSystem Programmable (ISP) Flash Memory ? – Endurance: 10,000 Write/Erase Cycles ? to Operating Range ? Fully Static Operation: 0 Hz to 33 MHz ? Threelevel Program Memory Lock ? 256 x 8bit Internal RAM ? 32 Programmable I/O Lines ? Three 16bit Timer/Counters ? Eight Interrupt Sources ? Full Duplex UART Serial Channel ? Lowpower Idle and Powerdown Modes ? Interrupt Recovery from Powerdown Mode ? Watchdog Timer ? Dual Data Pointer ? Poweroff Flag ? Fast Programming Time ? Flexible ISP Programming (Byte and Page Mode) ? Green (Pb/Halidefree) Packaging Option1. Description 1. Description The AT89S52 is a lowpower, highperformance CMOS 8bit microcontroller with 8K bytes of insystem programmable Flash memory. The device is manufactured using Atmel’s highdensity nonvolatile memory technology and is patible with the industrystandard 80C51 instruction set and pinout. The onchip Flash allows the program memory to be reprogrammed insystem or by a conventional nonvolatile memory programmer. By bining a versatile 8bit CPU with insystem programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highlyflexible and costeffective solution to many embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16bit timer/counters, a sixvector twolevel interrupt architecture, a full duplex serial port, onchip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The 8Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Powerdown mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset. 2 2. Pin Description VCC: Supply voltage. GND: Ground. Port 0 Port 0 is an 8bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs. Port 0 can also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode, P0 has internal 0 also r