Page 71 - CITS - Electronic Mechanic - TT - 2024
P. 71
ELECTRONICS MECHANIC - CITS
The pin diagram of the 8051 microcontroller is as follows:
1 VCC - This pin provides +5V power supply to the circuit.
2 GND - This pin is connected to the negative terminal of the device to provide 0V supply.
3 XTAL1andXTAL2 - These pins are connected to the external oscillator to provide clock frequency.
4 Reset - This pin is used to reset the microcontroller.
5 Port 1 - This port is a collection of 8 bidirectional pins used for simple input/output operations. These do not
serve any additional purpose.
6 Port 2 - This port is a collection of 8 bidirectional pins used for simple input/output operations. These do not
serve any additional purpose.
7 Port 3 - This is a collection of 8 bidirectional Pins. These act as higher-order address bytes whenever an
additional external memory is interfaced with the 8051 microcontrollers.
8 Port 4 - This port is a collection of 8 bidirectional pins. These pins are used to provide functionality like Interrupts,
Timer input, control signals and serial communication.
9 INT0 - This pin is used as a trigger to Interrupt External 0.
10 INT1 - This pin is used as a trigger for external interrupt 1.
11 T0 - This pin is used as external Timer 0.
12 T1 - This pin is used as external Timer 1.
13 WR - This pin gives the write signal for external memory.
14 RD - This pin gives the read signal for external memory.
15 ALE - This pin gives the signal to enable the latch to get the address for the external memory.
16 PSEN - This pin is used to give the signal for accessing the program memory.
17 17-24 - Address bus - These pins transmit address from the microcontroller to the external memory.
18 25-32. Data bus - These pins transmit data from the microcontroller to the internal memory.
19 RST - This pin gives the signal that the microcontroller is being reset.
20 EA - This pin is used for selecting the program memory.
21 VPP - This pin is used in programming and configuration of the microcontroller.
22 36-39. XTAL - These pins are connected to the oscillator to provide clock frequency.
23 P1.0 (AD0) – P1.7 (AD7) - These pins are used to interface external devices with the microcontroller.
8051 Memory Organization
The 8051 microcontroller’s memory is divided into Program Memory and Data Memory. Program Memory (ROM)
is used for permanent saving program being executed, while Data Memory (RAM) is used for temporarily storing
and keeping intermediate results and variables.
Program Memory (ROM)
Program Memory (ROM) is used for permanent saving program (CODE) being executed. The memory is read
only. Depending on the settings made in compiler, program memory may also be used to store a constant variable.
The 8051 executes programs stored in program memory only. code memory type specifier is used to refer to
program memory.
8051 memory organization allows external program memory to be added.
How does the microcontroller handle external memory depends on the pin EA logical state.
Internal Data Memory
Up to 256 bytes of internal data memory are available depending on the 8051 derivatives. Locations available to
the user occupy addressing space from 0 to 7Fh, i.e. first 128 registers and this part of RAM is divided into several
56
CITS : E & H - Electronics Mechanic - Lesson 34 - 42