1. Most of the I/O ports of 51 MCU are quasi-bidirectional ports. During reset, all ports output high level. The input and output operations of the ports are also directly performed through the address of the I/O port. The I/O ports of AVR are standard bidirectional ports. During reset, all ports are in the input state without pull-up resistors (high impedance state, the pin level is completely determined by the external circuit), which is very useful in situations where the reset state is emphasized. Each port of AVR corresponds to three addresses, namely DDRX, PORTX and PINX.
DDRX is the port direction register. When a certain position of DDRX is set to 1, the pin of the corresponding port is used as an output; when a certain position of DDRX is cleared to 0, the pin of the corresponding port is used as an input. PORTX is the port data register. When the pin is used as an output, the data of PORTX is output by the corresponding pin; when the pin is used as an input, the data of PORTX determines whether the pull-up function of the pin of the corresponding port is turned on. PINX is the input pin address of the corresponding port. If you want to read the logic level value of the corresponding pin, you must read PINX instead of PORTX.
2. There are two basic usages of the timer/counter of the 51 single-chip microcomputer, namely, the timer working mode with the 12-frequency signal of the crystal frequency as the input, or the counter working mode with the input signal on the external pins INT0 and INT1. When the AVR timer/counter is used as a timer, its input signal can be selected as a frequency-divided signal of the crystal frequency, and the frequency-dividing ratio is 1, 8, 64, 256, and 1024. When used as a counter, it can be triggered by either the rising edge or the falling edge.
3. The 51 MCU has 6 interrupt sources (5 interrupt entry addresses), which are divided into two priorities. The IE register controls the interrupt enable and the IP controls the interrupt priority. The AVR has different numbers of interrupt sources according to different MCUs.
4. The baud rate generation of the 51 single-chip microcomputer Kawaguchi communication requires the use of a timer, and the supported baud rate is relatively low. The AVR single-chip microcomputer can have a higher baud rate, up to 115200bps. And it has a dedicated baud rate generator.
Previous article:Hardware Design of Digital Sensor System Based on C8051F060 MCU
Next article:What is 51 single chip microcomputer?
Recommended ReadingLatest update time:2024-11-16 16:45
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Fundamentals and Applications of Single Chip Microcomputers (Edited by Zhang Liguang and Chen Zhongxiao)
- Single chip microcomputer control technology (Li Shuping, Wang Yan, Zhu Yu, Zhang Xiaoyun)
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
- How to edit old posts?
- Failed to add serial port devices uart3-uart5 to the kernel
- micropython update: 2020.4
- [Fudan Micro FM33LG0 Series Development Board Review] Fudan Microchip uses J-Scope waveform software to accelerate product development
- How to make a circle of vias regularly?
- VTran reveals how to improve the accuracy of geomagnetic vehicle inspections
- Use of isolation amplifier chip ISO124P
- Boost and buck-boost DC-DC converters help wireless charging designs
- I never dared to think about not adding return vias before!
- [Power amplifier case] Do you know what a nanogenerator is? High voltage and wireless drive applications of LEDs in capacitors