The real-time clock low power consumpting controling circuit that SOC(system on a chip) is realized
Technical field
The present invention relates to a kind of real-time timepiece control circuit, relate in particular to the real-time clock low power consumpting controling circuit that a kind of SOC(system on a chip) is realized.
Background technology
The system of current realization real-time clock control is to realize with microcontroller (MCU) collocation independent real-time clock (RTC) chip.The real-time timepiece chip that this type is independent, majority are built-in with crystal oscillator, multidigit timer conter, and minority is functions such as built-in general-purpose destination memory (RAM), interruption output pin, powered battery pin also, through serial line interface and micro-controller communications.The battery of low capacity when independent real-time timepiece chip moves, only consumes very little energy under non-communication pattern, so just can let chip keep operation for a long time.With micro-controller communications in, can consumption rate bigger energy, will design this moment and replenish certain energy through the electric power system of microcontroller and come, with extending battery life.The connected mode of this type systematic is as depicted in figs. 1 and 2.In Fig. 1, Fig. 2, main system power vd D and independent RTC chip power RTCVDD pass through diode-isolated.
The SOC(system on a chip) of low-power consumption (SOC) is the direction of current chip design.Along with dwindling of semiconductor feature sizes, chip number of transistors purpose increases, and the shared ratio of the power that electric leakage consumed of transistor under off state is increasing, has become the problem that must solve.
Summary of the invention
The objective of the invention is to overcome above-mentioned shortcoming of the prior art, the real-time timepiece control circuit that provides a kind of SOC(system on a chip) to realize.
This real-time timepiece control circuit comprises a RTC who is positioned at same SOC(system on a chip) and is connected through serial line interface with CPU with CPU, and the power module that connects CPU and RTC respectively.
Wherein, the power module that connects CPU and RTC can be same module, and the power module that connects RTC also can be a RTC battery.
Further; When the power module that connects RTC is a RTC battery; The power module that connects RTC battery and CPU is a single-way switch; Said single-way switch by a PMOS manage, the 2nd PMOS pipe, the 3rd PMOS pipe, current-limiting resistance RS1 and current-limiting resistance RS2 form, current-limiting resistance RS1 is connected source electrode and the drain electrode that a PMOS manages respectively with current-limiting resistance RS2, current-limiting resistance RS1 and the other end of current-limiting resistance RS2 are connected the power module of said CPU and RTC respectively; The grid of the one PMOS pipe connects the power module of current-limiting resistance RS2 and said RTC; The source electrode of the 2nd PMOS pipe connects current-limiting resistance RS1, and the drain electrode of the 2nd PMOS pipe connects the source electrode of the 3rd PMOS pipe, and the grid of the 2nd PMOS pipe connects power module and the current-limiting resistance RS2 of said RTC; The drain electrode of the 3rd PMOS pipe connects current-limiting resistance RS2, and the grid of the 3rd PMOS pipe connects power module and the current-limiting resistance RS1 of said CPU.
Real-time timepiece control circuit comprises that further one on the said RTC wakes pin up; One starting module and the 4th PMOS pipe; Said starting module comprises a start button, NPN pipe and two resistance R 1, R2, and said start button links to each other with resistance R 2 with the power module of said CPU of connection and said RTC; Resistance R 2 also links to each other with the base stage of said NPN pipe; Resistance R 1 links to each other with the collector of said NPN pipe and the power module of said CPU of connection and said RTC, and the grid of said the 4th PMOS pipe is connected with the collector of said NPN pipe, and the 4th PMOS pipe also is connected with SOC(system on a chip) with the power module of said CPU of connection and said RTC.
Real-time timepiece control circuit can further include one on the said RTC and wakes pin, a starting module and the 5th PMOS pipe up; Said starting module comprises start button, a NPN pipe and two resistance R 3, R4; Said start button one end ground connection; The other end is connected with resistance R 4, and resistance R 3 links to each other with the power module of said CPU of connection and said RTC, and resistance R 3, R4 link to each other with the collector of said NPN pipe; The grounded emitter of said NPN pipe; Said NPN pipe base stage links to each other with the said pin that wakes up, and said the 5th gate pmos utmost point is connected with the collector of said NPN pipe, and said PMOS pipe also is connected with SOC(system on a chip) with the power module of said CPU of connection and said RTC.
Wherein, said RTC further comprises interface register, internal register, and general RAM, the RTC state machine, 32 bit timing devices and 4 frequency dividers when CPU handles task, are set the timer clock of said RTC, and the data that needs are preserved are kept in the said general RAM; Arrive when the time of setting, said RTC produces the alarm clock signal, opens said NPN pipe through the said pin output high level that wakes up, and said NPN pipe is opened said PMOS pipe, and system powers on.
Wherein, the said pin that wakes up is managed by the 6th PMOS, and a weak pull down resistor drives with the pin driver of waking up that a series connection resistor group becomes.
The present invention has realized integrating a kind of SOC(system on a chip) of real-time timepiece chip and microcontroller chip function; Reduced power consumption; And real-time clock module through low power operation; Control the timing operation of whole SOC(system on a chip) and operation in needs, further reduced system power dissipation, also reduced the scheme cost simultaneously.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work property, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is a real-time timepiece control circuit of prior art.
Fig. 2 is the another real-time timepiece control circuit of prior art.
Fig. 3 is a RTC battery of the present invention real-time timepiece control circuit of power supply separately.
Fig. 4 supplies power to the real-time timepiece control circuit of RTC for the power supply by SOC(system on a chip) of the present invention.
Fig. 5 is the real-time timepiece control circuit of the starting module of one embodiment of the invention employing.
Fig. 6 is the real-time timepiece control circuit of the starting module of further embodiment of this invention employing.
Fig. 7 for the RTC inner structure and with the exemplary plot that is connected of CPU.
Fig. 8 wakes the pin driver structural drawing up for RTC.
Fig. 9 is the single-way switch structural drawing between SOC(system on a chip) power supply and RTC power supply.
Embodiment
Below will combine the accompanying drawing specific embodiments of the invention to be elaborated.
Real-time timepiece control circuit of the present invention comprises a RTC who is positioned at same SOC(system on a chip) and is connected through serial line interface with CPU with CPU, and the power module that connects CPU and RTC respectively.Through CPU and RTC are placed same SOC(system on a chip), greatly reduce power consumption.
Wherein, the power module that connects CPU and RTC can be same module, and the power module that connects RTC also can be a RTC battery.Like Fig. 3 and shown in Figure 4.
In Fig. 3 and Fig. 4, on-chip system chip comprises RTC and modules such as CPU, voltage stabilizer.Fig. 3 is to adopt different RTC module for power supply mode in the face of different primary powers with Fig. 4, but implementation is the same.Among Fig. 3, the RTC module has independent RTC battery, and primary power can remove and can not influence the operation of RTC module.Among Fig. 4, primary power is non-removable high capacity cell, and the uninterrupted power supply through resistance R 5, R6 and capacitor C 1 realize the RTC module can omit independent RTC battery like this, saves the scheme cost.
Fig. 3 and system shown in Figure 4 also need starting up's process, and available Fig. 5 and mode shown in Figure 6 realize.
Among Fig. 5 and Fig. 6, starting-up signal is added in the base stage of NPN triode or the grid of PMOS pipe through pushing button, and lets system power on.After host CPU powered on and moves, the pin that wakes up of control RTC module was exported high level signal, and driving N PN manages output low level, thereby accomplishes the locking of starting-up signal.At this moment, can discharge button.
After starting shooting successfully, after host CPU is handled set task, set the functions such as timer clock of RTC; Be kept at the data of needs preservation the general RAM the inside of RTC module; Control then and wake pin output low level shutoff NPN pipe up, thereby turn-off the PMOS pipe, let main system cut off the power supply.When arriving the time of setting, the RTC module produces an alarm clock signal, opens the NPN triode through waking pin output high level up; Thereby open the PMOS pipe, make main CPU system re-power, inquire about various input informations; Accomplish set task, get into off-position then again.
In this way, make the time of whole SOC system works very short, the most of the time is in the state of power consumption very little (the operation consumption of RTC module), thereby has significantly reduced the power consumption of total system.When primary power when also being battery-powered, prolonged battery life greatly.
The function design of RTC module of the present invention is as shown in Figure 7.
Among Fig. 7, the RTC module is connected through serial line interface with cpu system, and in addition, the RTC module also provides the clock signal of 32.768K hertz and 1 hertz to cpu system.
The interface register of RTC module, internal register, general RAM, RTC state machine, 32 bit timing devices, 4 frequency dividers, combination has realized functions such as the timing, counting, alarm clock, data storage of RTC module.
The size of general RAM needs to set by system.Because the RTC module is a uninterrupted power supply,, therefore can be used as nonvolatile memory and uses so the data of preserving in the general RAM can not lost because of the outage of main CPU system yet.
The RTC oscillator clock that corresponding crystal oscillator produces the 32.768K hertz of arranging in pairs or groups is supplied with timer and other parts.
The electrification reset part produces reset signal and gives the RTC state machine when the RTC module initially powers on, make it be in correct initial state.
The wake-up signal that the RTC state machine produces is through waking pin output up, the outside NPN triode of chip for driving, thereby the PMOS power switch among control chart 3 and Fig. 4.Circuit is as shown in Figure 8.
Among Fig. 8, wake pin driver up and form, with the outside NPN triode of this reliable driving by a PMOS pipe and 1 weak pull down resistor, 1 resistance in series.
In addition, power supply processing section circuit is as shown in Figure 9.
What the circuit of Fig. 9 was realized is the single-way switch function.In the circuit; The one PMOS pipe M1 connects into a single-way switch; Two current-limiting resistance RS1, RS2 and top the 2nd PMOS pipe M2, the 3rd PMOS pipe M3 realize the tracking of substrate B point current potential to VDD and RTCVDD; Let substrate B point be in suitable noble potential, guarantee that the function of PMOS pipe M1 is normal.
The single-way switch of Fig. 9 when the VDD current potential is lower than RTCVDD, is in off state, has realized the isolation between RTC modular power source RTCVDD and the host CPU power vd D.When the VDD current potential exceeded the voltage certain value (threshold voltage) of RTCVDD pin, the single-way switch conducting was supplied power to the RTC module by VDD.And as shown in Figure 3 when system, the RTCVDD pin connects when being the RTC battery, can also replenish electric weight to the RTC battery.Because the existence of series limiting resistor RS1, RS2, feasible charging to the RTC battery can only be faint trickle charge, so can not hurt battery.
More than the preferred embodiments of the invention are described in detail, but the present invention is not limited to above-mentioned embodiment, various for a person skilled in the art conspicuous modifications and conversion still belong to the present invention's scope required for protection.