Circuit and method for indicating single chip microcomputer in wake-up stop state by using phase-locked loop locking

文档序号:833182 发布日期:2021-03-30 浏览:18次 中文

阅读说明:本技术 用锁相环锁定指示唤醒停止状态下的单片机的电路和方法 (Circuit and method for indicating single chip microcomputer in wake-up stop state by using phase-locked loop locking ) 是由 杨康 范麟 游骁斐 孟云 辛伟 王冬梅 于 2020-12-11 设计创作,主要内容包括:本发明公开了一种用锁相环锁定指示唤醒停止状态下的单片机的电路和方法;一种通过锁相环锁定指示唤醒停止状态下的单片机的方法,其特征在于:该方法包括步骤A、将锁相环的锁定指示脚连接单片机的普通I/O口,并通过电容连接单片机的复位脚,将单片机的复位脚通过电阻接电源二,将锁相环的配置接口管脚连接单片机的另一个普通I/O口或者SPI接口;步骤B、初始上电时,电源二通过电阻对电容进行充电,单片机复位脚由低电平变成高电平,完成上电复位启动;步骤C、单片机初始化状态,单片机对锁相环进行初始化配置;步骤D、单片机进入停止状态;步骤E、锁相环失锁状态:电源二通过电阻对电容进行充电,重新唤醒完全停止工作的单片机;本发明可广泛用于电子、通讯等领域。(The invention discloses a circuit and a method for indicating a singlechip in a wake-up stop state by using a phase-locked loop; a method for waking up a singlechip in a stop state through a phase-locked loop locking indication is characterized by comprising the steps of A, connecting a locking indication pin of the phase-locked loop with a common I/O port of the singlechip, connecting a reset pin of the singlechip through a capacitor, connecting the reset pin of the singlechip with a second power supply through a resistor, and connecting a configuration interface pin of the phase-locked loop with another common I/O port or an SPI (serial peripheral interface) of the singlechip; step B, when the power is initially powered on, the second power supply charges the capacitor through the resistor, and the reset pin of the single chip microcomputer is changed from a low level to a high level to complete power-on reset starting; step C, initializing the state of the single chip microcomputer, and performing initialization configuration on a phase-locked loop by the single chip microcomputer; step D, the single chip microcomputer enters a stop state; step E, the phase-locked loop is in a loss-of-lock state: the second power supply charges the capacitor through the resistor and wakes up the singlechip which completely stops working again; the invention can be widely used in the fields of electronics, communication and the like.)

1. A method for locking and indicating a singlechip in a wake-up stop state by using a phase-locked loop is characterized by comprising the following steps:

step A, connecting a locking indication pin of a phase-locked loop (1) with a common I/O port of a single chip microcomputer, connecting a reset pin of the single chip microcomputer (2) through a capacitor (C1), connecting the reset pin of the single chip microcomputer (2) with a second power supply through a resistor (R1), and connecting a configuration interface pin of the phase-locked loop (1) with another common I/O port or an SPI port of the single chip microcomputer;

step B, during initial power-on, a phase-locked loop (1) locks an indication pin and keeps low level, a single chip microcomputer (2) resets the pin and keeps low level at the initial power-on, and a power supply II charges a capacitor (C1) through a resistor (R1); after a certain time, the reset pin of the single chip microcomputer is changed from low level to high level to complete power-on reset starting;

step C, initializing the state of the single chip microcomputer: after the single chip microcomputer is started by power-on reset, the single chip microcomputer carries out initialization configuration on a phase-locked loop, the single chip microcomputer detects whether a locking indication pin of the phase-locked loop is at a high level or not through a common I/O port, if the locking indication pin is not at the high level, the phase-locked loop is unlocked, the single chip microcomputer carries out initialization configuration on the phase-locked loop repeatedly until the locking indication pin of the phase-locked loop is changed from the low level to the high level, and the phase-locked; in this state, the reset pin of the singlechip keeps high level all the time, and the singlechip keeps normal operation;

step D, the single chip microcomputer enters a stop state: after the single chip microcomputer completes the initial configuration of the phase-locked loop, the single chip microcomputer enters a complete stop working state, all internal clocks stop working, and the single chip microcomputer cannot be awakened by any interruption;

step E, the phase-locked loop is in a loss-of-lock state: when a certain abnormal condition causes the phase-locked loop to lose the lock, the locking indication pin of the phase-locked loop becomes low level, and the low level enables the voltage of a capacitor (C1) to be rapidly released, so that the reset pin of the single chip microcomputer becomes low level; the second power supply charges a capacitor (C1) through a resistor (R1), and after a certain time, the reset pin of the single chip microcomputer becomes high level, so that the single chip microcomputer which completely stops working is awakened again; after the single chip microcomputer is reset, the phase-locked loop which is out of lock is configured again, the phase-locked loop is locked again, and then the single chip microcomputer enters a work stopping state again.

