Summary of the invention
In view of above-mentioned the deficiencies in the prior art part, the object of the present invention is to provide a kind of shutdown alarm clock triggering system and triggering method thereof of mobile terminal, can under mobile terminal off-mode, start alarm clock, and reduce costs.
In order to achieve the above object, the present invention has taked following technical scheme:
A kind of shutdown alarm clock triggering system of mobile terminal, it comprises clock source, counter, central processing unit, numerical value comparison module and start control module: described clock source is connected with start control module by counter, numerical value comparison module successively, and described counter is connected with central processing unit with numerical value comparison module;
Described clock source, for generation of the clock pulse signal of fixed frequency;
Described counter, for the number of the clock pulse signal of described clock source generation is counted, exports corresponding count value;
Described central processing unit, while shutting down for detection of mobile terminal, obtain alarm time next time, according to the available machine time that alarm time calculates mobile terminal next time, and calculate in the time that mobile terminal starts shooting from shutting down to, described clock source produces the number of clock pulse signal, and its numerical value is arranged in numerical value comparison module;
Described numerical value comparison module, when the individual numerical value of the clock pulse signal arranging at numerical value comparison module with central processing unit for the count value that relatively counter is exported equates, triggers described start control module;
Described start control module is controlled mobile terminal-opening when receiving the triggering signal of numerical value comparison module, and starts alarm clock.
In the shutdown alarm clock triggering system of described mobile terminal, described central processing unit comprises:
Counter control unit, for the keying of control counter and the output of zero clearing counter;
Numerical calculation unit, for calculating the available machine time of calculating mobile terminal according to the unused time, and calculates mobile terminal from shutdown to carry out in the time of start next time, and described clock source produces the number of clock pulse signal;
Numerical value setting unit, is arranged on numerical value comparison module for the numerical value that numerical calculation unit is calculated;
Described counter control unit linkage counter, described numerical calculation unit connects numerical value comparison module by numerical value setting unit.
In the shutdown alarm clock triggering system of described mobile terminal, described counter comprises that CLKIN end, CLR end, EN end and Q0 hold to Q20 and holds; Described numerical value comparison module comprises many inputs or door and 21 XOR gate;
Described CLKIN end connects clock source, CLR end and EN end linkage counter control unit; The Q0 of the described counter of the corresponding connection of first input end of 21 XOR gate holds to Q20 and holds, the second input of described 21 XOR gate all connects numerical value setting unit, the output of described 21 XOR gate connects the input of described many inputs or door, and described many inputs or gate output terminal connect described start control module.
In the shutdown alarm clock triggering system of described mobile terminal, described start control module comprise key detecting unit, power management chip and with door; Described with door first input end be connected numerical value comparison module, be connected described key detecting unit with the second input of door, be connected power management chip with the output of door.
In the shutdown alarm clock triggering system of described mobile terminal, described key detecting unit comprises pull-up resistor and key, one end of described pull-up resistor connects VDD feeder ear, and the other end of pull-up resistor connects with the second input of door, also by key ground connection.
In the shutdown alarm clock triggering system of described mobile terminal, described central processing unit calculates mobile terminal in the time from shutdown to start, and the number that described clock source produces clock pulse signal is:
Wherein, t2 is alarm time next time, and t1 is current time, and t0 is that central processing unit has power-on command to completing the required time of start from detecting, and f is the frequency that clock source produces clock pulse signal.
A triggering method for above-mentioned shutdown alarm clock triggering system, it comprises:
During the shutdown of A, mobile terminal, by central processing unit, obtain the current time of mobile terminal and alarm time next time;
B, central processing unit calculated the available machine time of mobile terminal according to the unused time, and calculated mobile terminal in the time from shutdown to start, and described clock source produces the number of clock pulse signal, and its numerical value is arranged in numerical value comparison module; The counter of zero clearing simultaneously, makes counter start counting;
When the individual numerical value of the clock pulse signal that C, the count value of exporting when numerical value comparison module comparison counter arrange in numerical value comparison module with central processing unit equates, trigger described start control module and control mobile terminal-opening, and start alarm clock.
In described triggering method, described step B specifically comprises:
B1, numerical calculation unit calculated the available machine time of mobile terminal according to the unused time of mobile terminal, and calculated mobile terminal from shutdown to carry out in the time of start next time, and described clock source produces the number of clock pulse signal;
The numerical value that B2, numerical value setting unit are calculated numerical calculation unit is arranged on numerical value comparison module; By counter control unit zero clearing counter, make counter start counting simultaneously.
In described triggering method, described central processing unit calculates mobile terminal in the time from shutdown to start, and the number that described clock source produces clock pulse signal is:
Wherein, t2 is alarm time next time, and t1 is current time, t0 be central processing unit from detecting power-on command to completing the required time of start, f is the frequency that clock source produces clock pulse signal.
Compared to prior art, shutdown alarm clock triggering system and the triggering method thereof of a kind of mobile terminal provided by the invention, when mobile terminal shuts down, by central processing unit, detected unused time and the next alarm time of mobile terminal, according to the available machine time of unused time and the mobile terminal of alarm time calculating next time, and calculate mobile terminal in the time from shutdown to start, described clock source produces the number of clock pulse signal, and its numerical value is arranged in numerical value comparison module, and by counter at mobile terminal in the unused time, calculating the number of the clock pulse signal of clock source generation counts, export corresponding count value, when the count value of counter is identical with the individual numerical value of the clock pulse signal arranging in numerical value comparison module, triggers described start control module and control mobile terminal-opening, and start alarm clock.The present invention is without realizing mobile shutdown alarm clock function with special-purpose chip, its development cost is low.
Embodiment
The invention provides a kind of shutdown alarm clock triggering system and triggering method thereof of mobile terminal, for making object of the present invention, technical scheme and effect clearer, clear and definite, referring to accompanying drawing, developing simultaneously, the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Refer to Fig. 1, the structured flowchart of the shutdown alarm clock triggering system that Fig. 1 is mobile terminal provided by the invention.As shown in Figure 1, the shutdown alarm clock triggering system of mobile terminal is the smart machines such as smart mobile phone, panel computer, and it comprises: clock source 100, counter 200, central processing unit 300, numerical value comparison module 400 and start control module 500.Described clock source 100 is connected with start control module 500 by counter 200, numerical value comparison module 400 successively, and described counter 200 is connected with central processing unit 300 with numerical value comparison module 400.
Wherein, described clock source 100, for generation of the clock pulse signal of fixed frequency, clock source 100 produces the clock pulse signal that fixed frequency is 1Hz in the present embodiment.Described clock source is external clock reference, and the positive feedback oscillating circuit being conventionally comprised of quartz, crystal oscillator and NAND gate forms, and its clock pulse signal inputs in counter 200.
Described counter 200, for the number of the clock pulse signal of described clock source generation is counted, exports corresponding count value.Wherein, the number of clock pulse signal can be mobile terminal from shutting down to the available machine time, the number of the clock pulse signal that clock source 100 produces, as being a clock pulse signal between two of clock pulse signal adjacent rising edges.
Central processing unit 300 is for the operating state of control counter 200, as control counter 200 zero clearings, enable, forbidden energy counter 200.
During concrete enforcement, described central processing unit 300 is also for when detecting mobile terminal shutdown, obtain alarm time (next time starting the time of alarm clock) next time, according to the unused time, calculate the available machine time of mobile terminal, and calculate mobile terminal in the time from shutdown to start, described clock source 100 produces the number of clock pulse signal, and its numerical value is arranged in numerical value comparison module 400.In this practical example, in the time of could starting alarm clock due to mobile terminal under open state, so 200, counter needs to calculate mobile terminal from shutting down within the available machine time, clock source 100 produces the number of clock pulse signal, and without record move terminal, from detecting, have power-on command to completing in start required time, the clock pulse signal number that clock source 100 produces.
When the individual numerical value of the clock pulse signal that described numerical value comparison module 400 arranges at numerical value comparison module 400 with central processing unit 300 for the count value that relatively counter 200 is exported equates, trigger described start control module 500.Described start control module 500 is controlled mobile terminal-opening when receiving the triggering signal of numerical value comparison module 400, and starts alarm clock, thereby realized mobile terminal, under off-mode, starts alarm clock.
Concrete, central processing unit 300 calculates mobile terminal in the time from shutdown to start, and the number that described clock source produces clock pulse signal is:
Wherein, t2 is alarm time next time, and t1 is current time, and t0 is that central processing unit 300 has power-on command to completing the required time of start from detecting, and f is the frequency that clock source produces clock pulse signal.
Again consult Fig. 1, described central processing unit 300 comprises: for linkage counter 200 and control the counter control unit 310 of its keying and zero clearing, for calculating the available machine time of mobile terminal according to the unused time, and calculate the numerical calculation unit 320 that mobile terminal produces clock pulse signal number within its time period, for the numerical value that numerical calculation unit 320 is calculated, output to the numerical value setting unit 330 of numerical value comparison module 400.
Wherein, numerical calculation unit 320 is connected with numerical value setting unit 330, when mobile terminal shutdown being detected, obtain alarm time next time, and it was compared with the unused time, obtain the number of the clock pulse signal of described clock source 100 generations, and numerical value is outputed to numerical value setting unit 330.
See also Fig. 2, the structural representation of the shutdown alarm clock triggering system Counter that Fig. 2 is mobile terminal provided by the invention.Counter 200 as shown in Figure 2 comprises: CLKIN holds (being input end of clock), and it connects clock source 100 and inputs for clock pulse signal; CLR end (being clear terminal) and EN end (being Enable Pin), all connect the counter control unit 310 in central processing unit 300, be respectively used to zero clearing counter 200 and enable counter 200, the Q0 of counter 200 holds, Q1 holds ..., Q19 end, Q20 end, all connect numerical value comparison module 400, after counter 200 output zero clearings, record the clock pulse signal number of CLKIN end input.
During concrete enforcement, take smart mobile phone as example, when central processing unit 300 detects intelligent mobile phone shutdown, first the EN end input enable signal to counter 200 activates counter 200, then by a reset signal of CLR end input, by counter 200 state initialization, the clock pulse signal of being exported by CLKIN end input clock source 100 again, and by the number of clock pulse signal with binary mode by Q0 hold, Q1 end ..., Q19 end, Q20 end output to numerical value comparison module 400, wherein, Q0 end is lowest order, and Q20 end is highest order.For example, represent high level with 1, represent low level with 0, at central processing unit 300, counter is activated and initialized state under, when the clock number of being inputted by CLKIN end is 12345, its corresponding Q0 holds, Q1 holds ..., Q19 end, Q20 end output level be as shown in the table:
Q0 |
1 |
Q1 |
0 |
Q2 |
0 |
Q3 |
1 |
Q4 |
1 |
Q5 |
1 |
Q6 |
0 |
Q7 |
0 |
Q8 |
0 |
Q9 |
0 |
Q10 |
0 |
Q11 |
0 |
Q12 |
1 |
Q13 |
1 |
Q14 |
0 |
Q15 |
0 |
Q16 |
0 |
Q17 |
0 |
Q18 |
0 |
Q19 |
0 |
Q20 |
0 |
Take smart mobile phone as example, when central processing unit 300 detects intelligent mobile phone shutdown, numerical calculation unit 320 obtains unused time and alarm time next time, and calculate and on carrying out, once carry out in available machine time section in the unused time, the clock pulse signal number that clock source 100 produces, and numerical value is outputed in numerical value setting unit 330.Meanwhile counter control unit 310 is to the EN end input enable signal of counter 200, with activate counter 200; To CLR end input reset signal, with count initialized device 200.For example, with 1, represent high level, with 0, represent low level, numerical calculation unit 320 obtains clock source 100 and produces after 12345 clock pulse signals, numerical value is stored in to numerical value setting unit 330 in binary mode, the binary number obtaining as shown above, when its high position does not have respective value, mend 0, i.e. numerical value setting unit 330 storages are 100111000000110000000 from low level to a high position.
See also Fig. 3, the structural representation of numerical value comparison module in the shutdown alarm clock triggering system that Fig. 3 is mobile terminal provided by the invention.Numerical value comparison module 400 as shown in Figure 3 comprises: input more or door U21 and 21 XOR gate U0, U1 ..., U19, U20,21 XOR gate U0, U1 ..., U19, U20 the described counter 200 of the corresponding connection of first input end Q0 end, Q1 end ..., Q19 end, Q20 end, the Q1 end of the first input end linkage counter 200 of the Q0 of the first input end linkage counter 200 of first XOR gate U0 end, second XOR gate U1 ..., by that analogy.
Described 21 XOR gate U0, U1 ..., U19, U20 the second input all connect numerical value setting unit 330, described 21 XOR gate U0, U1 ..., U19, U20 output connect the input of described many inputs or door U21, described many inputs or a door U21 output connect described start control module 500.
In the specific implementation, the numerical value that the numerical value setting unit 330 in central processing unit 300 calculates numerical calculation unit 320 with binary form from low level to a high position 21 XOR gate U0, U1 by numerical value comparison module 400 ..., U19, U20 the second input be arranged on 21 XOR gate U0, U1 of numerical value comparison module 400 ..., in U19, U20; Counter 200 count each time all numerical value 21 XOR gate U0, U1 by numerical value comparison module 400 ..., U19, U20 first input end be input in XOR gate, the two is compared, then comparative result is outputed in many inputs or door U21, numerical value comparison module 400 is linked to start control module 500 by the output of many inputs or door U21, in order to mobile terminal is realized to the unlatching of terminal.
Wherein, represent high level with 1, represent low level with 0, when the first input end in XOR gate equates with the numerical value of the second input, the output of XOR gate is to the input input 0 of many inputs or door U21; When numerical value is unequal, to many inputs or door U21 input 1.When 21 XOR gate U0, U1 ..., U19, U20 be 0 o'clock to the numerical value of many inputs or door U21 input, the output of many inputs or door U21 is to 500 inputs 0 of start control module, therefore when the value of data device 200 outputs and the value of numerical value setting unit 330 settings equate, all XOR gate output 0, many inputs or door U21 output are also 0, if otherwise have XOR gate output 1, input or a door U21 is output as 1 more; It is 0 or 1 just can know whether the value of counter 200 outputs equates with the value that numerical value arranges module 330 settings that 500 of control modules of start need to detect many inputs or door U21 output, when both are equal, start control module 500 triggers, and realizes the start of mobile terminal; Otherwise mobile terminal is not started shooting, keep shutdown.
See also Fig. 4, the structural representation of the control module of starting shooting in the shutdown alarm clock triggering system that Fig. 4 is mobile terminal provided by the invention.As shown in Figure 4, start control module 500 comprise: power management chip 510, start detecting unit 520 and with door U22.Wherein, described with door U23 first input end be connected numerical value comparison module 400, be connected described key detecting unit 520 with the second input of door U22, be connected power management chip 510 with the output of door U22.
Described key detecting unit 520 comprises pull-up resistor R1 and key K1, and one end of described pull-up resistor R1 connects VDD feeder ear, and the other end of pull-up resistor R1 connects with the second input of door U22, also by key K1 ground connection.
During concrete enforcement, when the key K1 of start detecting unit 510 is pressed, key K1 is low level with being conducting to, to exporting 0 with door U22, when having an input to be 0 with door U22, U22 is output as 0 with door, and power management chip 510 detects with door U22 and exports 0 o'clock, realizes the unlatching of mobile terminal; When key K1 is not pressed, key K1 is drawn high as high level by pull-up resistor R1, and to exporting 1 with door U22, power management chip 510 detects and door U22 output 1, triggering mobile terminals start.Meanwhile, also receive the signal of numerical value comparison module 400 output with door U22, when numerical value comparison module 400 is when being 0 with door U22 input signal, U22 is output as 0 with door, and power management chip 510 receives 0 signal with door U22 input, realizes mobile terminal and opens; If numerical value comparison module 400 to door U22 input signal be 1 o'clock,, with door U22 output 1, power management chip 510 detects a U22 and exports 1 o'clock, triggering mobile terminals start.
For a better understanding of the present invention, below in conjunction with Fig. 1 to Fig. 4, take smart mobile phone as example, the working method of the shutdown alarm clock triggering system of mobile terminal provided by the invention is elaborated.
User arranges alarm clock in smart mobile phone, however before alarm clock starts by intelligent mobile phone shutdown.In intelligent mobile phone shutdown, central processing unit 300 detects shutdown command, by numerical calculation unit 320, obtain unused time and alarm time next time, and calculate at smart mobile phone from shutting down to starting alarm clock and carry out and open in the time of once opening intelligent mobile phone system, clock source 100 needs the clock pulse signal number producing, and institute's value is input in numerical value setting unit 330, numerical value setting unit 330 is input to institute's value successively 21 XOR gate U0 in numerical value comparison module 400 from low level to a high position with binary form, U1, U19, the second input of U20.Meanwhile, the EN end to counter 200 in central processing unit 300 sends enable signal, in order to enable counter 200, and to the CLR end input reset signal of counter 200, in order to by the counter value zero clearing of counter 200, count initialized device 200.Meanwhile, numerical calculation unit 320 also should obtain the essential information of clock source 100, as frequency of clock source 100 etc.
When counter control unit 310 is after the EN end input enable signal of counter 200, the reset signal that counter 200 activates and count pick up device control unit 310 is inputted at CLR end, carry out initialization, then by the CLKIN of counter 200, held the clock pulse signal in receive clock source 100, CLKIN holds clock pulse signal of every reception, counting once, and the Q0 value of counting being input to from low level to a high position in order in binary mode in counter 200 holds, Q1 end, Q19 end, on Q20 end, by Q0, hold, Q1 end, Q19 end, Q20 end is transferred to 21 XOR gate U0 in numerical value comparison module 400 in order by numerical value, U1, U19, in the first input end of U20.
The output of each XOR gate in numerical value comparison module 400 is connected on many inputs or door U21 input.In unused time section, each XOR gate will compare the numerical value of first input end and the input of the second input, exports 0 signal, otherwise export 1 signal if identical.Many inputs or door U21 receive 21 XOR gate U0, U1 in this module ..., U19, U20 signal, if all signals are all identical, export 0 signal, otherwise export 1 signal.
When many inputs or door U21 are 0 to start is control module 500 with signal door U22 input, to power management chip 510 input 0 signals, smart mobile phone starts system, after smart mobile phone start with door U22, counter control unit 310 makes counter 200 forbidden energy, to save battery electric quantity; Signal is 1 o'clock, and intelligent mobile phone system does not start.
Further, described shutdown alarm clock triggering system also comprises that shutdown alarm clock arranges module, for when user arranges alarm clock, the function of opening shutdown alarm clock is set, and shifts to an earlier date the options such as reminding alarm clock.Wherein, the time acquiescence of described reminding alarm clock in advance 2 minutes in advance, after 2 minutes, starts alarm clock again, only need once arrange and reach the object of repeatedly reminding.
The corresponding triggering method that a kind of shutdown alarm clock triggering system of mobile terminal is provided of the present invention, refers to Fig. 5, and it comprises following step:
During the shutdown of S100, mobile terminal, by central processing unit, obtain the current time of mobile terminal and alarm time next time;
S200, central processing unit calculated the available machine time of mobile terminal according to the unused time, and calculated mobile terminal in the time from shutdown to start, and described clock source produces the number of clock pulse signal, and its numerical value is arranged in numerical value comparison module; The counter of zero clearing simultaneously, makes counter start counting;
When the individual numerical value of the clock pulse signal that S300, the count value of exporting when numerical value comparison module comparison counter arrange in numerical value comparison module with central processing unit equates, trigger described start control module and control mobile terminal-opening, and start alarm clock.
Mobile terminal described herein is for carrying as the mobile terminal of the intelligent systems such as Android, OS, windows phone, below take smart mobile phone as example.
In step S100, during the central processing unit in mobile phone has detected handset starting shutdown programm, numerical calculation unit wherein be can start, the unused time of mobile phone and alarm time next time obtained.Meanwhile, also need to obtain the frequency that clock source produces clock pulse signal, in order to calculate clock source in the unused time to the clock pulse signal producing in next alarm time.Specifically refer to above-described embodiment.
In step S200, central processing unit by calculate clock source the unused time on once carry out the number that produces clock pulse signal in time of start.And it is arranged in numerical value comparison module by numerical value setting unit, it specifically comprises:
The first step, numerical calculation unit calculated the available machine time of mobile terminal according to the unused time of mobile terminal, and calculated mobile terminal from shutdown to carry out in the time of start next time, and described clock source produces the number of clock pulse signal;
The numerical value that second step, numerical value setting unit are calculated numerical calculation unit is arranged on numerical value comparison module; By counter control unit zero clearing counter, make counter start counting simultaneously.
Wherein, central processing unit calculates mobile terminal from shutdown to carry out in the time of start next time, and the computing formula that described clock source produces the number of clock pulse signal is:
Wherein, t2 is alarm time next time, and t1 is current time, t0 be central processing unit from detecting power-on command to completing the required time of start, f is the frequency that clock source produces clock pulse signal.
In step S300, numerical value comparison module in native system compares the numerical value of input, when counter is passed to numerical value that the numerical value in numerical value comparison module calculates with central processing unit and equates, power management chip is triggered, start the boot system of smart mobile phone, and startup alarm clock, realizes shutdown alarm clock prompting function.
Further, before step S100, described triggering method also comprises: when the function of shutdown unlatching alarm clock is set, reminding alarm clock function is in advance set.
If be provided with reminding alarm clock function in advance, user can also arrange the time of reminding in advance.After being provided with reminder time in advance, when user shuts down, central processing unit arranges mobile terminal and from shutdown to the computing formula of carrying out start is next time:
Wherein, t2 is alarm time next time, and t1 is current time, t0 be central processing unit from detecting power-on command to completing the required time of start, the pre-set time that t00 arranges for user, f is the frequency of clock source generation clock pulse signal.
Shutdown alarm clock triggering system and the triggering method thereof of a kind of mobile terminal provided by the invention, realization starts alarm clock at mobile terminal under off-mode, the element adopting is conventional electronic component, its circuit structure is simple, development cost is low, for product has increased new user's health check-up, improved the competitiveness of product in market.
Be understandable that, for those of ordinary skills, can be equal to replacement or change according to technical scheme of the present invention and inventive concept thereof, and all these changes or replacement all should belong to the protection range of the appended claim of the present invention.