Description Pin Configurations Features TUGAS PENGGANTI SKRIPSI (mikrokontroler, mikroprosesor, motor sinkron, motor asinkron, arsitektur harvard, arsitektur von neumann, media transmisi.

Features • Compatible with MCS ® -51 Products • 4K Bytes of In-System Programmable ISP Flash Memory – Endurance: 1000 WriteErase Cycles • 4.0V to 5.5V Operating Range • Fully Static Operation: 0 Hz to 33 MHz • Three-level Program Memory Lock • 128 x 8-bit Internal RAM • 32 Programmable IO Lines • Two 16-bit TimerCounters • Six Interrupt Sources • Full Duplex UART Serial Channel • Low-power Idle and Power-down Modes • Interrupt Recovery from Power-down Mode • Watchdog Timer • Dual Data Pointer • Power-off Flag • Fast Programming Time • Flexible ISP Programming Byte and Page Mode • Green PbHalide-free Packaging Option

1. Description

The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of In-System Programmable Flash memory. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the indus- try-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 pro- grammer. By combining a versatile 8-bit CPU with In-System Programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 IO lines, Watchdog timer, two data pointers, two 16-bit timercounters, a five-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timercounters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM con- tents but freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware reset. 8-bit Microcontroller with 4K Bytes In-System Programmable Flash AT89S51 2487C–MICRO–0305 2 2487C–MICRO–0305 AT89S51

2. Pin Configurations

2.1 40-lead PDIP

2.2 44-lead TQFP

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 P1.0 P1.1 P1.2 P1.3 P1.4 MOSI P1.5 MISO P1.6 SCK P1.7 RST RXD P3.0 TXD P3.1 INT0 P3.2 INT1 P3.3 T0 P3.4 T1 P3.5 WR P3.6 RD P3.7 XTAL2 XTAL1 GND VCC P0.0 AD0 P0.1 AD1 P0.2 AD2 P0.3 AD3 P0.4 AD4 P0.5 AD5 P0.6 AD6 P0.7 AD7 EAVPP ALEPROG PSEN P2.7 A15 P2.6 A14 P2.5 A13 P2.4 A12 P2.3 A11 P2.2 A10 P2.1 A9 P2.0 A8 1 2 3 4 5 6 7 8 9 10 11 33 32 31 30 29 28 27 26 25 24 23 44 43 42 41 40 39 38 37 36 35 34 12 13 14 15 16 17 18 19 20 21 22 MOSI P1.5 MISO P1.6 SCK P1.7 RST RXD P3.0 NC TXD P3.1 INT0 P3.2 INT1 P3.3 T0 P3.4 T1 P3.5 P0.4 AD4 P0.5 AD5 P0.6 AD6 P0.7 AD7 EAVPP NC ALEPROG PSEN P2.7 A15 P2.6 A14 P2.5 A13 P1.4 P1.3 P1.2 P1.1 P1.0 NC VCC P0.0 AD0 P0.1 AD1 P0.2 AD2 P0.3 AD3 WR P3.6 RD P3.7 XTAL2 XTAL1 GND GND A8 P2.0 A9 P2.1 A10 P2.2 A11 P2.3 A12 P2.4

2.3 44-lead PLCC

2.4 42-lead PDIP

7 8 9 10 11 12 13 14 15 16 17 39 38 37 36 35 34 33 32 31 30 29 MOSI P1.5 MISO P1.6 SCK P1.7 RST RXD P3.0 NC TXD P3.1 INT0 P3.2 INT1 P3.3 T0 P3.4 T1 P3.5 P0.4 AD4 P0.5 AD5 P0.6 AD6 P0.7 AD7 EAVPP NC ALEPROG PSEN P2.7 A15 P2.6 A14 P2.5 A13 6 5 4 3 2 1 44 43 42 41 40 18 19 20 21 22 23 24 25 26 27 28 WR P3.6 RD P3.7 XTAL2 XTAL1 GND NC A8 P2.0 A9 P2.1 A10 P2.2 A11 P2.3 A12 P2.4 P1.4 P1.3 P1.2 P1.1 P1.0 NC VCC P0.0 AD0 P0.1 AD1 P0.2 AD2 P0.3 AD3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 RST RXD P3.0 TXD P3.1 INT0 P3.2 INT1 P3.3 T0 P3.4 T1 P3.5 WR P3.6 RD P3.7 XTAL2 XTAL1 GND PWRGND A8 P2.0 A9 P2.1 A10 P2.2 A11 P2.3 A12 P2.4 A13 P2.5 A14 P2.6 A15 P2.7 P1.7 SCK P1.6 MISO P1.5 MOSI P1.4 P1.3 P1.2 P1.1 P1.0 VDD PWRVDD P0.0 AD0 P0.1 AD1 P0.2 AD2 P0.3 AD3 P0.4 AD4 P0.5 AD5 P0.6 AD6 P0.7 AD7 EAVPP ALEPROG PSEN 3 2487C–MICRO–0305

3. Block Diagram