2. A circuit for indicating a singlechip in a wake-up stop state by using a phase-locked loop lock comprises a phase-locked loop (1) and a singlechip (2); the method is characterized in that: a locking indication pin of the phase-locked loop (1) is connected with a common I/O port of the singlechip and is connected with a reset pin of the singlechip (2) through a capacitor (C1), the reset pin of the singlechip (2) is connected with a second power supply through a resistor (R1), and a configuration interface pin of the phase-locked loop (1) is connected with another common I/O port or an SPI port of the singlechip; when the power is initially powered on, the second power supply charges a capacitor (C1) through a resistor (R1), so that a reset pin of the single chip microcomputer is changed from a low level to a high level, the single chip microcomputer completes power-on reset starting, after the single chip microcomputer completes the power-on reset starting, the single chip microcomputer performs initialization configuration on a phase-locked loop until a locking indication pin of the phase-locked loop is changed from the low level to the high level, the phase-locked loop is locked, and after the phase-locked loop is locked, the single chip microcomputer enters a complete stop working state; when a certain abnormal condition causes the phase-locked loop to lose lock, the locking indication pin of the phase-locked loop becomes low level at the moment, the voltage of the capacitor (C1) is released rapidly, so that the reset pin of the single chip microcomputer becomes low level, the capacitor (C1) is charged by the power supply II through the resistor (R1), and after a certain time, the reset pin of the single chip microcomputer becomes high level from low level, so that the single chip microcomputer which stops working completely is awakened again, the reset of the single chip microcomputer is completed, and the phase-locked loop which loses lock is configured again.

Technical Field

The invention relates to a phase-locked loop, in particular to a circuit and a method for locking and indicating a single chip microcomputer in a wake-up stop state by using the phase-locked loop.

Background

Frequency synthesis by pll chips is the most common frequency synthesis method, and almost all pll chips require external digital circuits for code allocation. In a dot-frequency source phase-locked loop circuit, a phase-locked loop chip and a single chip microcomputer are generally integrated at the same time. The method comprises the steps of initially configuring a phase-locked loop chip at the beginning of electrifying a single chip microcomputer, and then judging whether a phase-locked loop is locked or not by monitoring a locking instruction of the phase-locked loop. When the single chip monitors that the phase-locked loop is unlocked (the locking indication is low level), the single chip retransmits code configuration to the phase-locked loop to realize reliable locking of the phase-locked loop. Because the phase-locked loop needs the singlechip to monitor whether the lock is lost or not in real time, the singlechip needs to work all the time, and the power consumption of the whole circuit is increased. In miniaturized circuits, the operational clock of the single-chip may also cause spurious degradation of the synthesized rf signal. The existing point frequency source phase-locked loop circuit generally adopts two modes: one is that the single-chip microcomputer is always in a working state, which will increase the power consumption of the whole circuit, and in a high-integration micro-assembly product, the single-chip microcomputer without complete stop of working is easy to cause stray deterioration of a synthesized radio frequency signal; one is that after the singlechip is electrified and initialized, the singlechip enters a dormant state, but the level interrupts the circuit to work. After the phase-locked loop loses the lock, the singlechip is awakened through the locking indication low level. Although most of the power consumption of the single chip microcomputer can be reduced by the mode, the single chip microcomputer cannot completely stop working (a level interruption detection circuit cannot be closed) all the time. In a high integration degree micro-assembly product, a single chip microcomputer needs to be close to a phase-locked loop, and stray deterioration of a synthesized radio frequency signal can be caused. In summary, in the pll circuit of the point-frequency source, a circuit that can wake up the mcu completely in the stop state through the pll lock instruction is needed.

Disclosure of Invention

Aiming at the defects in the prior art, the invention provides a circuit and a method for waking up a singlechip in a stop state by using a phase-locked loop locking indication.

The invention adopts the technical scheme that a method for waking up a singlechip in a stop state through phase-locked loop locking indication is characterized by comprising the following steps:

step A, connecting a locking indication pin of a phase-locked loop with a common I/O port of a singlechip, connecting a reset pin of the singlechip through a capacitor, connecting the reset pin of the singlechip with a power supply II through a resistor, and connecting a configuration interface pin of the phase-locked loop with another common I/O port or an SPI (serial peripheral interface) port of the singlechip;

step B, during initial power-on, the phase-locked loop locking indication pin keeps low level, the single chip microcomputer reset pin keeps low level at the initial power-on, and the power supply II charges the capacitor through the resistor; after a certain time, the reset pin of the single chip microcomputer is changed from low level to high level to complete power-on reset starting, and the power-on reset time adjusts the value of the capacitor through the resistor.

