MCS51 microcontroller internal structure block diagram and pin diagram

Crystal Oscillator
Quartz Oscillator 3225 20M OSC

1. MCS-51 Microcontroller Internal Structure Block Diagram

2. MCS-51 Pin Diagram

3. Pin Description
VCC (Pin 40): Connects to the positive terminal of the +5V power supply.
VSS (Pin 20): Connects to the ground of the +5V power supply.
XTAL1 (Pin 19): This pin is connected to one end of an external quartz crystal. Inside the microcontroller, it serves as the input to an inverting amplifier that forms the on-chip oscillator. When an external clock is used, this pin is grounded for HMOS microcontrollers, while for CHMOS microcontrollers, it acts as the input for the external oscillator signal.
P0 Port (Pins 39–32): P0.0–P0.7 collectively form the P0 port. When no external memory or I/O expansion is connected, it functions as a quasi-bidirectional I/O port. When external memory or expanded I/O is used, the P0 port is time-multiplexed into the lower 8-bit address bus and a bidirectional data bus.
P1 Port (Pins 1–8): P1.0–P1.7 collectively make up the P1 port, which can be used as a quasi-bidirectional I/O port. For the 52 sub-series, P1.0 and P1.1 have secondary functions: P1.0 can act as the count pulse input (T2) for Timer/Counter 2, and P1.1 can serve as the external control input (T2EX) for Timer/Counter 2.
P2 Port (Pins 21–28): P2.0–P2.7 form the P2 port, typically used as a quasi-bidirectional I/O port. When connected to external memory or extended I/O with an addressing range exceeding 256 bytes, the P2 port functions as the upper 8-bit address bus.
P3 Port (Pins 10–17): P3.0–P3.7 collectively make up the P3 port. In addition to being used as a quasi-bidirectional I/O port, each pin can also be configured for a secondary function. The secondary functions of the P3 port are detailed in Table 2.1.

KW4-Dustproof Miniature Micro Switch

Features

â—† Inner Housing tunnel design, silicone ring sealing design, stable
sealing IP60.
â—† Small Compact Size,Safety Approvals.
â—† Long life & high reliability.
â—† Wide Range of wires Terminals.
â—† Variety of Levers.
â—† Suit of harsh environment applications, Such as vacuum cle

Wireless Micro Switch,Micro Touch Switch,Ip60 Dustproof Switch,Dustproof Miniature Micro Switch

Ningbo Jialin Electronics Co.,Ltd , https://www.donghai-switch.com