CN1749887A - Method for realizing multipoint alarm clock in electronic equipment - Google Patents

Method for realizing multipoint alarm clock in electronic equipment Download PDF

Info

Publication number
CN1749887A
CN1749887A CN 200410074681 CN200410074681A CN1749887A CN 1749887 A CN1749887 A CN 1749887A CN 200410074681 CN200410074681 CN 200410074681 CN 200410074681 A CN200410074681 A CN 200410074681A CN 1749887 A CN1749887 A CN 1749887A
Authority
CN
China
Prior art keywords
alarm clock
time
current time
cpu
alarm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200410074681
Other languages
Chinese (zh)
Other versions
CN100419601C (en
Inventor
冷冰震
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2004100746812A priority Critical patent/CN100419601C/en
Publication of CN1749887A publication Critical patent/CN1749887A/en
Application granted granted Critical
Publication of CN100419601C publication Critical patent/CN100419601C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electric Clocks (AREA)

Abstract

The method of realizing multipoint alarm clock in electronic equipment is to store several pieces of alarm clock information including starting time in electronic equipment. The method includes the following steps: A. for the CPU in the electronic equipment to read out the current time from the hardware clock chip, to extract one starting time most approaching the current time form the alarm clock information and to set the starting time into hardware clock chip; B. for the hardware clock chip to inform the CPU with the time up information when the current time reaches the starting time; and C. for the CPU to initiate the alarm clock and return to the step A. The method of the present invention can realize multipoint alarm clock in relatively low cost.

Description

A kind of method that in electronic equipment, realizes multipoint alarm clock
Technical field
The present invention relates to the clock setting technology in the electronic equipment, relate in particular to a kind of method that in electronic equipment, realizes multipoint alarm clock.
Background technology
Current, many electronic equipments, for example mobile phone and PDA(Personal Digital Assistant) etc. all have the function that time and date is provided, and on the basis of time and date, many electronic equipments also can provide alarm clock function.Along with the progress of society and the quickening of work rhythm, people require an electronic equipment that multipoint alarm clock can be provided gradually, such as: get up in the morning, come off duty noon, afternoon meeting and multiple spot such as appointment alarm clock is provided respectively constantly.
In present electronic equipment, generally provide alarm clock setting constantly by the hardware clock chip, the user writes a plurality of alarm clocks setting value constantly by the input media of electronic equipment to the corresponding registers of this hardware clock chip, after each alarm clock arrives constantly, alarm clock starter gear in the hardware clock chip enable electronic equipment is to reach the purpose of notifying the final user.
But, the current chip of hardware clock cheaply generally can only provide the setting constantly of one or two alarm clock, this can not satisfy people's demand far away, and can provide the cost of the hardware clock chip that a plurality of alarm clocks set higher relatively, therefore also corresponding the increasing of cost that the electronic equipment of this hardware clock chip is housed.
Summary of the invention
In view of this, fundamental purpose of the present invention provides a kind of method that realizes multipoint alarm clock in electronic equipment, has both satisfied the demand of user to multipoint alarm clock, reduces the cost of electronic equipment again.
To achieve these goals, concrete technical scheme of the present invention is:
A kind of method that in electronic equipment, realizes multipoint alarm clock, this method is stored a plurality of alarm clock informations that comprise start-up time in electronic equipment, and this method also comprises:
The central processor CPU of A, electronic equipment reads the current time from the hardware clock chip, extract one and immediately need to start alarm clock with the current time from alarm clock information, and start-up time of this alarm clock is set in the hardware clock chip;
B, hardware clock chip need start start-up time of alarm clock when consistent in the current time with this, and notice CPU alarm clock arrives start-up time;
C, CPU start alarm clock, return steps A.
As a preferred embodiment of the present invention, described alarm clock information for fixing alarm clock information with alarm clock information can be set, wherein, fixedly alarm clock information is stored in the ROM (read-only memory) of electronic equipment; Can be provided with in the readable and writable memory that alarm clock information is stored in electronic equipment.
As another preferred version of the present invention, also comprise the opportunity of triggering execution in step A: behind the CPU starting up of electronic equipment, and after in electronic equipment, storing described alarm clock information.
As another preferred version of the present invention, this method further comprises in step B: if CPU is in closed condition when alarm clock arrives start-up time, then at first to trigger the power management chip of electronic equipment be CPU power supply to the hardware clock chip, and the start of power management chip sign is set to alarm clock start mode; Behind the CPU starting up, the start that detects power management chip is designated alarm clock start mode, and after execution in step C and the steps A, sends power-off signal to power management chip, stops the power supply to CPU after power management chip is received, CPU is in closed condition again.
As another preferred version of the present invention, in the described steps A, determine to be: need the alarm clock that starts in the alarm clock information of determining to be stored, determine again to need to start in the alarm clock and immediate alarm clock of current time with the immediate method that needs to start alarm clock of current time.
Described CPU determines that the method that needs to start alarm clock is: compared with the current time start-up time in each alarm clock information of being stored, if alarm clock is lagged in the current time start-up time, and the on off state in this alarm clock information is for opening state, and then this alarm clock is for needing the alarm clock of startup.
Described CPU determines that the concrete grammar that needs to start alarm clock is:
Obtain store time parameter and the period type that on off state in the alarm clock information is out each alarm clock of state;
If the period type of alarm clock is every day, then with in this alarm time parameter the time, branch and second value and current time the time, branch and second compare, if lagged in the current time, then this alarm clock is for needing the alarm clock of startup;
If the period type of alarm clock is for weekly, then with the week in this alarm time parameter, the time, branch and second value and the week of current time, the time, branch and second compare, if lagged in the current time, then this alarm clock is for needing the alarm clock of startup;
If the period type of alarm clock is every month, then with the day in this alarm time parameter, the time, branch and second value and day of current time, the time, branch and second compare, if lagged in the current time, then this alarm clock is alarm clock that need startup;
If the period type of alarm clock is annual, then with moon in this alarm time parameter, day, the time, branch and second value and moon of current time, day, the time, branch and comparing second, if lagged in the current time, then this alarm clock be need startup alarm clock;
If the period type of alarm clock is a single, then with the year, month, day, hour, min in this alarm time parameter and second value and the year, month, day, hour, min of current time and second compare, if lagged in the current time, then this alarm clock is for needing the alarm clock of startup.
Described CPU determines in the alarm clock that needs start with the method for immediate alarm clock of current time: relatively lag in the time delay of current time each start-up time that need start alarm clock, the shortest alarm clock of time delay is and immediate alarm clock of current time.
Described CPU determines in the alarm clock that needs start with the concrete grammar of immediate alarm clock of current time:
Obtain the time parameter and the period type that need to start each alarm clock in the alarm clock;
If the period type of alarm clock is every day, then with this alarm clock the time, branch and second value and current time the time, branch and comparing second, obtain this alarm clock and lag in the time delay of current time;
If the period type of alarm clock is for weekly, then with week of this alarm clock, the time, branch and second value and the week of current time, the time, branch and comparing second, obtain this alarm clock and lag in the time delay of current time;
If the period type of alarm clock is every month, then with day of this alarm clock, the time, branch and second value and the day of current time, the time, branch and comparing second, obtain this alarm clock and lag in the time delay of current time;
If the period type of alarm clock is annual, then with moon of this alarm clock, day, the time, branch and the value of second and the moon of current time, day, the time, branch and comparing second, obtain this alarm clock and lag in the time delay of current time;
If the period type of alarm clock is a single, then with the year, month, day, hour, min of this alarm clock and second value compare with the year, month, day, hour, min of current time and second, obtain this alarm clock and lag in the time delay of current time;
More above-mentioned each alarm clock lags in the time delay of current time, and the shortest alarm clock of time delay is and immediate alarm clock of current time.
As another preferred version of the present invention, described step C comprises:
C1, CPU find the parameter of current alarm clock from the alarm clock information of storage, comprising: start-up time, on off state, control at weekend, type of action, duration and prompting repeatedly;
C2, judge on off state whether for opening, if, then continue to carry out following step, otherwise, steps A returned;
C3, according to the time of judging current alarm clock start-up time whether be Saturday or Sun., if, then execution in step C4 otherwise, execution in step C5;
C4, judge whether controlled variable was expressed as and winded up an alarm clock weekend weekend, if, then continue to carry out following step, otherwise, steps A returned;
C5, send according to the type of action of the alarm clock alarm clock starter gear in electronic equipment and to represent the control signal of this type of action, and pick up counting; After the alarm clock starter gear is received described control signal, start alarm clock with corresponding action, after timing arrived described duration, CPU sent brake signal to the alarm clock starter gear, after alarm clock is received this brake signal, stopped the alarm clock action;
C6, judge and to point out parameter repeatedly whether for being, if, then carry out next step, otherwise, steps A returned;
C7, startup one timer that sets in advance;
C8, CPU judge whether to receive any signal by the message input device input of electronic equipment, if then send brake signal to the alarm clock starter gear, and return steps A; Otherwise, execution in step C9;
C9, judge whether described timer is overtime, if, execution in step C10 then; Otherwise, return step C8;
C10, with described timer zero clearing, and return step C8; Simultaneously, represent the control signal of this type of action according to the type of action of alarm clock to the transmission of alarm clock starter gear, and pick up counting; After the alarm clock starter gear is received described control signal, start alarm clock with corresponding action, after timing arrived described duration, CPU sent brake signal to the alarm clock starter gear, after alarm clock is received this brake signal, stopped the alarm clock action.
Because method of the present invention is utilized the CPU of electronic equipment, dynamically in turn in the hardware clock chip, alarm clock is set, therefore can be on the basis that utilizes cheap hardware clock chip, realize multipoint alarm clock, thereby both reduced the cost of electronic equipment, satisfied the demand of user again for multipoint alarm clock, and multipoint alarm clock the restriction that quantity is not subjected to the hardware clock chip is set, under the situation of not considering the storage space restriction, unlimited a plurality of alarm clock can be set in theory.And because this method does not have higher requirement for hardware, so the hardware range of choice of electronic equipment is very wide, and is also very flexible.In addition,, therefore can reduce, improve the work efficiency of CPU the taking of cpu resource because that method of the present invention realizes is fairly simple.
Description of drawings
Fig. 1 is the hardware structure diagram of the electronic equipment that the present invention was suitable for;
Fig. 2 is the process flow diagram of a kind of preferred embodiment of the present invention;
Fig. 3 is the process flow diagram that judges whether to need to start alarm clock;
Fig. 4 for judge with the current time near the process flow diagram of alarm clock;
Fig. 5 is CPU starts alarm clock according to the optional parameter in the alarm clock information a process flow diagram.
Embodiment
Further specify implementation method of the present invention below in conjunction with the drawings and specific embodiments.
Referring to Fig. 1, the electronic equipment that the method for the invention is suitable for comprises: hardware clock chip 11, central processing unit (CPU) 12, storer 13, alarm clock starter gear 14, message input device 15 and power management chip 16.Wherein:
Hardware clock chip 11 is common, real-time clock (RTC cheaply, Real Time Clock) chip, for example model is a DS1339 serial real-time timepiece chip, be used for accurate timing and alarm clock setting constantly is provided, this RTC chip self provides the timing in year, month, day, hour, min, second, week, and one or two alarm clock can be set simultaneously constantly, when the alarm clock that is provided with arrived constantly, this RTC chip will be exported trigger pip; In addition, this RTC chip can carry out the switching between standby power supply and the primary power automatically, so that work on when electronic equipment cuts off the power supply.
CPU 12 is used for carrying out various function operations according to other parts of the operational order control electronic equipment of program, and can finish the processing to temporal information.Carry out communication by the serial communication protocol that pre-defines between this CPU 12 and the RTC chip.When CPU 12 needs corresponding temporal information, can read from the RTC chip in real time, the temporal information that reads comprises information such as year, month, day, hour, min, second, week.CPU 12 also can be provided with temporal information according to user's input information in the RTC chip, for example adjust the current time of RTC chip, and perhaps be set the start-up time of alarm clock.
Storer 13 is used to store the parameter information of alarm clock;
Alarm clock starter gear 14 is used for notifying the user constantly to arrive by forms such as sound, vibration or text prompt;
Message input device 15 is used for the alarm clock information of customer requirements is input to CPU 12.
Power management chip 16 is used for according to the control command of CPU 12 and hardware clock chip 11 power supply being managed.
Among the present invention, CPU 12 is stored in the alarm clock information of user's input and the public alarm clock information of manufacturer's input in the storer 13, and described public alarm clock information is fixing, general alarm clock, for example alarm clock of major holiday such as the Spring Festival, National Day.Described alarm clock information is stored in the storer 13 with the form of alarm clock timetable.The content of parameter of general alarm clock information is described below, alarm clock timetable as shown in table 1 with a concrete example:
Call number 1 2 3 4
Period type Single Every day Every month Annual
Year 2004 - - -
Month 5 - - 6
Day 1 - - 1
Week 2 - 1 -
The time 13 8 12 6
Divide 30 30 30 30
Second 0 0 0 0
Type of action Vibration Jingle bell Open mobile phone Word message
Duration 30 60 20 -
Control at weekend Open weekend Close weekend - -
Prompting repeatedly Be Not Be Not
On off state Open Close Close Open
Table 1
The content of each parameter specifies in the following his-and-hers watches 1:
Call number: the sequence number that is used to retrieve an alarm clock;
Period type: represent the repetition period of alarm clock, various ways can be arranged, for example can be: single, once a day, weekly, every month once or once a year;
Year: the time that alarm clock takes place; This parameter may be invalid according to period type, for example, is weekly or mensal alarm clock for period type, and this time parameter is invalid, therefore need not to be provided with;
Month: in the month that alarm clock takes place, similar with the time parameter, this parameter may be invalid according to period type, for example, be once in a week or alarm clock once a day for period type, this in month parameter invalid, therefore need not setting;
Day: on the date that alarm clock takes place, this parameter may be invalid according to period type, for example, is weekly alarm clock for period type, and this parameter is invalid, therefore need not to be provided with;
Week: what day the expression alarm clock take place at;
The time: the one hour value that alarm clock takes place;
Divide: the score value that alarm clock takes place;
Second: value second that alarm clock takes place;
In the above-mentioned parameter, year, month, day, week, the time, branch and second be the time parameter of alarm clock, this time parameter is represented the start-up time of alarm clock, is parameter essential in the alarm clock information, must comprise time parameter in each alarm clock information.
Also comprise following parameter in the alarm clock information:
Type of action: the prompting action after the sign alarm clock arrives constantly.For example: jingle bell, vibration, literal show even open certain device or the like, the Auto Power On function of mobile phone for example, but every kind of action all needs the relevant hardware device to support;
Duration: be used for control action the time that the back continues takes place, for example jingle bell is one minute;
Control at weekend: be used for control and when the alarm clock time of origin just in time is weekend, whether allow alarm clock to take place;
Prompting repeatedly: be used for sign after alarm clock takes place, if the user does not intervene, then whether alarm clock will be restarted once at regular intervals, can avoid the user to miss alarm clock like this, perhaps avoid starting the situation that alarm clock is not enough to remind the user, for example starting an alarm clock can't wake the user from dream.The described time interval can set in advance in the storer of electronic equipment.
On off state: the user may wish temporarily that this alarm clock does not start, but not want to delete this alarm clock after setting what a alarm clock, therefore the on off state of alarm clock can be set, if be in out state, then alarm clock can start, if be in off status, then alarm clock does not start.
In above-mentioned table 1, except time parameter, other parameters are optional information, and every kind of electronic equipment can provide the set-up function of these parameters according to the function status of self, and the set-up function of these parameters also can be provided.In addition, for optional parameter, can also in electronic equipment, increase the setting of some new optional parameter according to user's request, and not only be confined to the described optional parameter of above-mentioned table 1.
Generally speaking, the storer 13 in the electronic equipment has two kinds of ROM (read-only memory) and readable and writable memories, and ROM (read-only memory) wherein is lower with respect to the readable and writable memory cost.In order further to reduce cost effectively, fix for some, general alarm clock, Spring Festival for example, the alarm clock of major holidays such as National Day, the present invention uses the parameter of ROM (read-only memory) and these alarm clocks of readable and writable memory common storage respectively, promptly the parameter that is provided with of these alarm clocks, for example on off state parameter or type of action etc., be deposited in the readable and writable memory, and with other relatively-stationary parameters of these alarm clocks, time parameter for example, store in the ROM (read-only memory), the user can be provided with the on off state of these alarm clocks by the visit readable and writable memory, so just save the storage space of readable and writable memory, thereby further reduced the electronic equipment cost effectively.
Referring to Fig. 2, the flow process of a kind of preferred embodiment of the method for the invention comprises:
Step 201, CPU 12 receives users by the alarm clock information of message input device 15 to the electronic equipment input, and with these information stores in storer 13;
After storing described alarm clock information into storer 13 or behind CPU 12 starting up, execution in step 202.
Step 202~step 203, CPU 12 read the current time from the RTC chip, and check all alarm clock informations of storer 13, determine and the current immediate alarm clock that needs to start.
Definite and the current immediate method that need start alarm clock has multiple, in the present embodiment, need at first to judge whether the alarm clock of startup, if having, then execution in step 203; Otherwise CPU 12 process ends are carried out other work; Then, determine in the alarm clock that needs start, with the immediate alarm clock of current time.
In the present embodiment, the method that judges whether the alarm clock that needs start is: the start-up time that CPU 12 compares the alarm clock that each on off state is out in current time and the alarm clock information, if lagged the start-up time of certain alarm clock in the current time, then this alarm clock needs to start.In addition, in the present embodiment, method with the immediate alarm clock of current time in the alarm clock that determine to need starts is: relatively lag in the time delay of current time each start-up time that need start alarm clock, the shortest alarm clock of time delay is and immediate alarm clock of current time.
Step 204, CPU 12 will be set to the start-up time of immediate alarm clock of current time in the RTC chip, be about to store in the register of RTC chip this start-up time, and original time in the RTC chip register is covered.
After the execution of step 204, CPU 12 can continue to handle other affairs, also can shut down and not work.
Step 205, after moment that the RTC chip is stored arrives, the RTC chip produces a trigger pip on output pin, and this trigger pip is sent to CPU 12.
In the present embodiment, described trigger pip is a look-at-me.The output pin that produces this look-at-me on the RTC chip links to each other with the look-at-me line of CPU 12, when the RTC chip when producing look-at-me, then this look-at-me sends to CPU 12 by the look-at-me line of CPU 12, and CPU 12 knows that promptly set alarm clock arrives constantly.
If electronic equipment is in off-mode, then the look-at-me of RTC chip output triggers power management chip 16, starts power supplys by power management chip 16, is CPU 12 power supplies, and the start sign in self storer is set to alarm clock start mode.After CPU 12 incoming calls start, at first read the start sign in power management chip 16 storeies, if the start that reads is designated alarm clock start mode, then execution in step 206.
Step 206, receive the trigger pip of RTC chip as CPU 12, or when starting up and the start of reading from power management chip are designated the alarm clock start again, send enabling signal to alarm clock starter gear 14, start corresponding action by alarm clock starter gear 14, constantly arrive to remind user's alarm clock; And turn back to step 202.
It is ring that the startup of alarm clock starter gear 14 action can have multiple, general action, but also can be set to other actions, and for example: vibration, literal show even open certain device etc.
If CPU 12 is starting up and start the situation of alarm clock again, then returning step 202, and after execution of step 203 and the step 204, CPU 12 sends power off command to power management chip, after power management chip is received this power off command, powered-down, electronic equipment return to original off-mode again.
By above-mentioned flow process, CPU 12 will be set in the RTC chip constantly with immediate alarm clock of current time, after starting this alarm clock, again the next one and immediate alarm clock of current time are set in the RTC chip constantly, and the alarm clock that the last time is provided with override constantly, the method execution that circulates successively like this makes that set alarm clock has only one all the time in the RTC chip, therefore the present invention's less demanding to the RTC chip both can as long as this RTC chip provides an alarm clock to set.In this manner, CPU 12 can dynamically be set to a plurality of alarm clocks in the RTC chip successively, thereby realizes multipoint alarm clock scheme cheaply.
Referring to Fig. 3, in above-mentioned steps 202, the described method for optimizing of the alarm clock that needs start that judges whether specifically may further comprise the steps:
Step 31, read the alarm clock information that on off state is out in the alarm clock information of storing, judge that whether having " period type " in this alarm clock information is the alarm clock of " every day ", if then execution in step 321; Otherwise, execution in step 33;
The on off state of the described alarm clock of following steps is all for opening.
The alarm clock information that step 321, inspection are stored finds the alarm clock that is used for comparison that meets following condition:
" period type " is " every month ", and the value of " day " alarm clock identical with the date of current time;
" period type " is " every year ", and identical with the date with the month of the current time respectively alarm clock of the value of " moon " and " day ";
" period type " is " single ", and identical with time, month and the date of the current time respectively alarm clock of value of " year ", " moon " and " day ".
Step 322, each alarm clock of finding with step 31 described " period type " alarm clock that is " every day " and step 321 " time ", the value of " branch " and " second " and current time the time, branch and second compare, if lag the start-up time of certain alarm clock and the current time, then this alarm clock is for needing the alarm clock of startup, process ends.
Step 33, judge that whether have " period type " in the alarm clock information of being stored is the alarm clock of " every month ", if then execution in step 341; Otherwise, execution in step 35;
The alarm clock information that step 341, inspection are stored finds the alarm clock that is used for comparison that meets following condition:
" period type " is " every year ", and identical with the date with the month of the current time respectively alarm clock of the value of " moon " and " day ";
" period type " is " single ", and identical with time, month and the date of the current time respectively alarm clock of value of " year ", " moon " and " day ".
" day " of step 342, each alarm clock of finding with step 33 described " period type " alarm clock that is " every month " and step 341, " time ", the value of " branch " and " second " and the day of current time, the time, branch and second compare, if lagged the start-up time of certain alarm clock in the current time, then this alarm clock is for needing the alarm clock of startup, process ends.
Step 35, judge that whether have " period type " in the alarm clock information of being stored is the alarm clock in " every year ", if then execution in step 361; Otherwise, execution in step 37;
The alarm clock information that step 361, inspection are stored finds the alarm clock that is used for comparison that meets following condition:
" period type " is " single ", and identical with time, month and the date of the current time respectively alarm clock of value of " year ", " moon " and " day ".
" moon ", " day " of step 362, each alarm clock of finding with step 35 described " period type " alarm clock that is " every year " and step 361 " time ", the value of " branch " and " second " and the month of current time, date, the time, branch and second compare, if lagged the start-up time of certain alarm clock in the current time, then this alarm clock is for needing the alarm clock of startup, process ends.
Step 37, judge that whether have " period type " in the alarm clock information of being stored is the alarm clock of " weekly ", if then execution in step 381; Otherwise, execution in step 39;
The alarm clock information that step 381, inspection are stored finds the alarm clock that is used for comparison that meets following condition:
" period type " is " weekly ", and the value in " week " alarm clock identical with the week of current time.
" week " of step 382, each alarm clock of finding with step 37 described " period type " alarm clock that is " weekly " and step 381, " time ", the value of " branch " and " second " and the week of current time, the time, branch and second compare, if lagged the start-up time of certain alarm clock in the current time, then this alarm clock is for needing the alarm clock of startup, process ends.
Whether having " period type " in the alarm clock information that step 39, judgement are stored is the alarm clock of " single ", if then execution in step 310; Otherwise, process ends;
Step 310, with period type for " year ", " moon " of all alarm clocks of " single ", " day " " time ", the value of " branch " and " second " and the time of current time, month, date, the time, branch and comparing second, if lagged the start-up time of certain alarm clock in the current time, then this alarm clock is for needing the alarm clock of startup, process ends.
Referring to Fig. 4, in above-mentioned steps 203, determine in the alarm clock that needs start to may further comprise the steps with the concrete scheme of immediate alarm clock of current time:
Step 41, judge that whether having " period type " in the alarm clock that needs start is the alarm clock of " every day ", if then execution in step 421; Otherwise, execution in step 43;
The alarm clock information that step 421, inspection are stored finds the alarm clock that is used for comparison that meets following condition:
" period type " is " every month ", and the value of " day " alarm clock identical with the date of current time;
" period type " is " every year ", and identical with the date with the month of the current time respectively alarm clock of the value of " moon " and " day ";
" period type " is " single ", and identical with time, month and the date of the current time respectively alarm clock of value of " year ", " moon " and " day ".
Step 422, each alarm clock of finding with step 41 described " period type " alarm clock that is " every day " and step 421 " time ", the value of " branch " and " second " and current time the time, branch and second compare, obtaining each alarm clock lags in the time delay of current time start-up time, each time delay that relatively obtains again, the shortest alarm clock of time delay is and immediate alarm clock of current time, process ends.
Step 43, judge that whether having " period type " in the alarm clock that needs start is the alarm clock of " every month ", if then execution in step 441; Otherwise, execution in step 45;
The alarm clock information that step 441, inspection are stored finds the alarm clock that is used for comparison that meets following condition:
" period type " is " every year ", and identical with the date with the month of the current time respectively alarm clock of the value of " moon " and " day ";
" period type " is " single ", and identical with time, month and the date of the current time respectively alarm clock of value of " year ", " moon " and " day ".
" day " of step 442, each alarm clock of finding with step 43 described " period type " alarm clock that is " every month " and step 441, " time ", the value of " branch " and " second " and the day of current time, the time, branch and second compare, obtaining each alarm clock lags in the time delay of current time start-up time, each time delay that relatively obtains again, the shortest alarm clock of time delay is and immediate alarm clock of current time, process ends.
Step 45, judge that whether having " period type " in the alarm clock that needs start is the alarm clock in " every year ", if then execution in step 461; Otherwise, execution in step 47;
The alarm clock information that step 461, inspection are stored finds the alarm clock that is used for comparison that meets following condition:
" period type " is " single ", and identical with time, month and the date of the current time respectively alarm clock of value of " year ", " moon " and " day ".
" moon ", " day " of step 462, each alarm clock of finding with step 45 described " period type " alarm clock that is " every year " and step 461 " time ", the value of " branch " and " second " and the month of current time, date, the time, branch and second compare, obtaining each alarm clock lags in the time delay of current time start-up time, each time delay that relatively obtains again, the shortest alarm clock of time delay is and immediate alarm clock of current time, process ends.
Step 47, judge that whether have " period type " in the alarm clock information of being stored is the alarm clock of " weekly ", if then execution in step 481; Otherwise, execution in step 49;
The alarm clock information that step 481, inspection are stored finds the alarm clock that is used for comparison that meets following condition:
" period type " is " weekly ", and the value in " week " alarm clock identical with the week of current time.
" week " of step 482, each alarm clock of finding with step 47 described " period type " alarm clock that is " weekly " and step 481, " time ", the value of " branch " and " second " and the week of current time, the time, branch and second compare, obtaining each alarm clock lags in the time delay of current time start-up time, each time delay that relatively obtains again, the shortest alarm clock of time delay is and immediate alarm clock of current time, process ends.
Whether having " period type " in the alarm clock information that step 49, judgement are stored is the alarm clock of " single ", if then execution in step 410; Otherwise, process ends;
Step 410, with period type for " year ", " moon " of all alarm clocks of " single ", " day " " time ", the value of " branch " and " second " and the time of current time, month, date, the time, branch and comparing second, obtaining each alarm clock lags in the time delay of current time start-up time, each time delay that relatively obtains again, the shortest alarm clock of time delay is and immediate alarm clock of current time, process ends.
Among the present invention, the also alarm clock ordering that needs can be started, do not increasing newly under the situation of alarm clock information, needn't before each startup alarm clock, all carry out determining and the immediate startup alarm clock that needs of current time, only need next alarm clock to be set in the hardware clock chip according to order as step 202 and the described calculating of step 203.
In addition, if the set-up function of some optional parameter is provided in the electronic equipment, after then CPU 12 receives the trigger pip of RTC chip, from storer 13, reads the optional parameter with the corresponding alarm clock of current time, and handle accordingly.For example, if the alarm clock information in the storer 13 except time parameter and call number, also comprises type of action, duration, control at weekend, parameter such as prompting and on off state repeatedly, then referring to Fig. 5, CPU 12 continues to carry out following steps after receiving trigger pip:
Step 501, CPU 12 read the temporal information of current alarm clock from the register of RTC chip, in storer 13, find the alarm clock corresponding according to this temporal information with this temporal information, read the optional parameter of this alarm clock, comprising: on off state, control at weekend, type of action, duration and prompting repeatedly.
Step 502, CPU 12 judge whether on off state is " opening ", if, then continue to carry out following step, otherwise, step 202 returned.
Step 503, CPU 12 judge according to temporal information whether the time of current alarm clock is Saturday or Sun., if, then execution in step 504 otherwise, execution in step 505.
Step 504, CPU 12 judge weekend, whether controlled variable was " open weekend ", if, then continue to carry out following step, otherwise, step 202 returned.
Step 505, CPU 12 represent the control signal of this type of action according to the type of action of alarm clock to 14 transmissions of alarm clock starter gear, and pick up counting; After alarm clock starter gear 14 is received described control signal, start alarm clock, for example: start ring, Vibration on Start-up etc. with corresponding action.After timing arrived described duration, CPU 12 sent brake signal to alarm clock starter gear 14, after alarm clock is received this brake signal, stopped the alarm clock action.
Step 506, CPU 12 judgements point out repeatedly whether parameter is "Yes", if, then carry out next step, otherwise, step 202 returned.
Step 507, startup one timer that sets in advance.
Step 508, CPU 12 judge whether to receive any signal by message input device 15 inputs, if then send brake signal to alarm clock starter gear 14, and return step 202; Otherwise, execution in step 509.
Step 509, CPU 12 judge whether described timer is overtime, if then execution in step 510; Otherwise, return step 508.
Step 510, CPU 12 be described timer zero clearing, and return step 508; Simultaneously, represent the control signal of this type of action according to the type of action of alarm clock to 14 transmissions of alarm clock starter gear, and pick up counting; After alarm clock starter gear 14 is received described control signal, start alarm clock with corresponding action, after timing arrived described duration, CPU 12 sent brake signal to alarm clock starter gear 14, after alarm clock is received this brake signal, stopped the alarm clock action.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with the people of this technology in the disclosed technical scope of the present invention; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.

Claims (10)

1, a kind of method that realizes multipoint alarm clock in electronic equipment is characterized in that this method is stored a plurality of alarm clock informations that comprise start-up time in electronic equipment, and this method also comprises:
The central processor CPU of A, electronic equipment reads the current time from the hardware clock chip, extract one and immediately need to start alarm clock with the current time from alarm clock information, and start-up time of this alarm clock is set in the hardware clock chip;
B, hardware clock chip need start start-up time of alarm clock when consistent in the current time with this, and notice CPU alarm clock arrives start-up time;
C, CPU start alarm clock, return steps A.
2, the method for claim 1 is characterized in that, described alarm clock information for fixing alarm clock information with alarm clock information can be set, wherein, fixedly alarm clock information is stored in the ROM (read-only memory) of electronic equipment; Can be provided with in the readable and writable memory that alarm clock information is stored in electronic equipment.
3, the method for claim 1 is characterized in that, also comprises the opportunity of triggering execution in step A: behind the CPU starting up of electronic equipment, and after in electronic equipment, storing described alarm clock information.
4, the method for claim 1, it is characterized in that, this method further comprises in step B: if CPU is in closed condition when alarm clock arrives start-up time, then at first to trigger the power management chip of electronic equipment be CPU power supply to the hardware clock chip, and the start of power management chip sign is set to alarm clock start mode; Behind the CPU starting up, the start that detects power management chip is designated alarm clock start mode, and after execution in step C and the steps A, sends power-off signal to power management chip, stops the power supply to CPU after power management chip is received, CPU is in closed condition again.
5, the method for claim 1, it is characterized in that, in the described steps A, determine to be: need the alarm clock that starts in the alarm clock information of determining to be stored, determine again to need to start in the alarm clock and immediate alarm clock of current time with the immediate method that needs to start alarm clock of current time.
6, method as claimed in claim 5, it is characterized in that, described CPU determines that the method that needs to start alarm clock is: compared with the current time start-up time in each alarm clock information of being stored, if alarm clock is lagged in the current time start-up time, and the on off state in this alarm clock information is for opening state, and then this alarm clock is for needing the alarm clock of startup.
7, method as claimed in claim 6 is characterized in that, described CPU determines that the concrete grammar that needs to start alarm clock is:
Obtain store time parameter and the period type that on off state in the alarm clock information is out each alarm clock of state;
If the period type of alarm clock is every day, then with in this alarm time parameter the time, branch and second value and current time the time, branch and second compare, if lagged in the current time, then this alarm clock is for needing the alarm clock of startup;
If the period type of alarm clock is for weekly, then with the week in this alarm time parameter, the time, branch and second value and the week of current time, the time, branch and second compare, if lagged in the current time, then this alarm clock is for needing the alarm clock of startup;
If the period type of alarm clock is every month, then with the day in this alarm time parameter, the time, branch and second value and day of current time, the time, branch and second compare, if lagged in the current time, then this alarm clock is alarm clock that need startup;
If the period type of alarm clock is annual, then with moon in this alarm time parameter, day, the time, branch and second value and moon of current time, day, the time, branch and comparing second, if lagged in the current time, then this alarm clock be need startup alarm clock;
If the period type of alarm clock is a single, then with the year, month, day, hour, min in this alarm time parameter and second value and the year, month, day, hour, min of current time and second compare, if lagged in the current time, then this alarm clock is for needing the alarm clock of startup.
8, method as claimed in claim 5, it is characterized in that, described CPU determines in the alarm clock that needs start with the method for immediate alarm clock of current time: relatively lag in the time delay of current time each start-up time that need start alarm clock, the shortest alarm clock of time delay is and immediate alarm clock of current time.
9, method as claimed in claim 8 is characterized in that, described CPU determines in the alarm clock that needs start with the concrete grammar of immediate alarm clock of current time is:
Obtain the time parameter and the period type that need to start each alarm clock in the alarm clock;
If the period type of alarm clock is every day, then with this alarm clock the time, branch and second value and current time the time, branch and comparing second, obtain this alarm clock and lag in the time delay of current time;
If the period type of alarm clock is for weekly, then with week of this alarm clock, the time, branch and second value and the week of current time, the time, branch and comparing second, obtain this alarm clock and lag in the time delay of current time;
If the period type of alarm clock is every month, then with day of this alarm clock, the time, branch and second value and the day of current time, the time, branch and comparing second, obtain this alarm clock and lag in the time delay of current time;
If the period type of alarm clock is annual, then with moon of this alarm clock, day, the time, branch and the value of second and the moon of current time, day, the time, branch and comparing second, obtain this alarm clock and lag in the time delay of current time;
If the period type of alarm clock is a single, then with the year, month, day, hour, min of this alarm clock and second value compare with the year, month, day, hour, min of current time and second, obtain this alarm clock and lag in the time delay of current time;
More above-mentioned each alarm clock lags in the time delay of current time, and the shortest alarm clock of time delay is and immediate alarm clock of current time.
10, the method for claim 1 is characterized in that, described step C comprises:
C1, CPU find the parameter of current alarm clock from the alarm clock information of storage, comprising: start-up time, on off state, control at weekend, type of action, duration and prompting repeatedly;
C2, judge on off state whether for opening, if, then continue to carry out following step, otherwise, steps A returned;
C3, according to the time of judging current alarm clock start-up time whether be Saturday or Sun., if, then execution in step C4 otherwise, execution in step C5;
C4, judge whether controlled variable was expressed as and winded up an alarm clock weekend weekend, if, then continue to carry out following step, otherwise, steps A returned;
C5, send according to the type of action of the alarm clock alarm clock starter gear in electronic equipment and to represent the control signal of this type of action, and pick up counting; After the alarm clock starter gear is received described control signal, start alarm clock with corresponding action, after timing arrived described duration, CPU sent brake signal to the alarm clock starter gear, after alarm clock is received this brake signal, stopped the alarm clock action;
C6, judge and to point out parameter repeatedly whether for being, if, then carry out next step, otherwise, steps A returned;
C7, startup one timer that sets in advance;
C8, CPU judge whether to receive any signal by the message input device input of electronic equipment, if then send brake signal to the alarm clock starter gear, and return steps A; Otherwise, execution in step C9;
C9, judge whether described timer is overtime, if, execution in step C10 then; Otherwise, return step C8;
C10, with described timer zero clearing, and return step C8; Simultaneously, represent the control signal of this type of action according to the type of action of alarm clock to the transmission of alarm clock starter gear, and pick up counting; After the alarm clock starter gear is received described control signal, start alarm clock with corresponding action, after timing arrived described duration, CPU sent brake signal to the alarm clock starter gear, after alarm clock is received this brake signal, stopped the alarm clock action.
CNB2004100746812A 2004-09-13 2004-09-13 Method for realizing multipoint alarm clock in electronic equipment Active CN100419601C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100746812A CN100419601C (en) 2004-09-13 2004-09-13 Method for realizing multipoint alarm clock in electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100746812A CN100419601C (en) 2004-09-13 2004-09-13 Method for realizing multipoint alarm clock in electronic equipment

Publications (2)

Publication Number Publication Date
CN1749887A true CN1749887A (en) 2006-03-22
CN100419601C CN100419601C (en) 2008-09-17

Family

ID=36605377

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100746812A Active CN100419601C (en) 2004-09-13 2004-09-13 Method for realizing multipoint alarm clock in electronic equipment

Country Status (1)

Country Link
CN (1) CN100419601C (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800736A (en) * 2009-02-10 2010-08-11 华为软件技术有限公司 Method and system for scheduling meeting and application server
CN101859093A (en) * 2010-06-01 2010-10-13 华为终端有限公司 Realizing method and device of alarm clock in electronic equipment
WO2010148733A1 (en) * 2009-11-17 2010-12-29 中兴通讯股份有限公司 Method and device for setting alarm clock
CN102821207A (en) * 2012-08-15 2012-12-12 北京小米科技有限责任公司 Implementation method for alarm clock under shutdown state and mobile terminal
CN103984559A (en) * 2014-05-30 2014-08-13 小米科技有限责任公司 Timing method and device
CN105162946A (en) * 2015-06-30 2015-12-16 Tcl移动通信科技(宁波)有限公司 Alarm clock processing method based on mobile terminal, and mobile terminal
CN106101406A (en) * 2016-06-07 2016-11-09 Tcl移动通信科技(宁波)有限公司 A kind of shutdown quarter-bell based on mobile terminal triggers processing method and mobile terminal
CN106657665A (en) * 2017-01-06 2017-05-10 宇龙计算机通信科技(深圳)有限公司 Repeated timing method for clock of mobile terminal and mobile terminal
CN108304031A (en) * 2018-03-07 2018-07-20 杭州先锋电子技术股份有限公司 A kind of clock travel time system, method, equipment and computer storage media
CN108322590A (en) * 2017-01-17 2018-07-24 中兴通讯股份有限公司 A kind of alarm clock setting method and device
CN109871245A (en) * 2019-03-01 2019-06-11 广州视源电子科技股份有限公司 Starting state switching method, device, equipment, system and electronic equipment
CN110286739A (en) * 2019-05-27 2019-09-27 华自科技股份有限公司 The power consumption control method and device of long-haul telemetry terminal
CN111309095A (en) * 2020-01-16 2020-06-19 广州小鹏汽车科技有限公司 Timing device, control method of timing device and terminal
CN112995405A (en) * 2019-12-02 2021-06-18 成都鼎桥通信技术有限公司 Dual-system-based shutdown alarm clock implementation method and device
CN113472946A (en) * 2021-06-30 2021-10-01 东莞市小精灵教育软件有限公司 Management method for closing terminal application and electronic equipment
CN113596244A (en) * 2021-06-24 2021-11-02 展讯半导体(南京)有限公司 Method, system, equipment and storage medium for realizing shutdown alarm clock of intelligent terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56110081A (en) * 1980-02-05 1981-09-01 Seiko Epson Corp Electronic wrist watch with alarm
JPS5788385A (en) * 1980-11-22 1982-06-02 Ricoh Elemex Corp Timepiece with alarm
JPS59218988A (en) * 1983-05-27 1984-12-10 Seiko Instr & Electronics Ltd Electronic timepiece with memo
JPS60247190A (en) * 1984-05-23 1985-12-06 Seiko Epson Corp Electronic timepiece with multichannel alarm function
CN2221795Y (en) * 1994-12-01 1996-03-06 深圳希电科技有限公司 intelligent alarm clock with multi-section reminding point
CN1120645C (en) * 2001-04-20 2003-09-03 北京首信股份有限公司 Alarm memorandum book work mode and writing method for memorandum book for mobile telephone set

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800736A (en) * 2009-02-10 2010-08-11 华为软件技术有限公司 Method and system for scheduling meeting and application server
WO2010148733A1 (en) * 2009-11-17 2010-12-29 中兴通讯股份有限公司 Method and device for setting alarm clock
CN101707639B (en) * 2009-11-17 2013-01-16 中兴通讯股份有限公司 Alarm clock setting method and device
CN101859093A (en) * 2010-06-01 2010-10-13 华为终端有限公司 Realizing method and device of alarm clock in electronic equipment
CN101859093B (en) * 2010-06-01 2011-12-28 华为终端有限公司 Realizing method and device of alarm clock in electronic equipment
US9389593B2 (en) 2012-08-15 2016-07-12 Beijing Xiaomi Technology Co., Ltd. Methods and devices for operating mobile terminal alarm clock under shutdown state
CN102821207A (en) * 2012-08-15 2012-12-12 北京小米科技有限责任公司 Implementation method for alarm clock under shutdown state and mobile terminal
WO2014026620A1 (en) * 2012-08-15 2014-02-20 小米科技有限责任公司 Method for enabling shutdown alarm clock and mobile terminal
CN102821207B (en) * 2012-08-15 2014-04-16 小米科技有限责任公司 Implementation method for alarm clock under shutdown state and mobile terminal
CN103984559B (en) * 2014-05-30 2018-06-08 小米科技有限责任公司 timing method and device
CN103984559A (en) * 2014-05-30 2014-08-13 小米科技有限责任公司 Timing method and device
CN105162946B (en) * 2015-06-30 2018-05-08 Tcl移动通信科技(宁波)有限公司 A kind of alarm clock processing method and mobile terminal based on mobile terminal
CN105162946A (en) * 2015-06-30 2015-12-16 Tcl移动通信科技(宁波)有限公司 Alarm clock processing method based on mobile terminal, and mobile terminal
CN106101406A (en) * 2016-06-07 2016-11-09 Tcl移动通信科技(宁波)有限公司 A kind of shutdown quarter-bell based on mobile terminal triggers processing method and mobile terminal
CN106101406B (en) * 2016-06-07 2020-04-07 Tcl移动通信科技(宁波)有限公司 Shutdown alarm triggering processing method based on mobile terminal and mobile terminal
CN106657665B (en) * 2017-01-06 2019-11-12 宇龙计算机通信科技(深圳)有限公司 A kind of method and mobile terminal of the multiple timing of mobile terminal clock
CN106657665A (en) * 2017-01-06 2017-05-10 宇龙计算机通信科技(深圳)有限公司 Repeated timing method for clock of mobile terminal and mobile terminal
CN108322590A (en) * 2017-01-17 2018-07-24 中兴通讯股份有限公司 A kind of alarm clock setting method and device
WO2018133582A1 (en) * 2017-01-17 2018-07-26 中兴通讯股份有限公司 Alarm clock setting method and apparatus
CN108304031A (en) * 2018-03-07 2018-07-20 杭州先锋电子技术股份有限公司 A kind of clock travel time system, method, equipment and computer storage media
CN109871245A (en) * 2019-03-01 2019-06-11 广州视源电子科技股份有限公司 Starting state switching method, device, equipment, system and electronic equipment
CN110286739A (en) * 2019-05-27 2019-09-27 华自科技股份有限公司 The power consumption control method and device of long-haul telemetry terminal
CN110286739B (en) * 2019-05-27 2021-02-05 华自科技股份有限公司 Power consumption control method and device of remote telemetry terminal
CN112995405A (en) * 2019-12-02 2021-06-18 成都鼎桥通信技术有限公司 Dual-system-based shutdown alarm clock implementation method and device
CN112995405B (en) * 2019-12-02 2022-04-26 成都鼎桥通信技术有限公司 Dual-system-based shutdown alarm clock implementation method and device, storage medium and equipment
CN111309095A (en) * 2020-01-16 2020-06-19 广州小鹏汽车科技有限公司 Timing device, control method of timing device and terminal
CN111309095B (en) * 2020-01-16 2022-02-15 广州小鹏汽车科技有限公司 Timing device, control method of timing device and terminal
CN113596244A (en) * 2021-06-24 2021-11-02 展讯半导体(南京)有限公司 Method, system, equipment and storage medium for realizing shutdown alarm clock of intelligent terminal
CN113596244B (en) * 2021-06-24 2023-06-23 展讯半导体(南京)有限公司 Method, system, equipment and storage medium for realizing shutdown alarm clock of intelligent terminal
CN113472946A (en) * 2021-06-30 2021-10-01 东莞市小精灵教育软件有限公司 Management method for closing terminal application and electronic equipment

Also Published As

Publication number Publication date
CN100419601C (en) 2008-09-17

Similar Documents

Publication Publication Date Title
CN1749887A (en) Method for realizing multipoint alarm clock in electronic equipment
CN1292345C (en) Method and system for synchronous playing audio-video at BREW platform
CN1598851A (en) System and method for an OMA dm extension to manage mobile device configuration settings
CN1705932A (en) Method and system for recalling details regarding past events
CN1394308A (en) Arithmetic processing system and control method, task management system and method
CN1523475A (en) Short information system and method
CN1842975A (en) Mobile station
CN100341281C (en) Method for realizing task management for network system
CN1770886A (en) Cellular phone for recording and automatic transmission of multimedia messages
CN1310148C (en) Program execution terminal device, program execution method, and program
CN1929662A (en) Multimedia information notification device of portable terminal and method
CN101552835A (en) Method of mobile phone information cue and mobile phones
CN1816180A (en) Speech communication system and talker right reservation method
CN1473396A (en) System and method for modifying display formation of mobile phone
CN1701320A (en) Reconfigurable signal processing module
CN1942854A (en) Screen transition control device
CN1688127A (en) Method for implementing multi-channel warning service and warning managing system
TWI283527B (en) A method for managing the power state of a mobile communication device
CN1469670A (en) Communication terminal for limiting content use
CN1285229C (en) Method, system for acquiring status information of mobile subscriber and corresponding subscriber identification module
CN1342000A (en) Portable information terminal, communication method and recording medium
CN101031107A (en) System, apparatus and method for realizing SMS advertisement service
CN1581902A (en) Mobile telephone terminal, method and system for back-up of telephone directory information of mobile telephone terminal
CN103327161A (en) Terminal and rapid starting-up method
CN1787611A (en) Portable electronic apparatus, information processing method, and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant