AT89S51 has low power consumption, 8-bit CMOS microcontroller with 4K bytes of Flash memory ISP (In System Programmable / can be programmed in the system). In the images shown physical shape and configuration of a microcontroller pin AT89Sxx series.
Figure 13 Microcontroller
DESCRIPTION PIN:
Supply Voltage VCC on pin 40
GND Ground on pin 20
Port0 on pin 32 to the pin 39. Port 0, a port I / O 8-bit open drain bidirectional. As a port, each pin can control 8 TTL inputs. When logic “1” is written to port 0, then port can be used as input with high impedance. Port 0 can also be configured for multiplexing the address / data bus for accessing program memory or external data. In this mode P0 must have pull-ups.
Port1pada pin 1 to pin 8. Port 1 is an I / 0 8-bit bidirectional with internal pull-up. Buffer output port 1 can control four TTL inputs. When logic “1” is written to the port 1, then this port will get the internal pull-up and can be used as input. Port 1 also receives the low byte address during Flash programming and verification.
Port Pin Alternate Function as ISP pin, pin 6 to pin 8
P1.5 MOSI (used for In System Programming)
P1.6 MISO (used for In System Programming)
P1.7 SCK (used for In System Programming)
Port2 pin 21 to the pin 28. Port 2 is a port I / O 8-bit bidirectional with internal pull-up. Buffer output port 2 can control four TTL inputs. When logic “1” is written to port 2, then this port will get the internal pull-up and can be used as input.
Port3 pin 10 to the pin 17 .Port 3 is a port I / O 8-bit bidirectional with internal pull-up. Buffer output port 3 can control four TTL inputs. When logic “1” is written to the port 3, then this port will get the internal pull-up and can be used as input. Port 3 also serve various special features, as shown in the following table:
RST on pin 9. Input Reset. High logic “1” on this pin for two machine cycles while the oscillator works then it will reset devais.
ALE / PROG on 30.Address pin Latch Enable (ALE) is a pulse output to lock low byte of the address for accessing the external memory. This pin is also the programming pulse input during flash programming (parallel). In normal operation, ALE issued a constant rate of 1/6 of osiilator frequency and can be used for external timer.
PSEN pin 29.Program Store Enable is the read strobe to external program memory.
EA / VPP at pin 31. External Access Enable. EA must be connected to GND to enable devais, to access external program memory starting address 0000H s / d FFFFh. EA should be connected to VCC for internal program memory access. This pin also receive programming voltage (VPP) during Flash programming. Remember EA = 0 then the external program, but if EA = 1 on this pin if we just use the existing internal program on the microcontroller it will be used in the on-chip flash program
XTAL1 pin 19.Input for inverting oscillator amplifier and input to the internal clock circuit
2at XTAL pin 18.Output of inverting oscillator amplifier.