Electronic timepiece with an alarm and method for setting the alarm time

Abstract: An electronic timepiece with an alarm which permits easy setting of an alarm time which is relatively close to the current time. The electronic timepiece has an alarm time setting mode in which an alarm time is set using an input switch and an alarm setting/resetting means which is reset when the set alarm coincides with the current time and which is set when they no longer coincide with each other. When the alarm setting/resetting means is in the reset state, the current time is stored in an alarm time storing means. The alarm is sounded when the alarm setting/resetting means has been set and when the set alarm time coincides with the current time.

Description: The present invention relates to an electronic timepiece having an alarm and to a method for setting an alarm time of an electronic timepiece. More particularly, but not exclusively, the invention relates to an electronic timepiece having an alarm which can be set to a time which is relatively close to the current time in a simple operation. A conventional typical electronic alarm clock has an alarm mode and a non-alarm mode. Regardless of whether the clock is in the alarm mode or non-alarm mode, i.e. whether the alarm has been set as ON or reset as OFF, the time at which the alarm is set to sound does not vary with the current time displayed by the clock. Further, the conventional typical electronic alarm clock is designed to sound the alarm initially at the time at which the alarm is set to sound and each time the current time subsequently coincides with the time at which the alarm is set to sound. This type of electronic alarm clock, however, is inconvenient when an alarm time needs to be set for a time which is relatively close to the current time. More specifically, if the alarm time, which has been set previously, is far apart from the current time, it takes a considerable amount of time to set a new alarm time, which makes setting the alarm time troublesome. To solve the aforesaid problem, the present applicant has proposed a method for setting the alarm time by successively adding one minute to the current time. The set alarm time is indicated in the alarm time setting mode. This arrangement is described in Japanese Patent Application No. 5-198603 (laid-open no. 7-55967). The electronic alarm clock described is suitable for setting an alarm time which is relatively close to the current time without undue inconvenience to the user. The method, however, still has some room for improvement. To be specific, according to the method, if the alarm time setting switch is accidentally pressed, then the alarm time is set for the current time plus one minute. As a result, an unwanted alarm will be sounded within a minute from the moment the alarm time setting switch was accidentally pressed. This results in a useless noise being produced which is a nuisance to the user, and shortens battery life due to the wasteful consumption of power caused by the alarm sounding when not required. The method has another problem associated therewith: the alarm time setting mode is undesirably switched to another mode immediately if the alarm time is decremented in the alarm time setting mode until the current time is reached or when resetting the alarm sound to OFF. The sudden change from the alarm time setting mode to another mode tends to confuse the user and it is inconvenient in operation. US 4099371A describes an electronic timepiece including an optical display for both time and an alarm time setting. US 4255802A relates to a pair of touch sensitive electrostatic capacitance switches provided on a timepiece. US 4269025A describes electronic timepieces which generate alarms. US 5289452A relates to an electronic analog timepiece including a plurality of indicators on a face of the timepiece. An object of the present invention is to solve at least some of the problems described above, and, more particularly, to improve on the method described in Japanese Patent Application No. 5-198603. Hence, it is an object to the present invention to provide a user-friendly electronic timepiece having an alarm which permits easy setting of an alarm time which is relatively close to the current time. It is another object of the present invention to prevent an unwanted alarm from sounding even if the alarm time setting mode switch is accidentally pressed. It is still another object of the present invention to eliminate inconveniences to the user and thereby to improve the operability when the alarm time setting mode is replaced by another mode. According to the present invention, a timepiece is provided as claimed in claim 1. For a better understanding of the invention, embodiments will now be described by way of example, with reference to the accompanying drawings, in which:- Fig. 1 is a block diagram showing the hardware components of an electronic alarm clock; Fig. 2 is a diagram showing the appearance of an embodiment of the electronic alarm clock; Fig. 3 is a block diagram showing a first embodiment; Fig. 4 is a flowchart illustrating the basic operation of the first embodiment; Fig. 5 is a flowchart illustrating the procedure for setting an alarm time in the first embodiment; Fig. 6 is a block diagram showing a modification of the first embodiment; Fig. 7 is a flowchart mainly illustrating the operation of an alarm sounding period counting means of the modification of the first embodiment; Fig. 8 is a flowchart mainly illustrating the operation of an input control means of the modification of the first embodiment; Fig. 9 is a block diagram showing a second embodiment; Fig. 10 is a flowchart illustrating the change from a basic clock mode to an alarm time setting mode in the second embodiment; Fig. 11 is a flowchart illustrating the change from the alarm time setting mode to the basic clock mode in the second embodiment; Fig. 12 is a block diagram showing a third embodiment; Fig. 13 is a flowchart illustrating the operation of the third embodiment; and Fig. 14 is a timing chart for illustrating the operation of the third embodiment. Two modes of the alarm are referred to in the description: "set" and "reset". In the former mode the alarm may sound, and in the latter mode the alarm will not sound. The term "basic time" used in the description and drawings means the current time which is timed by the basic lock timing means. Also, the symbol "AL" used in the drawings is an abbreviation for "alarm". The embodiments described all relate to alarm clocks. However, the invention can be applied to any device giving an indication of time (a timepiece) and having an alarm. First, the construction of the whole electronic clock to which the present invention is applied will be described. Fig. 1 is a hardware block diagram showing the entire construction of an electronic alarm clock. The electronic clock shown in the drawing includes a microprocessor 1, an LCD panel 10, a group of switches 11 and an alarm sounding means 14. The microprocessor 1, which controls the entire electronic clock, has a oscillating circuit 2. The output of the oscillating circuit 2, which is divided by a frequency dividing circuit 3, is used as a system clock of the microprocessor 1. Another output of the frequency dividing circuit 3 is supplied to an interrupt control circuit 4 where it is used as an interrupt timing signal. The interrupt control circuit 4 controls the interrupt by an internal and external signal of the microprocessor, which are not shown, and it is connected to an input control circuit 12 and a control circuit 5. The control circuit 5 is a central section which controls the start and stop and other operations of the microprocessor 1. The control circuit 5 also controls the setting of alarm time. The aforesaid control circuit 5, a ROM 6 for storing the program for controlling the operation of the electronic clock, a RAM 7 for storing various data required for the operation of the electronic clock, a display control circuit 9 for controlling the display related to the clock, the input control circuit for monitoring the states of the group of switches 11 and for controlling the switch inputs, and an alarm control circuit 14 for controlling the sounding of the alarm sounding means 13 are interconnected via an internal bus 15. The alarm sounding means 14 employed for this embodiment is a piezoelectric buzzer. However, the alarm sounding means is not limited thereto; it may alternatively be an acoustic speaker, bell, tuning fork, vibrator or any other suitable means provided they vibrate at a predetermined frequency to notify an operator. Since the frequency dividing circuit 3 is connected to the internal bus 15, the state of the frequency dividing circuit 3 can be read by the program. Likewise, since the interrupt control circuit 4 is connected to the internal bus 15, the setting of an interrupt condition and reading of an interrupt command can be performed by the program. A part of the RAM 7 is equipped with an alarm time memory 18 which functions as an alarm time storing means. The alarm time memory 8, however, need not necessarily be installed in the RAM 7; it may alternatively be an independent memory or register, or it may be provided in a non-volatile RAM. A display panel 10 and the group of switches 11 will now be described. Fig. 2 is a diagram showing the appearance of the clock face of an embodiment of the electronic alarm clock. The drawing shows an alarm time set in the alarm setting mode. The LCD panel 10 in the drawing is located at the front central area of the main body 20 and it is divided into a current time display area 16 and an alarm time display area 17. The current time display area 16 always shows the current time in hours, minutes and seconds. In the alarm time setting mode, the alarm time display area 17 shows the time set by operating the group of switches 11, which will be discussed later. Once an alarm time has been set, the set alarm time remains displayed until the alarm is sounded, even in the basic clock mode, i.e. not in the alarm time setting mode. Conversely, the basic clock mode, i.e. not in the alarm setting mode, when no alarm time has been set, the same value as the hour and minute of the current time is displayed. In other words, in this case, the alarm time is displayed so that it automatically follows the current time. There is another method for displaying the alarm time. As an alternative, for example, the alarm time is not displayed in the usual basic clock mode but displayed only in the alarm time setting mode, which will be discussed later. This is possible since, in this embodiment, the alarm time is identical to the current time in the basic clock mode with no alarm time set, and therefore there is no special need for displaying the duplicate time information. Further, although this embodiment has the current time display area 16 and the alarm time display area 17, the number of display areas may alternatively be only one; the same one area may display the current time in the usual basic clock mode and an alarm time rather than the current time in the alarm time setting mode. In this case, the display of the seconds should be OFF in the alarm time setting mode. The setting of the seconds of an alarm time to be set is unlikely to be required, and turning the display of the seconds OFF makes it easier to recognise whether the displayed time is the current time or the alarm time. Furthermore, although this embodiment employs an LCD panel as the display means, the display means is not limited thereto; it may be, for instance, a light emitting diode (LED), an electroluminescent element, a fluorescent display tube, a discharge tube, an incandescent lamp, a non-luminescent numeral display panel, or the like. Although the embodiment employs a digital display, an analog display may be used instead of the digital display. The group of switches 11 comprise a first external control switch 18 and a second external control switch 19, which are pushbutton switches. When either one of the switches 18, 19 is depressed, the alarm time setting mode is effected. When the first external control switch 18 is depressed, the alarm time is set for the current time plus one minute and this set alarm time is displayed in the alarm time display area 17. When the second external control switch 19 is depressed, the alarm time is set for the current time minus one minute and this set alarm time is displayed in the alarm time display area 17. Also at this time, an alarm set mark 21, which indicates that the alarm sounding has been set, is displayed in the alarm time display area 17. The alarm set mark 21 turns OFF when the alarm sounding is reset. The first external control switch 18 and the second external control switch 19 are located on a side surface of the main body 20; however, they may be located at other places of the main body 20 as long as they do not interfere with the operation thereof. In general, however, it is easier to operate the switches on the side surface of the main body rather than on the surface with the LCD panel, i.e. the surface of the display unit, of the main body 20; therefore, the side surface of the main body 20 is more desirable for mounting the switches. The switches, however, may be located on the display unit if the display unit, i.e. the LCD panel, is sufficiently large. The embodiment employs pushbutton switches, but it may employ other types of switches including, for example, slide switches and touch-sensitive switches. The touch-sensitive switches are ideally used especially when mounting them on the display unit. The operation of embodiments of the electronic alarm clock will now be described. Fig. 3 is the block diagram showing the first embodiment of the electronic alarm clock. In the drawing, a basic clock timing means 101 performs the timing function of the clock. The time information, i.e. the current time, obtained from the basic clock timing means 101 is displayed in the current time display area 16 shown in Fig. 2. The time information is supplied also to an alarm gate 108 and an alarm coincidence detecting means 104. An alarm timing storing means 103, i.e. the alarm time memory 8 shown in Fig. 1, stores either an arbitrary alarm time set by an alarm time setting means 102 or the time information, i.e. the current time, obtained from the basic clock timing means 101 through the alarm time gate 108. The alarm time setting means 102 is designed so that an alarm time is set using an input switch, i.e. the first external control switch 18 or the second external control switch 19 as shown in Fig. 2. The alarm time setting means 102 issues an alarm time setting mode signal which indicates that the alarm time setting means 102 has be actuated, causing the alarm coincidence detecting 104 to issue a time coincidence detection signal, which will be described later. The information stored in the alarm time storing means 103 is displayed in the alarm time display area 17 shown in Fig. 2 via the display control circuit 9 shown in Fig. 1. The alarm time storing means 103 is connected to the alarm coincidence detecting means 104. The alarm coincidence detecting means 104 detects whether the alarm time stored in the alarm time storing means 103 agrees with the current time provided by the basic clock timing means 101. An alarm setting/resetting means 106 is furnished with the output, i.e. the time coincidence detection signal, of the alarm coincidence detecting means 104 and the output signal, i.e. the alarm time setting mode signal, of the alarm time setting means 102. The output, i.e. the time coincidence detection signal, of the alarm coincidence detecting means 104 and the set signal indicating the set state of the alarm setting/resetting means 106 are supplied to an alarm sounding gate 109. The alarm setting/resetting means 106 is set when the alarm time setting means 102 is issuing the alarm time setting mode signal and when the alarm coincidence detecting means 104 is not issuing the time coincidence detection signal, that is, when the set alarm time is different from the current time. This set state is maintained even after the issuance of the alarm time setting mode signal is stopped. After that, the alarm sounding gate 109 opens when the passage of time results in the alarm coincidence detecting means 104 detecting the coincidence between the alarm time and the current time. This actuates the alarm sounding control means 105 to drive an alarm sounding means 107 for a predetermined time to sound the alarm. Then, the alarm setting/resetting means 106 is switched from the set state to the reset state. While the alarm setting/resetting means 106 is set, the alarm set mark 21 is shown in Fig. 2 turns ON, while it turns OFF when the alarm setting/resetting means 106 is reset. Unless the alarm setting/resetting means 106 is set, it is maintained in the reset state at all times. As long as the alarm setting/resetting means 106 is reset, the reset signal is sent to the alarm time gate 108. As a result, the alarm time gate 108 opens and the information obtained by the basic clock timing means 101, i.e. the current time, is stored in the alarm time storing means 103. This makes the alarm time automatically follow the current time. The operation shown in the aforesaid block diagram given in Fig. 3 will now be discussed in further detail with reference to the flowcharts given in Fig. 4 and Fig. 5. The flowchart shown in Fig. 4 illustrates a basic program which is actuated each time a 1Hz interrupt is received through an interrupt control circuit 4 shown in Fig. 1. This means that the program is implemented every second. First, the basic time is timed by the basic clock timing means 101 (step 201) and it is determined whether the basic time is at zero seconds, i.e. whether a minute-digit increment has occurred (step 202). At this time, if the basic time is at zero seconds, then it is determined whether the alarm has been set, i.e. whether the alarm setting/resetting means 106 has been set (step 203). If the alarm has been set, then it is determined whether the alarm time coincides with the basic time (step 205) and if they are found to coincide with each other, the alarm is sounded (step 206). If it is found in step 203 that the alarm has not been set, that is, if the alarm setting/resetting means 106 is in the reset state, then the basic time is stored in the alarm time memory 8 shown in Fig. 1 and the basic time is taken as the alarm time (step 204). Hence, the alarm is identical to the basic time in the alarm reset state and therefore the alarm time is counted in the same manner as the basic time is counted. Fig. 5 shows the flowchart illustrative of the operation in the alarm time set mode. First, in the basic clock mode, if an input through a switch, i.e. either the first external control switch 18 or the second external control switch 19 shown in Fig. 2 for incrementing or decrementing the alarm time, respectively, is detected (step 301), then the alarm time set mode is effected, then the alarm time is incremented or decremented according to the switch which has been depressed (step 302). This embodiment is designed to increment or decrement the alarm time on a basis of one minute. The increment/decrement is not limited to one minute; it may be 10 minutes, one hour, one second, etc., as appropriate for each application. In the next step, the alarm time and the basic time are checked for coincidence (step 303) and if they are found to coincide with each other, then the alarm setting/resetting means 106 is reset (step 305), or if they are not found to coincide, then the alarm setting/resetting means 106 is set (step 304). Regardless of whether step 304 or step 305 is implemented, the alarm time setting mode is switched to the basic clock mode before the flow of operation is completed. Accordingly, for example, when the alarm time set is 7:59 and the basic time is 8:00, if the incrementing switch, i.e. the first external control switch 18, is depressed to cause the alarm time to be set to 8:00, then the alarm is reset. With this condition maintained, the alarm time becomes 8:01 when the basic time becomes 8:01 and the alarm time becomes 8:02 when the basic time becomes 8:02 in accordance with the flowchart in Fig. 4. With both basic time and alarm time being 8:02, if the incrementing switch is depressed and the alarm time reaches 8:03, then the alarm is set. If this condition is maintained, the alarm is sounded when the basic time becomes 8:03 in accordance with the flowchart shown in Fig. 4. A modification of the first embodiment will now be described. The modification relates to the control of the alarm sounding time, the interruption of alarm sounding, and the resetting of the alarm setting/resetting means in accordance with the alarm sounding control. Fig. 6 is the block diagram showing the modification of the first embodiment. In the drawing, the basic clock timing means 101, the alarm time setting means 102, the alarm time storing means 103, the alarm coincidence detecting means 104, the alarm sounding means 107, the alarm time gate 108, and the alarm sounding gate 109 share the same functions and constructions as those of the first embodiment stated above and further explanation thereof will be omitted. When an alarm setting/resetting means 406 is in the set state, if the alarm coincidence detecting means 104 issues the time coincidence detection signal, then the alarm sounding gate 109 opens and the alarm is sounded. At this time, an alarm sounding control means 405 controls the operation of the alarm sounding means 107. In this embodiment, an alarm sounding time counting means 408 and an input control means 409 are connected to the alarm sounding control means 405. The alarm sounding time counting means 408 functions as a time counter for determining the alarm sounding duration. The input control means 409 detects an input from an alarm sounding stop switch, which is not shown, and issues a command signal for stopping the alarm sounding. Hence, the alarm sounding control means 405 stops the alarm sounding when it is detected that the alarm has sounded for the required duration, which is determined by the alarm sounding time counting means 408, or when the input control means 409 detects that the alarm sounding stop switch has been depressed. As soon as the alarm sounding is stopped, the alarm sounding control means 405 sends out a signal for resetting the alarm setting/resetting means 406 to the alarm setting/resetting means 406. The operation involved in the block diagram of Fig. 6 will be explained in more detail with reference to the flowcharts given in Fig. 7 and Fig. 8. Fig. 7 shows the flowchart for illustrating the operation of the alarm sounding time counting means 408. As in the case of the program illustrated by the flowchart of Fig. 4, the flowchart given in Fig. 7 also indicates the program which is actuated when the 1Hz interrupt is received through the interrupt control circuit 4 shown in Fig. 1. In other words, the program is executed every second. First, the basic clock timing means 101 shown in Fig. 6 counts the basic time (step 501) and determines whether the basic time is at zero seconds, that is whether the minute digit has been incremented (step 502). At this time, if the basic time is found to be at zero seconds, then it is further determined whether the alarm has been set, i.e. whether the alarm setting/resetting means 106 has been set (step 503). If the alarm is found to have been set, then the alarm time is checked for coincidence with the basic time (step 505); if the coincidence is detected, then the alarm is sounded (step 506). Conversely, if it is found in step 503 that the alarm has not been set, i.e. the alarm setting/resetting means 106 has been reset, then the basic time is stored in the alarm time memory 8 shown in Fig. 1 and the alarm time is adopted as the basic time (step 504). The procedure up to this step is the same as that shown in the flowchart of Fig. 4. At step 506 the alarm is sounded, and parameter N of the alarm sounding time count is set to 0 (step 507), N denoting the parameter for determining the alarm sounding duration. If it is determined in step 502 that the basic time is other than at zero seconds, and the alarm is sounding (step 508), then parameter N of the alarm sounding time count is incremented (step 509). When N reaches a predetermined value, e.g. 20, (step 510), the alarm sounding is stopped (step 511). Further, the resetting signal is sent to the alarm setting/resetting means 106 shown in Fig. 6 to reset the alarm (step 512). In this embodiment, the alarm sounding duration is set to 20 seconds. However, the alarm sounding duration may be set to any desired value, but for convenience this should be less than one minute. No special operation is required for setting the alarm sounding duration to less than one minute since the alarm time coincides with the basic time when the alarm sounding stops. However, if the alarm sounding duration is set to 1 minute or more, then the alarm time differs from the basic time, that is, the basic time will be the alarm time plus one minute. Therefore, in this case, the alarm is reset in step 512 first, then the basic time is copied into the alarm time memory 8 so as to implement the processing with the alarm time adopted as the basic time. In other words, the same processing as that in step 504 is carried out. A prolonged alarm sounding can be accomplished by adding a slight change to the flowchart shown in Fig. 7. The following is a brief description of two possible methods. In the first method, an extra step for determining whether the alarm is sounding is added between step 501 and step 502. If the alarm is not sounding, then the program proceeds to step 502 and if the basic time is other than at zero seconds, then program terminates the routine. If the alarm is sounding, then the program proceeds to step 509. In this case, the count value in step 510 is set to a value larger than 20 (e.g. 100 and 200). In the second method, an extra step for determining whether the alarm is sounding is added between step 502 and step 503. If it is found in step 502 that the basic time is other than at zero seconds, then the routine is terminated. If it is found that the alarm is not sounding, then the program goes to step 503. If the alarm is sounding, then the program proceeds to the routine from step 509 to step 512. In this case, the alarm sounding duration is set on a basis of one minute. Therefore, when the count value is set to 5 in step 510, the alarm sounds for 5 minutes. The following describes the case where the alarm sounding is stopped by pressing a switch rather by setting the alarm sounding duration. Fig. 8 shows the flowchart for illustrating the operation of the input control means 409. First, it is determined whether an input has been given through a switch, which is not shown, (step 601) and if the determination result is affirmative, then it is further determined whether the alarm is sounding (step 602). If the alarm is sounding, the alarm is stopped (step 603) and the alarm is reset (step 604). As in the case of the operation illustrated by the flowchart of Fig. 7, no special operation is required if the alarm sounding time is shorter than one minute since the alarm time coincides with the basic clock time when the alarm stops sounding. If the alarm sounding time is one minute or longer, then the basic time is copied in the alarm time memory 8 after step 604 so as to implement the processing for adopting the alarm time as the basic time. The first external control switch 18 or the second external control switch 19 shown in Fig. 2 is suitably employed for this embodiment. These switches are intended to be used for setting the alarm time; however, they can be used for stopping the sounding alarm since there is no need for setting the alarm time while the alarm is sounding. Either one or both of the switches may be used for stopping the sounding alarm. Alternatively, a separate switch from the first external control switch 18 or the second external control switch 19 may be provided. Another modification of the first embodiment will now be described briefly. The modification relates to the selection of whether the alarm setting/resetting means should be reset after the alarm is sounded. In the first embodiment shown in Fig. 3, the alarm setting/resetting means 106 is switched to the reset state after the alarm is sounded. This prevents the alarm from being actuated unless a new alarm time is set. The alarm time automatically follows the basic time. The first embodiment provides a "one-time alarm". Alternatively, the alarm setting/resetting means 106 may not be switched to the reset state after the alarm is sounded. In this case, since the alarm setting/resetting means 106 remains in the set state, the alarm time does not follow the basic time; instead, it remains as the same alarm time that has been set. Thus, the alarm sounds again when a predetermined time elapses, providing a "repeatable alarm". This modification is designed to provide an operator, i.e. user, with a selection between the "one-time alarm" and the "repeatable alarm". The following is a brief description of the mechanism. In the block diagram given in Fig. 3, a selecting means for selecting whether the alarm setting/resetting means 106 should be reset is added and the output of the selecting means controls the resetting of the alarm setting/resetting means 106. The selecting means is controlled by the input of an external control switch, which is not shown, so as to enable the operator to select whether the alarm setting/resetting means 106 should be reset. The aforesaid first external control switch 18 or the second external control switch 19 may be used as the external control switch for making the selection or a separate switch may be added. A series of these control steps can be implemented by software. To be more specific, in the flowchart shown in Fig. 7, for instance, the alarm resetting in step 512 can be changed. Instead of always resetting the alarm, a routine for determining whether the alarm is to be reset or not is added, so that the alarm is not reset when an input is given through an external control switch or the like, for example, and the alarm is reset when no input is given through the switch. This structure enables two different types of alarm setting in accordance with the intent of the operator. Further, different modes of alarm sounding may be provided for the one-time alarm and the repeatable alarm. More specifically, the sounding pattern, which includes alarm sounding interval and sounding length, or the alarm sound frequency or the like could be changed. The differences in alarm sound make it easier to distinguish between the one-time alarm and the repeatable alarm. The second embodiment of the electronic alarm clock will now be described with reference to the block diagram shown in Fig. 9 and the flowcharts given in Fig. 10 and Fig. 11. The second embodiment is characterised by the operation in the alarm time setting mode. In particular, methods are employed to reduce the likelihood of the alarm being set accidentally. Fig. 9 is the block diagram showing the second embodiment of the electronic alarm clock. In the drawing, the basic clock timing means 101, the alarm time storing means 103, the alarm coincidence detecting means 104, the alarm sounding control means 105, the alarm setting/resetting means 106, the alarm sounding means 107, the alarm time gate 108 and the alarm sounding gate 109 share the same functions and constructions as those of the first embodiment described above and further explanation thereof will be omitted. An alarm time setting means 703 according to the second embodiment is designed to carry out two steps of operation; in the first step, the basic clock mode (the second mode) is switched to the alarm time setting mode (the first mode), and in the second step, the alarm time is set. The first step is performed when an initial indication that the alarm is to be set is received, e.g. through a switch such as the aforesaid first external control switch 18 or the second external control switch 19. Of course, a separate switch may be added for this purpose. However, the second step is only performed if a secondary indication is given that the alarm is to be set. In this embodiment, this secondary indication may be either a second depression of the switch by the user within a certain time period, or by the user depressing the switch for a predetermined time period. Thus, if the alarm setting/resetting means 106 is in the reset state and the switch is initially operated to set the alarm, a timer is started in a time period counting means 701. When the reset period counting means 701 has reached a predetermined value and no secondary indication that the alarm is to be set is provided, a mode control means 702 sends a command to the alarm time setting means 703 for switching the electronic clock from the alarm time setting mode to the basic clock mode. This prevents the alarm time from being set through the alarm time setting means 703. The operation involved in the block diagram will be described in more detail in conjunction with the flowcharts given in Fig. 10 and Fig. 11. Fig. 10 shows the flowchart illustrating the operation of switching from the basic clock mode to the alarm time setting mode. It is assumed that the electronic clock is currently in the basic clock mode, and the current mode will be changed to the alarm time setting mode by an input through a switch as described above. In the basic clock mode (step 801), when it is detected that an input has been given through the alarm time setting mode switch (step 802), the mode of the electronic clock is replaced by the alarm time setting mode switch (803), and parameter k for measuring a time period is reset to zero (step 804). At this time, however, the state of the alarm setting/resetting means 106 remains unchanged. Hence, pressing the alarm setting mode switch just once does not bring up the alarm setting mark 21 and it does not change the alarm time either. More specifically, if the alarm time has not been set, then the alarm time remains the same as the basic time; if the alarm time has been set, then the set alarm time is displayed. Pressing the switch again under such a condition causes the alarm setting mark 21 to be displayed and the alarm time to be changed. If the first external control switch 18 is pressed, then the alarm time is incremented by one minute; if the second external operating switch 19 is pressed, then the alarm time is decremented by one minute. The alarm setting/resetting means 106 is then set. In other words, pressing the switch twice enables the setting of the alarm time. Fig. 11 shows the operation involved in the switching from the alarm time setting mode to the basic clock mode. The program based on the flowchart shown in Fig. 11 is activated when the 1Hz interrupt is received through the interrupt control circuit 4 shown in Fig. 1. First, the basic time is checked (step 901) to determine whether the basic time is at zero seconds, i.e. whether a minute-digit increment has occurred (step 902). If the basic time is found to be other than at zero seconds, then the program is terminated without any further operation. If the basic time is found to be at zero seconds, then it is determined whether the electronic clock is in the alarm set state or not (step 903). The alarm set state refers to a state wherein the alarm setting/resetting means 106 has been set. If the alarm set state is detected, then k is reset to zero (step 904) and the alarm time is checked for coincidence with the basic time (step 905). If the coincidence is detected, the alarm is sounded (step 906). If it is determined in step 903 that the alarm is not in the set state, i.e. the alarm is in the reset state, then the basic time is copied into the alarm time memory and the alarm time is adopted as the basic time (step 907). Accordingly, in the alarm reset state, the alarm time becomes the same as the basic time and it is incremented as the basic time is incremented. Further, if the electronic clock is in the alarm time setting mode (step 908), for example due to the initial depression of the switch, as described above, then k is incremented by 1 (step 909). If k reaches 3 and no secondary indication is received that the alarm is to be set, then k is reset to zero (step 910), and the alarm time setting mode is switched to the basic clock mode (step 912). According to the arrangements shown in Fig. 9 to Fig. 11, simply changing the alarm time setting mode causes the alarm reset state to be maintained. If no switch is pressed under this condition, then the mode is automatically switched back to the basic clock mode in 2 to 3 minutes. Hence, pressing the alarm time setting mode switch just once will not set the alarm and the basic clock mode is restored in a predetermined time. This feature prevents an unwanted alarm from sounding even if the switch is pressed by mistake. According to the method described above, the setting of the alarm time is enabled by pressing the switch twice intermittently. In another method for operating the alarm time setting mode switch, which will be briefly described below, the alarm time can be set by pressing the switch once. The moment the alarm time setting mode switch is pressed, the alarm time setting mode is effected. At this time, of course, the alarm setting/resetting means 106 is still in the previous state and therefore the alarm is not sounded in this state. Thus, the state set by the operation of the switch is maintained. When the state continues for a predetermined time, e.g. about 2 seconds, the alarm time is incremented or decremented depending on which switch has been pressed, then the alarm time is set. According to the method, pressing the switch once allows the alarm time to be set. Usually, an accidental depression of the switch will last only for a short time of one second or less. Therefore, this method should distinguish between accidental and deliberate operation of the switch. In the description of the second embodiment, although the basic clock mode is taken as an example of the second mode wherein no alarm time can be set, the second mode is not restricted thereto; it may be another mode including, for example, the setting mode of the basic clock time (e.g. for the setting of time-zone differences or summer time), an environmental data measuring mode (temperature, humidity, atmospheric pressure, wind velocity, water pressure, azimuth, acceleration or kinetic state, the amount of ultraviolet rays, the amount of radioactive rays, illuminance, the intensity of electric field, the intensity of magnetic field, the detection of gas, etc.), a dividing mode (a mode for handling the information related to diving operation which includes the depth of water, diving time, possible diving time/depth, and the volume of remaining air), a data analysis mode (a mode for selecting, converting, computing, displaying and storing gathered data), and a communication mode (a mode for exchanging data with separate equipment from the main body of the electronic clock). The following describes the third embodiment of the electronic alarm clock in conjunction with the block diagram shown in Fig. 12, the flowchart shown in Fig. 13 and the timing chart shown in Fig. 14. The third embodiment is characterised by its alarm time setting method in the alarm time setting mode; it particularly relates to a control method which increments/decrements the alarm time at high speed. Fig. 12 is the block diagram showing the third embodiment of the electronic alarm clock. In the drawing, an input control means 1002 detects whether a switch 1001 for setting the alarm has been operated, i.e. whether an input has been provided by the switch. As the switch for this purpose, the aforesaid first external control switch 18 or the second external control switch 19 or the like may be used. The detected switch input signal is analysed by an edge input detecting means 1003 to determine whether the signal represents the leading edge of a pulse, and is also analysed by continuous input detecting means 1004 to determine whether the signal represents the continuous portion of a pulse. If the signal is an edge input, then the alarm time stored in the alarm time storing means 1007 is incremented by one minute or decremented by one minute (this is referred to as adding or subtracting by the unit amount) via an alarm time setting means 1005 which is connected to the edge input detecting means 1003. Whether the alarm time is incremented or decremented depends on which switch is pressed. The unit amount for the increment or decrement is not restricted to one minute; it is possible to adopt an arbitrary value such as 10 seconds, 2 minutes, 5 minutes, 10 minutes or 1 hour. If it is detected by the continuous input detecting means 1004 that the detected input signal is a continuous signal, then the alarm time stored in the alarm time storing means 1007 is subjected to a more rapid increment or decrement via high speed increment/decrement control means 1006, which is connected to the continuous input detecting means 1004. An alarm coincidence detecting means 1008 connected to the alarm time storing means 1007 compares the alarm time with the content, i.e. the basic time, of a basic time counting means 1009 and if it finds that they coincide with each other then it stops the operation of the high speed increment/decrement control means 1006 so as to stop the incrementing/decrementing of the alarm time. The operation involved in the block diagram stated above will be discussed with reference to the flowchart shown in Fig. 13. For the high speed incrementing/decrementing of the alarm time in this embodiment, when a switch input lasts for 1 to 2 seconds, the alarm time is incremented or decremented by one minute at a frequency of 8Hz. In other words, the incrementing/decrementing starts after a period of 1 to 2 seconds has elapsed since the time at which the switch is pressed and held down, and after that, the alarm time is incremented or decremented on the 1-minute basis once every 1/8 second. This means that the alarm time is incremented or decremented by 8 minutes in one second. For this reason, the program must be repeatedly actuated once every 1/8 second or less. In this embodiment, the program is actuated at a frequency of 16Hz. The time required for the high speed incrementing/decrementing to start following the detection of the switch input varies within the range of 1 to 2 seconds because of the variation in the timing at which the switch is pressed. In the present embodiment, three signals are provided for controlling the clock: (1) a 16Hz signal to activate the program; (2) a 8Hz signal for controlling the high speed increment/decrement; and (3) a 1Hz signal for determining the nature of the input (described later). When the input through the switch for incrementing the alarm time or the switch for decrementing the alarm time is detected (step 1101), it is first decided whether it is the edge input (step 1102). If the input turns out to be the edge input, then one minute is added or subtracted unconditionally in accordance with the switch through which the input was given (step 1103) and counter value K for the high speed increment/decrement processing is reset to zero (step 1104). This means that one minute is added or subtracted as soon as the switch is pressed. If the switch input turns out to be a continuous input, the alarm time is compared with the basic clock time (step 1105). If the alarm time coincides with the basic clock time, then the program is terminated, or if they do not coincide, then the high speed incrementing/decrementing control of step 1106 to 1109 is carried out. The value of a count value K is incremented by 1 (step 1107) when the trailing edge of the 1Hz signal is detected (step 1106). Then it is determined whether counter value K is 2 or more (step 1108). If counter value K is below 2, then the program is immediately terminated; if it is 2 or more, then it is further determined whether the 8Hz signal is "low" or not, and if it turns out to be low, then the alarm time is incremented or decremented by 1 minute (step 1110). More details will be given in conjunction with the timing chart shown in Fig. 14. It is assumed that the basic clock time is currently 8:04 and the alarm time is 8:00. When the incrementing switch 18 is pressed (at time "a"), the switch input is detected (step 1101) and if the leading edge of the switch input signal is present (step 1102), then the alarm time is incremented by 1 minute (step 1103) to be 8:01. Counter value K is reset (step 1104) to zero (K=0). At the next program actuating time "b", the switch input is detected (step 1101) and it is determined whether the detected switch input is the edge input (step 1102) or not. As the input signal is not now an edge input, but is now a continuous input, it is determined whether the alarm time coincides with the basic clock time (step 1105). At present, the alarm time is 8:01 and the basic time is 8:04; they do not coincide, so that the program checks for the trailing edge of the 1Hz signal (step 1106). In this case, the trailing edge of the 1Hz signal is present and therefore counter value K is incremented by 1 (step 1107), then it is further determined whether value K is 2 or more (step 1108). In this example, counter value K is 1, which is less than 2; therefore the program is terminated. At the following program actuating time "c", the switch input is detected (step 1101) and it is determined whether the detected switch input is the edge input (step 1102) or not. As the input signal is not an edge input, bit is a continuous input, it is determined whether the alarm time coincides with the basic clock time (step 1105). This time also, the alarm time is 8:01 and the basic time is 8:04 and they do not coincide, so that the program checks for the trailing edge of the 1Hz signal (step 1106). This time, the trailing edge of the 1Hz signal is not present, and therefore counter value K remains unchanged and it is determined whether value K is 2 or more (step 1108). Since counter value K is 1, which is less than 2, the program is terminated. Hence, both alarm time and counter value remain unchanged. After repeating the same operation as that implemented at time "c", at the following program actuation time "d", the switch input is detected (step 1101) and it is determined whether the detected switch input is the edge input (step 1102) or not. As the input signal is not an edge input, but is a continuous input, it is determined whether the alarm time coincides with the basic clock time (step 1105). The alarm time is still 8:01 and the basic clock time is 8:04 and they do not coincide; therefore the program checks for the trailing edge of the 1Hz signal (step 1106). This time, the trailing edge of the 1Hz is present; therefore, counter value K is incremented by 1 (step 1107), and it is further determined whether K is 2 or more (step 1108). Since counter value K is 2, it is determined whether the 8Hz signal is low (step 1109). In this case, the 8Hz signal is low and therefore the alarm time is incremented b one minute (step 1110) to be 8:02 before the program is terminated. At the next program actuation time "e", the 8Hz signal is not low; therefore, the program is immediately terminated. Further at the following program actuating time "f", the 8Hz signal is low; therefore, the alarm time is incremented by one minute (step 1110) to be 8:03 before the program is terminated. At program actuation time "e", the same operation as that implemented at program actuation time "e" is carried out. Performing at program actuation timing "f'" the same operation as that carried out a program actuation timing "f" causes the alarm time to be identical to the basic clock time 8:04. Then, at the next program actuation time "g", the switch input is detected (step 1101) and it is determined whether the detected switch input is the edge input (step 1102) or not. As the input signal is not an edge input, but is a continuous input, it is determined whether the alarm time coincides with the basic clock time (step 1105). The alarm time is 8:04 and the basic clock time is also 8:04, i.e. they coincide; therefore the program is immediately terminated. After that, the operation carried out at the program actuation time "g" is repeated as long as the incrementing switch is pressed. In other words, the alarm time remains unchanged even if the operation of the switch is continued. If, however, the basic time advances one minute in the middle, during the time which the switch is depressed, then the basic time no longer coincides with the alarm time. For this reason, the same operation as that carried out at program actuation time "d" is implemented and the alarm time is incremented by one minute. Hence, the alarm time follows the basic time. If the incrementing switch is released under the aforesaid condition wherein both basic time and alarm time are 8:04, then the release of the incrementing switch is detected at program actuation time "h". If the incrementing switch pressed again later, then the same operation as that carried out at the program actuating time "a" is performed at program actuation time "i"; the switch input is detected (step 1101) and it is determined whether the detected switch input is the edge input (step 1102) or not. As the input is an edge input the alarm time is incremented by one minute (step 1104) to be 8:05. Counter value K is reset (step 1104) to zero. After that, the same operations as those implemented at the program actuation times "b", "c", "d", "e", "f" and "g" are performed. With such an arrangement, the alarm time always stops at the current time even if is in the high speed increment/decrement mode. Thus, when setting an alarm time which is relatively close to the current time, the current time can be utilised as the reference time, making it extremely easy to set the alarm time. This feature is especially useful for setting the alarm time many times. In this embodiment, the fast forwarding is performed when count value K becomes 2 or more; however, the value should not be considered to be restricted thereto. For easier operation for the user, K should be 1 ≤ K ≤ 3. Likewise, although the 8Hz signal for adding or subtracting 8 units in one second is employed for the high speed incrementing/decrementing, the signal should preferably range from about 4 to about 6Hz. Further, the third embodiment may be combined with the first embodiment. This permits easier resetting of the alarm setting/resetting means shown in the first embodiment because the alarm setting/resetting means is reset by making the alarm time coincide with the current time in the alarm time setting mode. This feature is conveniently used for preventing the alarm from sounding. In addition, in the embodiments stated above, the various means, which provide the elements comprising the alarm clock, such as the basic clock timing means 101, the alarm time setting means 102, the alarm time storing means 103, the alarm coincidence detecting means 104, and the alarm setting/resetting means 106, are implemented by software programs; however, it is apparent that implementing the aforesaid means by hardware will provide the same functions.

