18, 19, clock pin
(1) XTAL1 (pin 19): A pin connected to an external crystal. Inside the microcontroller, it is the input of the inverting amplifier. This amplifier forms the on-chip oscillator. If an external crystal oscillator is used, this pin should be grounded.
(2) XTAL2 (pin 18): Connected to the other end of the external crystal, and connected to the output of the internal inverting amplifier inside the microcontroller. If an external crystal oscillator is used, this pin receives the oscillator signal, that is, directly connects this signal to the input of the internal clock generator.
29. PSEN (pin 29)
1. When the internal ROM is read, PSEN does not work;
2. When reading from external ROM, it will act twice in each machine cycle. However, during this period, whenever the external data memory is accessed, these two valid PSEN signals will not appear;
3. When reading from external RAM, two PSEN pulses are skipped and will not be output;
4. When connecting to an external ROM, connect it to the OE pin of the ROM.
30, ALE/PROG (pin 30)
31, EA/VPP (pin 31)
Input/output (I/O) pins P0, P1, P2, P3 (32 in total)
1. P0 port (pin 39 to pin 32): It is a bidirectional 8-bit three-state I/O port. When connected to an external memory, it is multiplexed with the lower 8 bits of the address bus and the data bus, and can drive 8 LS-type TTL loads by absorbing current.
2. P1 port (pin 1 to pin 8): It is a quasi-bidirectional 8-bit I/O port. Since this interface output does not have a high-impedance state and the input cannot be latched, it is not a true bidirectional I/O port. P1 port can drive (absorb or output current) 4 LS-type TTL loads. For 8052 and 8032, the second function of the P1.0 pin is the external input of the T2 timer/counter, and the second function of the P1.1 pin is the T2EX capture and reload trigger, that is, the external control terminal of T2. When programming and verifying the EPROM, it receives the lower 8-bit address.
3. Port P2 (pins 21 to 28): It is a quasi-bidirectional 8-bit I/O port. When accessing external memory, it can be used as the high 8-bit address bus of the expansion circuit to send out the high 8-bit address. During EPROM programming and program verification, it receives the high 8-bit address. P2 can drive (absorb or output current) 4 LS-type TTL loads.
4. P3 port (pins 10 to 17): It is a quasi-bidirectional 8-bit I/O port. In MCS-51, these 8 pins are also used for special functions and are multiplexed dual-function ports. P3 can drive (absorb or output current) 4 LS-type TTL loads.
When used as the first function, it is used as a normal I/O port, and its functions and operation methods are the same as those of the P1 port.
When used as the second function, the definition of each pin is shown in the table.
Table P3 Second function definition of each port line
Port pin second function
P3.0 10 RXD (serial input port)
P3.1 11 TXD (serial output port)
P3.2 12 INT0 (external interrupt 0)
P3.3 13 INT1 (external interrupt 1)
P3.4 14 T0 (Timer 0 external input)
P3.5 15 T1 (Timer 1 external input)
P3.6 16 WR (external data memory write pulse)
P3.7 17 RD (external data memory read pulse)
The conditions for making each line of P3 terminal in the second function
1. Serial I/O is in operation (RXD, TXD);
2. Enable the external interrupts (INT0, INT1);
3. The timer/counter is in external counting state (T0, T1);
4. Execute the instructions for reading and writing external RAM (RD, WR).
Port load capacity
Previous article:The benefits of using C language in microcontrollers
Next article:ATMEL9263 800*600 screen driver problem
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWorld invites you to disassemble (fifth issue): Sunflower P1 power strip disassembly (part 1)
- 【Speech recognition positioning】PCB design and proofing of microphone array
- FPGA design and practice_synchronous design and risc_cpu
- Application of FPGA in speech storage and playback system.docx
- Universal relay contact protection circuit, you may have the same doubts, the relay will be useless after 10,000 actions. If you want to...
- STM8S003 program occasionally disappears
- Huawei PCB Design Specifications
- LM358 board test results are different from simulation
- [NXP Rapid IoT Review] Easy to use
- MSP430F5438A Wireless Upgrade