發(fā)布時間:2021-12-16
When the single chip microcomputer works, it takes out the instructions one by one from the ROM, and then executes them step by step. The time of a single chip microcomputer accessing memory is called the machine cycle, which is a time benchmark The machine cycle includes 12 clock cycles. If the single chip microcomputer selects 12Mhz crystal oscillator, its clock cycle is 1 / 12us, which is also the crystal oscillator cycle. Its machine cycle is 12 (1 / 12) us, that is, 1US.When the single chip microcomputer works, it takes out the instructions one by one from the ROM, and then executes them step by step. The time of a single chip microcomputer accessing memory is called the machine cycle, which is a time benchmark The machine cycle includes 12 clock cycles. If the single chip microcomputer selects 12Mhz crystal oscillator, its clock cycle is 1 / 12us, which is also the crystal oscillator cycle. Its machine cycle is 12 (1 / 12) us, that is, 1US.
Machine cycle is not only important for instruction execution, but also the time benchmark of MCU timer and counter. For example, if the single chip microcomputer selects 12Mhz crystal oscillator, when the timer value increases by 1, the actual elapsed time is 1US, which is the timing principle of the single chip microcomputer.Machine cycle is not only important for instruction execution, but also the time benchmark of MCU timer and counter. For example, if the single chip microcomputer selects 12Mhz crystal oscillator, when the timer value increases by 1, the actual elapsed time is 1US, which is the timing principle of the single chip microcomputer.
Function of single chip microcomputer crystal oscillatorFunction of single chip microcomputer crystal oscillator
The function of single chip microcomputer crystal oscillator is to provide basic clock signal for the system. Usually, a system shares a crystal oscillator, which is convenient for all parts to keep synchronized. In some communication systems, different crystal oscillators are used for fundamental and RF, and the frequency is electronically adjusted to maintain synchronization.The function of single chip microcomputer crystal oscillator is to provide basic clock signal for the system. Usually, a system shares a crystal oscillator, which is convenient for all parts to keep synchronized. In some communication systems, different crystal oscillators are used for fundamental and RF, and the frequency is electronically adjusted to maintain synchronization.
Crystal oscillators are usually used with PLL circuits to provide the clock frequency required by the system. If different subsystems require clock signals of different frequencies, they can be provided by different PLLs connected to the same crystal oscillator.Crystal oscillators are usually used with PLL circuits to provide the clock frequency required by the system. If different subsystems require clock signals of different frequencies, they can be provided by different PLLs connected to the same crystal oscillator.
Under normal working conditions, the absolute accuracy of ordinary crystal oscillator frequency can reach 50 parts per million. Advanced, higher precision. Some crystal oscillators can also adjust the frequency through a certain range of external voltage, which is called voltage controlled oscillator. Crystal oscillator is a kind of crystal that can convert electrical energy and mechanical energy into each other. It works in resonant state and provides stable and accurate single frequency oscillation. Instruction cycleUnder normal working conditions, the absolute accuracy of ordinary crystal oscillator frequency can reach 50 parts per million. Advanced, higher precision. Some crystal oscillators can also adjust the frequency through a certain range of external voltage, which is called voltage controlled oscillator. Crystal oscillator is a kind of crystal that can convert electrical energy and mechanical energy into each other. It works in resonant state and provides stable and accurate single frequency oscillation. Instruction cycle
Instruction cycle is the time required to execute an instruction, which is generally composed of several machine cycles. Different instructions require different machine cycles. For some simple single byte instructions, in the instruction fetch cycle, the instructions are decoded and executed immediately after being fetched into the instruction register, and no other machine cycles are required. For some complex instructions, such as branch instructions and multiplication instructions, two or more machine cycles are required. Generally, the instruction of one machine cycle is called single cycle instruction, and the instruction of two machine cycles is called double cycle instruction. In short, there is no clock cycle without crystal oscillator, program code cannot be executed without clock cycle, and single chip microcomputer cannot work.Instruction cycle is the time required to execute an instruction, which is generally composed of several machine cycles. Different instructions require different machine cycles. For some simple single byte instructions, in the instruction fetch cycle, the instructions are decoded and executed immediately after being fetched into the instruction register, and no other machine cycles are required. For some complex instructions, such as branch instructions and multiplication instructions, two or more machine cycles are required.
Generally, the instruction of one machine cycle is called single cycle instruction, and the instruction of two machine cycles is called double cycle instruction. In short, there is no clock cycle without crystal oscillator, program code cannot be executed without clock cycle, and single chip microcomputer cannot work.