Step C, initializing the state of the single chip microcomputer: after the single chip microcomputer is started by power-on reset, the single chip microcomputer carries out initialization configuration on a phase-locked loop, then the single chip microcomputer detects whether a locking indication pin of the phase-locked loop is at a high level or not through a common I/O port, if the locking indication pin is not at the high level, the phase-locked loop is unlocked, the single chip microcomputer carries out initialization configuration on the phase-locked loop repeatedly until the locking indication pin of the phase-locked loop is changed from the low level to the high level, and the phase-locked; the level state of the single chip microcomputer reset pin cannot be changed in the state, the single chip microcomputer reset pin keeps a high level all the time, and the single chip microcomputer keeps working normally.

Step D, the single chip microcomputer enters a stop state: when the single chip microcomputer completes the initial configuration of the phase-locked loop, namely the single chip microcomputer detects that the phase-locked loop is locked, the single chip microcomputer enters a complete work stop state, all internal clocks stop working, and the single chip microcomputer cannot be awakened by any interruption; at the moment, the current of the single chip microcomputer keeps the lowest value, and the single chip microcomputer cannot have any interference on a synthetic signal of the phase-locked loop due to stopping of all clocks; however, due to the characteristics of the single chip microcomputer, the single chip microcomputer can be reset again through the reset pin of the single chip microcomputer under the condition that the single chip microcomputer completely stops working, and the single chip microcomputer starts to operate again.

Step E, the phase-locked loop is in a loss-of-lock state: when the phase-locked loop is unlocked under a certain abnormal condition, the locking indication pin of the phase-locked loop is changed into a low level at the moment, the low level can enable the voltage of the capacitor to be quickly released, so that the reset pin of the single chip microcomputer is changed into the low level, meanwhile, the capacitor is slowly charged by the second power supply through the resistor, and after a certain time, the reset pin of the single chip microcomputer is changed into the high level from the low level; the singlechip which completely stops working is awakened again, and after the singlechip is awakened again, the phase-locked loop which loses lock is configured again to realize the re-locking of the phase-locked loop, and then the singlechip enters the working stop state again. The whole process realizes perfect closed loop.

A circuit for waking up a singlechip in a stop state through phase-locked loop locking indication comprises a phase-locked loop and the singlechip; the method is characterized in that: a locking indication pin of the phase-locked loop is connected with a common I/O port of the singlechip and is connected with a reset pin of the singlechip through a capacitor, the reset pin of the singlechip is connected with a second power supply through a resistor, and a configuration interface pin of the phase-locked loop is connected with another common I/O port or an SPI (serial peripheral interface) of the singlechip; when the power is initially powered on, the second power supply charges the capacitor through the resistor, so that the reset pin of the single chip microcomputer is changed from a low level to a high level, the single chip microcomputer completes power-on reset starting, after the single chip microcomputer completes power-on reset starting, the single chip microcomputer performs initialization configuration on the phase-locked loop until the locking indication pin of the phase-locked loop is changed from the low level to the high level, the phase-locked loop is locked, and after the phase-locked loop is locked, the single chip microcomputer enters a complete stop working state; when the phase-locked loop is unlocked under a certain abnormal condition, the locking indication pin of the phase-locked loop is changed into low level at the moment, the voltage of the capacitor is quickly released, so that the reset pin of the single chip microcomputer is changed into low level, meanwhile, the capacitor is slowly charged by the second power supply through the resistor, and after a certain time, the reset pin of the single chip microcomputer is changed into high level; and the singlechip which completely stops working is awakened again, and the phase-locked loop which loses lock is reconfigured after the singlechip is awakened again.

The circuit and the method for locking and indicating the singlechip in the wake-up stop state by using the phase-locked loop have the advantages that: the invention can ensure the reliable locking of the phase-locked loop, and can reduce the power consumption of the singlechip and the interference thereof to the phase-locked loop to the minimum, and simultaneously does not influence the normal power-on reset of the singlechip, thereby solving the problem of high power consumption of the singlechip in a dot frequency source phase-locked loop circuit, simultaneously completely eliminating the problem of stray deterioration of a synthesized radio frequency signal caused by the fact that the singlechip cannot completely stop working, almost reducing the power consumption of the singlechip in the circuit to zero, and completely eliminating the stray introduced by the singlechip, and having the advantages of stable and reliable circuit, low power consumption, excellent stray and low cost: can be widely used in the fields of electronics, communication and the like.

Drawings

FIG. 1 is a schematic block diagram of a circuit of a single chip microcomputer in a wake-up stop state indicated by a phase-locked loop lock according to the present invention.

Detailed Description

Embodiment 1, referring to fig. 1, a method for instructing to wake up a single chip in a stopped state by locking a phase-locked loop includes:

step A, connecting a locking indication pin of a phase-locked loop 1 with a common I/O port of a singlechip, connecting a reset pin of the singlechip 2 through a capacitor C1, connecting the reset pin of the singlechip 2 with a second power supply through a resistor R1, and connecting a configuration interface pin of the phase-locked loop 1 with another common I/O port or an SPI port of the singlechip;