Claims: An electronic timepiece having an alarm, and comprising: a timing means (101) for providing an indication of the time; an alarm time setting means (102) for setting an alarm time stored in an alarm time storing means (103) in an alarm time setting mode; an alarm sounding means (107) for sounding the alarm; an alarm time coincidence detecting means (104) for detecting the coincidence between the time indicated by the timing means (101) and the alarm time stored in said alarm time storing means (103); and an alarm sounding control means (105) for actuating said alarm sounding means (107) to sound the alarm; characterised by an alarm setting/resetting means (106) (i) which is set when the alarm time coincidence detecting means (104) detects that the time indicated by the timing means (101) and said alarm time do not coincide with each other; (ii) which is reset when said alarm time coincidence detecting means (104) detects the coincidence between the time indicated by the timing means (101) and said alarm time and said alarm time setting means (102) is in the alarm time setting mode, and in response to said alarm sounding means (107) being actuated; and (iii) which causes said time indicated by the timing means (101) to be stored in said alarm time storing means (103) while it is in a reset state; and said alarm sounding control means (105) actuating said alarm sounding means (107) when said alarm setting/resetting means is set and said alarm time coincidence detecting means (104) detects the coincidence between the time indicated by the timing means (101) and said alarm time stored in the alarm time storing means (103). A timepiece according to claim 1, modified in that a selecting means is provided for selecting whether said alarm setting/resetting means (106) is reset in response to said alarm sounding means (107) being actuated. A timepiece according to claim 1 or claim 2, wherein a time period counting means (701) is provided which begins counting in response to a user input indicating that the alarm is to be set, and mode control means (702) is provided which sets the alarm in response to a further user input occurring before said time period counting means reaches a predetermined value, or which sets the alarm if said user input is provided continuously until said time period counting means reaches a predetermined value.

Inventors: SAKAMOTO YUMI, SAKAMOTO, YUMI
Applicants: SEIKO EPSON CORP, SEIKO EPSON CORPORATION
Application year: 1995
Main classification: G04G13
IPC codes: G04G13, G04G5