MCU clock system
One is the internal clock oscillation mode, which requires a quartz crystal and an oscillation capacitor to be connected between the XTAL1 and XTAL2 pins; the other is the external clock mode, which requires XTAL1 to be grounded and the external clock signal to be introduced from the XTAL2 pin.
Machine cycle and instruction cycle
Machine cycle: The basic operation cycle of a single-chip microcomputer. Each machine cycle contains 6 states: S1, S2, S3, ... S6. Each state contains two beats, P1 and P2. Each beat is a clock cycle (oscillation cycle). That is, a machine cycle contains 12 clock cycles, which can be expressed as S1P1, S1P2, S2P1, ... S6P1, S6P2 in sequence.
Oscillation period = 1 second / crystal frequency, so the machine cycle of the microcontroller = 12 seconds / crystal frequency
Instruction cycle: When a computer is working, it constantly fetches and executes instructions. The time required to fetch an instruction and execute it is called an instruction cycle. Different instruction cycles have different durations. Most instruction cycles consist of one or two machine cycles. Only multiplication and division instructions require four machine cycles.
Reset
Today's single-chip microcomputers cannot guarantee that they will not crash. When the program is executed abnormally or the machine needs to be reset, the reset operation clock circuit is required. When the external circuit causes the RST terminal to have a high level for more than two cycles, the system is reset internally.
After reset, the microcontroller
Previous article:MCU Basics (II): Working Principle of MCU Parallel I/O Port
Next article:MCU Basics (V): Working Principle and Mode of Timer/Counter
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- EEWORLD University ---- Building Block DAC: System Thinking Method
- Single package six-channel digital isolator and IPM interface reference design for inverter
- [Silicon Labs Development Kit Review] + Building Simplicity Studio Development Environment
- Tiger Wish: Make a wish for 2022, usher in good luck in the new year, and take away the EEWorld New Year gift~
- Live broadcast tonight at 20:00 [Developing AI intelligent robots based on TI's newly released Robotics SDK] Admission at 19:30
- 【Short-term weather forecast system】v0.0.1 implementation
- Talk about the serial port RS485 interface of MSP430F149
- First release, unboxing post? All the boards I applied for were received~
- Various short-range wireless communication technologies
- Sincerely recruit fire protection engineers