Senin, 02 Mei 2011
Is the output of Atmel AT89C51 microcontroller with 4K bytes Flash PEROM (Erasable and Programmable Read Only Memory). AT89C51 have the system re-programming Flash memory with write endurance of 1000 times the erase. This memory is used to store standard command MCS51 microcontroller allowing it to work in single chip operation mode (single-chip operation) which does not require external memory (external memory) to store the source code. Here is a picture foot structure and block diagram of microcontroller AT89C51
Figure 1: The name Pin-pin AT89C51 If we see a block diagram of this microcontroller, it was apparent perfection of the facilities it provides. Figure 2 is a block diagram of the IC
Figure 2: Block diagram of IC AT89C51 In the figure above shows that there are 4 output ports to input data, and is also available accumulator, registers, RAM, stack pointer, Arithmetic Logic Unit (ALU), lock (latch) and a series of oscillations that make 89C51 can operate only with 1-chip IC. This microcontroller AT89C51 Pin has 32 I / O ports are divided into 4 port 8-lane I / O. Here is an explanation of each IC pin microcontroller AT89C51: 1) Pin 1 to 8 (Port 1) Port 1 is Port I / O bi-directional which is equipped with an internal pullup. Port 1 output buffers are able to provide / absorb the current four TTL inputs. The legs Port 1 will be pulled high by internal pullup so that it can be used as input. As an input, if the legs of Port 1 is connected to ground (pull low), then each leg will provide in-stream since pulled high internally. Port 1 also receives the lower address (low byte) for charging the program and verify flash (Agfianto Eko Putra, 2004: 90). 2) Pin 9 (RST) Reset will be active by providing input high for 2 cycles. 3) Pin 10 to 17 (Port 3) Port 3 is I / O ports with dual-direction has an internal pullup. Port output buffer 3 is able to provide / absorb the current four TTL inputs. The legs of Port 3 will be in the pulled high by internal pullup so that it can be used as input. As an input, if the legs of Port 3 is connected to ground (in the low-pull), then each leg will provide in-stream since pulled high internally. Table 1. Special Functions The legs are 3 feet Port Port P3.0 Alternate Functions RXD (serial input port) P3.1 TXD (serial output port) P3.2 INT0 (external interrupt 0) P3.3 INT1 (external interrupt 1) P3 .4 T0 (timer 0 external input) P3.5 T1 (timer 1 external input) WR P3.6 (write to external data memory) P3.7 RD (read from external data memory) 4) Pin 18 (XTAL 2) Pin This is the oscillator output. 5) Pin 19 (XTAL 1) This pin is the oscillator input. 6) Pin 20 (GND) is connected to Ground. 7) Pin 21 to 28 (port 2) Port 2 is the port I / O bi-directional equipped with an internal pullup. Port 2 output buffers are able to provide / absorb the current four TTL inputs. The legs Port 2 will be in the pulled high by internal pullup so that it can be used as input. As an input, if the legs of Port 2 is connected to ground (in the low-pull), then each leg will provide in-stream since pulled high internally. Port 2 will provide the high-byte address (high byte) for taking instructions from external program memory and during accesses to external data memory that use 16-bit command with the address (example: MOVX @ DPTR). In this application, if you want to send a "1", then used an internal pullup is provided. During accesses to external data memory that use 8-bit command with the address (example: MOVX @ R1), Port 2 will send the contents of the Shift Register Function Port 2. Port 2 also receives the address high during programming and verification (Agfianto Eko Putra, 2004: 90). 8) Pin 29 (PSEN) Program Store Enable (PSEN) is a pin that functions at the time of executing the program located in external memory. PSEN is active twice per cycle. 9) Pin 30 (ALE) pin can serve as Address Latch Enable is to latch the low byte address when accessing external memory. ALE will be active when accessing external memory. 10) Pin 31 (EA) In conditions of low, this pin will function as an External Access Enable (EA), ie, the microcontroller will run existing programs on an external memory after a system reset. If conditioned high, this pin will function to run existing programs on internal memory. 11) Pin 32 to 39 (Port 0) Port 0 is port output / input (I / 0)-type open-drain bidirectional. As an output port, each leg can absorb the current eight TTL inputs. Port 0 can be used as inputs impedansi high. Port 0 also can be configured as a bus address / data, the low (low byte) during the process of accessing the data memory and external programs. When used in this mode Port 0 has internal pullup but weak. Port 0 also receives the code sent to him during the filling process and remove the program code during program verification process that has been stored in a flash. In this case external pullup required during program verification process Pin 40 (Vcc) is connected to Vcc (+5 Volts).