A kind of power supply circuits of double voltage source real time clock circuit
Technical field
The utility model relates to a kind of real-time clock (RTC) power supply circuits, relates in particular to a kind of power supply circuits that double voltage source real time clock circuit RTC is provided.
Background technology
Existing most of portable portable sets have all used real time clock circuit (being the RTC circuit), RTC (Real-time clock) circuit not only can provide real-time clock when system works, and when not working in system, even under the situation that main power source cuts out, also to carry out real-time timing, otherwise when starting shooting again the time just inaccurate, this just needs a stand-by power supply be the RTC circuit supply.And an important characteristic of mobile unit is exactly its power problems, so the power supply of RTC design seems particularly important, needs power saving on the one hand, needs to save cost on the other hand again.At present, most of RTC circuit all uses single voltage fed, just can keep its operate as normal.But the RTC circuit of some MCU needs two kinds of different voltage feds, but the ability operate as normal.
As shown in Figure 1, for using the RTC circuit theory diagrams of single voltage fed at present, BT1 is the special-purpose backup battery of RTC, and R1 is a current-limiting resistance.During the RTC circuit working, BT1 is through the RTC circuit supply of R1 to MCU, because the power vd D of the power vd DRTC of RTC and other modules of MCU isolates, backup battery BT1 can not power to system power supply, can reduce the operating current of BT1 like this.When system's operate as normal, system power supply can be by resistance R 1 to the BT1 charging, and R1 is its current-limiting resistance.
When MCU powers on first and uses, at first can initialization RTC circuit, it is worked together, obtain real-time time (or artificial setting) from other places, real-time time has been arranged, the RTC module is operate as normal veritably.At every turn RTC modification is set after, all need RTC is configured to a read states (being write-protect), both can prevent the data in the accidental damage RTC, can forbid again its with microprocessor between communicate by letter, to reduce the power consumption of RTC module.After, after MCU main power source VDD closes electricity, needing only the electric weight of backup battery BT1, the requirement that voltage can also satisfy the RTC circuit, the RTC module just can be worked down always.When system powers on once more, MCU just can rework, and only otherwise RTC is reconfigured, the time of RTC just can not be reset, and still moves down by real-time time.
When reality was used, these portable sets the situation of drop-out time occurred through regular meeting, by analysis, its main cause be backup battery electric weight (voltage) deficiency due to.At this problem, its solution is exactly: can adopt the bigger backup battery of capacity according to actual conditions when 1, designing, prolong the discharge time of backup battery; 2, reduce the continuous turn-off time of main power source, backup battery is effectively charged, improve the electric weight of battery; 3, just in case backup battery overdischarge, the RTC circuit can't operate as normal, and real-time time is lost, and at this moment can use main power source to be the RTC circuit supply, and read again (or resetting) correct time from other places, make RTC module operate as normal again.Said method can satisfy the requirement of RTC circuit operate as normal basically, but it is only applicable to the RTC circuit of single power supply, needs the RTC circuit of duplicate supply then inapplicable for those.
The utility model content
The purpose of this utility model is to provide a kind of power supply circuits applicable to duplicate supply RTC circuit, makes duplicate supply RTC circuit the situation of drop-out time can not occur.
To achieve these goals, the utility model is realized by following technical measures: a kind of real-time clock power supply circuits of double voltage source, comprise high capacity cell, backup battery, power regulator module, be used for providing the division module of operating voltage to Vdd, described power regulator module output back divides three branch roads to connect respectively, wherein first branch road connects the RTC_Vdddio power input, second branch road connects the RTC_Vdd power input through division module again, the 3rd branch road connects backup battery, is used for backup battery is charged.Under the situation of system cut-off, high capacity cell is powered to the RTC_Vddio power supply after power regulator module produces the required corresponding voltage value of power supply, and powers to the RTC_Vdd power supply after division module, simultaneously backup battery is charged; High capacity cell is when being removed or use up, and backup battery provides one road voltage to the power supply of RTC_Vddio power supply, and powers to the RTC_Vdd power supply after division module, keeps the operate as normal of RTC circuit.
Power regulator module output described in the utility model divides the output of three branch roads after connecting anti-battery drain module again, and preventing is not having serious backup battery electric leakage when under-voltage of the battery BT2 of installation or this battery.
Connect in the 3rd branch road described in the utility model and be used to prolong the backup battery current-limiting circuit of discharge time.
The rated voltage of backup battery described in the utility model is consistent with the output voltage values of power regulator module, prevents that backup battery from overcharging.
RTC_Vdd power input described in the utility model is the voltage output end of fast start circuit in the connected system power supply also; The output voltage of fast start circuit is the magnitude of voltage of power supply RTC_Vdd in the described system power supply.When high capacity cell and backup battery electric weight all use up, after powering on, system connects the RTC_Vdd power supply fast to the RTC_Vdd power supply, so that the fast quick-recovery operate as normal of RTC.
After using circuit of the present utility model to constitute, before system powers on,, can both carry out dual power supply to the RTC circuit as long as one have and also be filled with electric weight between high capacity cell or the backup battery; Use up electric weight and work as backup battery, high capacity cell can also charge to backup battery on the other hand to the dual power supply of RTC on the one hand.In addition, after system powered on, no matter whether two batteries are filled with electric weight, system power supply can both be powered to the RTC power supply circuits, and can give the backup battery that lacks electric weight charging, keep the operate as normal of RTC circuit.Therefore, for some RTC circuit that the DC power supply of the different voltages of two-way must be arranged, the utility model is well positioned to meet its requirement, and can well realize its dual power supply and maintenance work.
Description of drawings
Fig. 1 is the circuit theory diagrams of RTC circuit in the prior art;
Fig. 2 is the theory diagram of utility model;
Fig. 3 is the embodiment schematic diagram of utility model;
Embodiment
As shown in Figure 2, the utility model comprises high capacity cell, backup battery, anti-battery drain module, power regulator module, is used to prolong the backup battery current-limiting circuit of discharge time, is used for the division module to the Vdd operating voltage; High capacity cell is exported through power regulator module, the power regulator module output divides the output of three branch roads after connecting anti-battery drain module again, wherein first branch road connects the RTC_Vdddio power input, second branch road connects the RTC_Vdd power input through division module again, the 3rd branch road connects backup battery, be used for the backup battery charging is connected in the 3rd branch road and is used to prolong the backup battery current-limiting circuit of discharge time.
In addition at the RTC_Vdd power input voltage output end of fast start circuit in the connected system power supply also; The output voltage of fast start circuit is the magnitude of voltage of power supply RTC_Vdd in the system power supply, is connected anti-battery drain module in RTC_Vdd power input and system power supply between the voltage output end of fast start circuit.When the backup battery electric weight uses up, after powering on, system connects the RTC_Vdd power supply fast to the RTC_Vdd power supply, so that the fast quick-recovery operate as normal of RTC.
As shown in Figure 3, be embodiment schematic diagram of the present utility model.Under the situation of system cut-off, give RTC circuit supply by the utility model power supply circuits this moment.When the RTC circuit is only powered by backup battery BT1, backup battery BT1 at first provides the RTC_Vddio use of the power supply of one road high voltage for MCU, another road power supply carries out dividing potential drop by the RTC_Vdd equivalence input resistance of resistance R 2 and MCU, thereby obtain suitable supply voltage, RTC_Vdd for MCU uses, the power supply circuits of the RTC module of MCU are just normal, but just operate as normal of RTC module, and carry out real-time timing.When high capacity cell BT2 connected, stabilized voltage power supply chip U1 operate as normal produced its specified output voltage.This voltage charges to back-up battery BT1 by diode D1 and current-limiting resistance R1, and when the less voltage of the electric weight of battery BT1 was low, charging current can be bigger; Along with the rising of BT1 voltage, must charge equation as can be known by following, the corresponding reduction of charging current meeting, the end stage to charging will enter trickle charge.Charging current can be tried to achieve by following charging equation:
Less and when being in charged state at the electric weight of backup battery BT1, the power supply of RTC module is then provided by power supply chip U1, behind the voltage output process diode D1 of U1, the RTC_Vddio that supplies with MCU earlier uses, and the RTC_Vdd of MCU then carries out dividing potential drop by the equivalent input resistance of the RTC_Vdd of resistance R 2 and MCU and obtains.
Under normal circumstances, before system powered on, the power supply of RTC circuit was normal substantially, and the RTC module is operate as normal also.When high capacity cell BT2 does not have electricity (or not having installation) for a long time, when the electric weight of reserve battery also used up, system powered on, and fast start circuit output the RTC circuit of MCU is restored electricity rapidly, and the unlikely battery that is backlogged drags down in the system power supply; As battery BT2 and when starting shooting, if backup battery BT1 is under-voltage or when not having electricity, system power is powered to RTC_Vdd through fast start circuit, this moment, RTC Vddio was powered by U1, but just operate as normal of the RTC of MCU like this.
Diode D1 as shown in Figure 3 has been the effect that prevents that backup battery from leaking, when BT2 does not have the battery of installation, or this battery is serious when under-voltage, if no D1, backup battery BT1 can leak electricity to ground by resistance R 1 and U1, because backup battery uses button cell mostly, its battery electric quantity is very little, only about 0.2mAh, effectively discharging current is about 5 μ A, so even only the electric leakage of tens microamperes of electric currents also can make the electric energy of backup battery exhaust rapidly.In RTC_Vdd power input and system power supply, be connected the diode D2 of anti-battery drain in addition between the voltage output end of fast start circuit, also be used to prevent the leakage of backup battery.
For the power supply of two groups of power supplys is provided, the nominal voltage of the backup battery of employing should with the conforming to of high voltage output, low voltage obtains by dividing potential drop.Owing to there is not the divider resistance of use, the power consumption of backup battery BT1 also can reduce, the output of U1 also should be consistent with battery BT1, thereby guarantee that the situation that backup battery overcharges can not occur, fast start circuit output in the system power supply should be consistent with the RTC_Vdd of low voltage, thereby the RTC that guarantees MCU can operate as normal.But this system's main power source is also provided by battery BT2, does not have at BT2 under the situation that connects battery, and two groups of power supplys (RTC_Vdd, RTC_Vddio) of the RTC circuit of MCU are powered by backup battery BT1.At this moment, fast start circuit does not have electricity because of system power supply does not work, and charging circuit is not worked because of no battery BT2 yet, and backup battery is in the power consumption operating state.If BT1 is soon under-voltage or when not having electricity, battery BT2 should be installed early, and be charged to BT1 through R1 by battery BT2.
When MCU powers on when using first, at first can initialization RTC circuit, and obtain (or artificial setting) real-time time, RTC module operate as normal.Certainly, at every turn RTC modification is set after, all need RTC is configured to a read states (being write-protect), both can prevent the data in the accidental damage RTC, can forbid again its with microprocessor between communicate by letter, to reduce the power consumption of RTC module.
After this, after MCU main power source Vdd, Vddio closed electricity, as long as the voltage of backup battery BT1 can also satisfy the requirement of RTC circuit, the RTC module just can be worked down always.If when the BT1 undertension need charge, battery BT2 and U1 can charge to it.When system powers on once more, MCU just can rework, and only otherwise RTC is reconfigured, the time of RTC just can not be reset, and still moves down by real-time time.Therefore, for some RTC circuit that the DC power supply of the different voltages of two-way must be arranged, the utility model is well positioned to meet its requirement, and can well realize its dual power supply and maintenance work.
The function of RTC module realizes, is example with the service of timing quarter-bell.When RTC module operate as normal, if the user wants to produce the service of several timing quarter-bell, upper layer software (applications) will be converted to the count value of counter to time of quarter-bell at first, and deposits the comparand register of RTC module in.When being complementary of the content of real-time counting register and comparand register, just can produce interruption (or waking up), notice upper layer software (applications) timing arrives, sends quarter-bell by upper layer software (applications), thereby realizes regularly quarter-bell service.Subsequently, upper layer software (applications) can be converted to the time of next quarter-bell the count value of counter again, and deposits the comparand register of RTC module in, finishing quarter-bell service next time, thereby realizes the function of RTC module.