step B, during initial power-on, the phase-locked loop 1 locks the indication pin to keep low level, the single chip microcomputer 2 reset pin keeps low level at the initial power-on, and the power supply II charges the capacitor C1 through the resistor R1; after a certain time, the reset pin of the single chip microcomputer is changed from low level to high level to complete power-on reset starting, and the power-on reset time adjusts the value of the capacitor C1 through the resistor R1.

Step C, initializing the state of the single chip microcomputer: after the single chip microcomputer is started by power-on reset, the single chip microcomputer carries out initialization configuration on a phase-locked loop, then the single chip microcomputer detects whether a locking indication pin of the phase-locked loop is at a high level or not through a common I/O port, if the locking indication pin is not at the high level, the phase-locked loop is unlocked, the single chip microcomputer carries out initialization configuration on the phase-locked loop repeatedly until the locking indication pin of the phase-locked loop is changed from the low level to the high level, and the phase-locked; the level state of the single chip microcomputer reset pin cannot be changed in the state, the single chip microcomputer reset pin keeps a high level all the time, and the single chip microcomputer keeps working normally.

Step D, the single chip microcomputer enters a stop state: when the single chip microcomputer detects that the phase-locked loop is locked, the single chip microcomputer enters a complete work stop state, all internal clocks stop working, and the single chip microcomputer cannot be awakened by any interruption; at the moment, the current of the single chip microcomputer keeps the lowest value, and the single chip microcomputer cannot have any interference on a synthetic signal of the phase-locked loop due to stopping of all clocks; however, due to the characteristics of the single chip microcomputer, the single chip microcomputer can be reset again through the reset pin of the single chip microcomputer under the condition that the single chip microcomputer completely stops working, and the single chip microcomputer starts to operate again.

Step E, the phase-locked loop is in a loss-of-lock state: when the reference power of the phase-locked loop is unstable under certain abnormal conditions, the VCO section needs to be recalibrated under high and low temperatures and the like, the phase-locked loop is unlocked, at the moment, the locking indication pin of the phase-locked loop becomes low level, the low level can enable the voltage of the capacitor C1 to be quickly released, so that the reset pin of the single chip microcomputer becomes low level, meanwhile, the power supply II slowly charges the capacitor C1 through the resistor R1, and after a certain time, the reset pin of the single chip microcomputer becomes high level; therefore, the singlechip which completely stops working is awakened again, the phase-locked loop which is unlocked is reconfigured after the singlechip is reset, the phase-locked loop is locked again, and then the singlechip enters the working stop state again. The whole process realizes perfect closed loop.

Embodiment 2, a circuit for waking up a single chip microcomputer in a stopped state by a phase-locked loop locking indication, includes a phase-locked loop 1 and a single chip microcomputer 2; the locking indication pin of the phase-locked loop 1 is connected with a common I/O port of the single chip microcomputer and is connected with a reset pin of the single chip microcomputer 2 through a capacitor C1, the reset pin of the single chip microcomputer 2 is connected with a power supply II through a resistor R1, and meanwhile, a configuration interface pin of the phase-locked loop 1 is connected with another common I/O port or an SPI port of the single chip microcomputer; when the power is initially powered on, the second power supply charges the capacitor C1 through the resistor R1, so that the reset pin of the single chip microcomputer is changed from low level to high level, the single chip microcomputer completes power-on reset starting, after the single chip microcomputer completes power-on reset starting, the single chip microcomputer performs initialization configuration on a phase-locked loop until the locking indication pin of the phase-locked loop is changed from low level to high level, the phase-locked loop is locked, and after the phase-locked loop is locked, the single chip microcomputer enters a complete stop working state; when the phase-locked loop is unlocked under a certain abnormal condition, the locking indicating pin of the phase-locked loop is changed into low level at the moment, the voltage of the capacitor C1 is quickly released, so that the reset pin of the single chip microcomputer is changed into low level, meanwhile, the capacitor C1 is slowly charged by the power supply II through the resistor R1, and after a certain time, the reset pin of the single chip microcomputer is changed into high level; therefore, the singlechip which completely stops working is awakened again, and the phase-locked loop which loses lock is reconfigured after the singlechip is reset.

The invention realizes the single chip microcomputer which can be reset and stop working through the locking indication of the phase-locked loop with extremely low cost. The circuit is stable and reliable, the reliable locking of the phase-locked loop can be ensured, the power consumption of the singlechip and the interference of the singlechip on the phase-locked loop are reduced to the minimum, and meanwhile, the normal power-on reset of the singlechip is not influenced by the circuit. The circuit is verified to be widely used in a dot frequency source phase-locked loop circuit.

While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种导航增强系统的高精度时频基准源

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类