Alarm sounding apparatus for computer

Abstract: When a drop of the voltage of a battery is detected, a detector outputs two kinds of alarm signals in accordance with the degree of voltage drop. PALs 10 and 11 input the respective alarm signals to a selector 15. To the selector 15 are also supplied an alarm signal from a PAL 12 which generates an alarm signal in accordance with the state of a panel switch 4 and a sound signal from a speaker data generator 7. The selector 15 selects one from these signals so as to drive a speaker 8. Since a means for generating an alarm signal is provided exclusively for this purpose, an alarm sounding operation is ensured.

Description: The present invention relates to an alarm sounding apparatus for a computer such as a notebook type or a lap-top personal computer or word processor. Battery-driven computers such as notebook type or lap-top personal computers have a function of sounding an alarm to warn the user that the battery capacity becomes very small or that the display panel is closed while the power source is ON. As shown in Fig. 11, a voltage detector 2 is connected to a nickel cadmium battery 1 as the power source. The voltage detector 2 turns a signal BATTO to "H" when the voltage of the nickel cadmium battery 1 drops below a first threshold value, while turning a signal BATT1 to "H" when the voltage of the nickel cadmium battery 1 drops below a second threshold value. An NMI (Non Maskable Interrupt) generator 3 is connected to the voltage detector 2, and the signals BATT0 and BATT1 are supplied to the NMI generator 3 which generates an NMI signal as the highest priority interrupt signal. A panel switch 4 is connected to the NMI generator 3. To the NMI generator 3 is supplied a signal PANELSW which is turned to "H" when the LCD panel, which also serves as a lid of the main frame, is closed during use. The NMI generator 3 generates an NMI signal when one of the three signals input thereto is "H", and supplies the NMI signal to a CPU 5. A RAM 6 is connected to the CPU 5. The CPU 5 constantly reads out and executes the program stored in the RAM 6 at ordinary time. On the other hand, when the NMI signal, which is the highest priority interrupt signal, is input to the CPU 5, the CPU 5 executes the processing for sounding an alarm in accordance with the NMI signal. In other words, the CPU 5 calls the NMI routine which is stored at the address specified by the NMI vector address of the RAM 6, and executes the NMI routine so as to generate data for sounding an alarm. A speaker data generator 7 is connected to the CPU 5. The speaker data generator 7 generates a sounding signal SPKOUT in accordance with various commands for producing a sound, and supplies the sounding signal SPKOUT to a speaker 8. The speaker 8 sounds an alarm in accordance with the sounding signal SPKOUT when the data for sounding an alarm is received from the CPU 5. An alarm is sounded when the battery capacity is reduced to a first threshold value, or to a second threshold value or when the display panel is closed during use. Three different alarms are generally sounded in correspondence with these three states. In this way, an alarm is sounded when the CPU 5 executes the NMI routine which is stored in the RAM 6. The NMI routine is written at a predetermined address of the RAM 6 when the power source is turned on. However, some application programs executed by a computer greatly change the contents of RAM 6, so that a different program is sometimes written at the same address that the NMI routine is written. In such cases, when the NMI signal is generated by the NMI generator 3, the CPU 5 executes not the NMI routine but the application program stored at the address which is specified by the NMI vector address. Since not the NMI routine but an unexpected program is executed, there is a possibility of the runaway of the computer. Another conventional apparatus is known from document EP-A-0 416 589 disclosing a computer having a function of detecting a low battery state. In this prior art arrangement a battery is used as a a power source for a computer. A reference voltage for determining a low-battery state of the battery is set in consideration of the current value of a current output from the battery and of the temperature of the battery. An output voltage of the battery is compared with the reference voltage, to thereby determine whether the battery is in a low-battery state or not. For the purpose of monitoring the battery state, changing the reference voltage and controlling an alarm device indicative of a low-battery state, a power controller comprising a RAM, ROM and CPU is additionally used. In addition, from document US-A-4 660 027 there is known a generic prior art arrangement disclosing a reduced power consumption low battery alert device. This device controls a transducer driver by means of a microprocessor on the basis of detected voltage levels of the used battery. Depending on different detected battery levels, the transducer driver drives the transducer with different power consumption rates. Due to the use of a microcomputer based control of the alarm device, the latter two prior art arrangements may suffer from the same drawbacks as described above. Accordingly, it is an object of the present invention to eliminate the above-described problems in the related art and to provide an alarm sounding apparatus for a computer which ensures an alarm sounding operation. To achieve this aim, the present invention provides an alarm sounding apparatus as set out in claim 1. When the predetermined condition is satisfied, the alarm sounding condition detecting means outputs a detection signal which commands an alarm to be sounded. In accordance with this signal, the alarm signal outputting means outputs an alarm signal for driving the speaker. On the other hand, when the computer drives the speaker for executing various programs, the speaker data generating means outputs a signal for driving the speaker. In the present invention, the selecting means receives at least two speaker driving signals and selects and outputs one signal to the speaker, and the speaker produces a sound in accordance with the input signal. In this way, since the means for outputting an alarm signal is provided separately from a means for outputting a sounding signal in accordance with a command from the CPU, it is possible to sound an alarm even if the RAM is reloaded. That is, an alarm sounding operation is ensured. When the selecting means is accommodated in the alarm signal outputting means, it is also possible to drive the speaker under a predetermined condition. There are a plurality of conditions of alarm sounding, and the alarm sounding condition detecting means outputs different detection signals in correspondence with the respective conditions. The alarm signal outputting means outputs different alarm signals in correspondence with the plural kinds of detection signals input thereto. It is therefore possible to detect plural kinds of conditions and to sound alarms which correspond to the respective kinds of detection signals. The alarm signal outputting means is composed of a plurality of logic circuits, and the plurality of detection signals output from the alarm sounding condition detecting means are supplied to the respective logic circuits. In this way, effective alarm sounding is enabled. The alarm sounding condition detecting means detects the voltage of the battery. When the voltage drops below a first threshold value, the alarm sounding condition detecting means outputs a first detection signal, and when the voltage drops below a second threshold value, the alarm sounding condition detecting means outputs a second detection signal. The alarm sounding condition detecting means also detects the ON/OFF state of the panel switch, which shows the open/closed state of the panel, and outputs a third detection signal showing this ON/OFF state. The alarm signal which is output from the alarm signal outputting means has a predetermined silent period both at the start and at the end of sounding an alarm. This silent period enables discrimination between the alarm and sound due to another signal. The selecting means may be accommodated in the alarm signal outputting means, thereby greatly simplifying the circuit structure. The above and other objects, features and advantages of the present invention will become clear from the following description of the preferred embodiments thereof, taken in conjunction with the accompanying drawings. Fig. 1 is a block diagram of the structure of a first embodiment of an alarm sounding apparatus according to the present invention; Fig. 2 is a sequence control diagram of a PAL 10; Fig. 3 is a timing chart of the operation of the first embodiment; Fig. 4 is a sequence control diagram of a PAL 11; Fig. 5 is a sequence control diagram of a PAL 12; Fig. 6 is a block diagram of the structure of a second embodiment of an alarm sounding apparatus according to the present invention; Fig. 7 is a sequence control diagram of a PAL 22; Fig. 8 is a timing chart for sounding an alarm when the LCD panel is closed; Fig. 9 is a timing chart for sounding an alarm BATT0; Fig. 10 is a timing chart for sounding an alarm BATT1; and Fig. 11 is a block diagram of the structure of a conventional alarm sounding apparatus. Preferred embodiments of the present invention will be explained hereinunder with reference to the accompanying drawings. First Embodiment Fig. 1 is a block diagram of the entire structure of a first embodiment of an alarm sounding apparatus according to the present invention. In the same way as in a conventional apparatus, this embodiment is provided with a nickel cadmium battery 1, a voltage detector 2, a panel switch 4, a CPU 5, a speaker data generator 7 and a speaker 8. The voltage detector 2 and the panel switch 4 forming part of the alarm sounding condition detecting means. Unlike the conventional apparatus, this embodiment is provided with three alarm signal generating PALs (Programmable Array Logics) representing alarm signal outputting means, namely, an alarm signal generating PAL 10 to which a signal BATT0 is input, an alarm signal generating PAL 11 to which a signal BATT1 is input thereto and an alarm signal generating PAL 12 to which a signal PANELSW is input. A clock of 768 Hz, which determines the frequency of an alarm, is supplied to the INVCLK input terminal of each of the PALs 10, 11 and 12, and a clock of 3 HZ, which determines the timing for shifting the state, is supplied to the CLK input terminal thereof. The PALs 10, 11 and 12 output inverted signals SPKB0 , SPKB1 and SPKSW , respectively, as the alarm signals, and outputs inverted signals ENB0 , ENB1 and ENSW , respectively, as the signals representing the respective operational states. These clocks are obtained by dividing the frequency of the clock supplied from an oscillator 13 of 25.175 MHz by a clock frequency divider 14. The data supplied from the voltage detector 2 is supplied to the PALs 10, 11 not directly but through a low battery signal sampling circuit 16, which sampling circuit also forms part of the alarm sounding condition detecting means. This embodiment is also provided with a selector circuit 15 as a selecting means for selecting one from the alarm signals which are output from the three PALs 10, 11 and 12 and the sounding signal which is output from the speaker data generating means 7. The selector circuit 15 is composed of three inverters 15a, 15b and 15c, five AND gates 15d, 15e, 15f, 15g and 15h, and three OR gates 15i, 15j and 15k. A transistor 17 is turned ON/OFF in accordance with the signal output from the selector circuit 15 so as to drive the speaker 8. The panel switch 4 is a switch provided at the hinge portion of the LCD panel so as to be mechanically turned ON/OFF. The clock frequency divider 14 also generates a clock of 1.684 Hz and supplies it to the low battery signal sampling circuit 16. The low battery signal sampling circuit 16 samples the input signals LBATT0 and LBATT1 in accordance with the rise of the supplied clock, and supplies sampled signals to the PALs 10 and 11, respectively, as the signals BATT0 and BATT1. Accordingly, when the voltage of the nickel cadmium battery 1 drops below a first threshold value, the voltage detector 2 turns the signal LBATT0 to "H", and the low battery signal sampling circuit 16 samples this state and turns the signal BATT0 to "H". When the voltage of the nickel cadmium battery 1 drops below a second threshold value, the voltage detector 2 turns the signal LBATT1 to "H", and the low battery signal sampling circuit 16 samples this signal and turns the signal BATT1 to "H". In this embodiment, the rated voltage of the nickel cadmium battery 1 is 12 V, and the first threshold value is set at 10.8 V and the second threshold value at 10.4 V. Fig. 2 is a sequence control diagram of the PAL 10. As is obvious from Fig. 2, the PAL 10 has states S0 to S11. When the signal BATT0 is "H", the state S0 of the PAL 10 subsequently shifts to the states S1, S2, ... S11. When the signal BATT0 is "L", each state is returned to the state S0. If the signal BATT0 is "L" in the state S0, the state S0 is repeated, while if the signal BATT0 remains "H" in the state S11, the state S11 is repeated. When the PAL 10 assumes the state S1, S2, S5, S6, S9 or S10, the PAL 10 outputs a clock of 768 Hz (alarm signal) as the inverted signal SPKB0 . Therefore, when the inverted signal BATT0 is turned to "L", the state subsequently shifts at the rise of a clock of 3 HZ, as shown in Fig. 3. An alarm signal is output in two states (2/3 sec), and the output of the alarm signal is prohibited in the next two states (2/3 sec). After the alarm signal is output three times, the PAL 10 remains in the state S11. As shown in Fig. 4, the alarm signal generating PAL 11 to which the BATT1 is input has the states S0 to S17. When the signal BATT1 is "L", the state is returned to S0 in the same way as in the case of BATT0. When the PAL 11 assumes one of the states S1 to S4, S7 to S10, and S13 to S16, the PAL 11 outputs an alarm signal as the inverted signal SPKB1 . Accordingly, an alarm signal is output in four states, and the output of the alarm signal is prohibited in the next two states. Thus, the alarm signal is output three times. Fig. 5 is a sequence control diagram of the PAL 12. When the PAL 12 assumes one of the states S1, S3, S6, S8, S11 and S13, the PAL 12 outputs an alarm signal as the inverted signal SPKSW . Accordingly, an alarm signal is output in one state, the output of the alarm signal is prohibited in the next one state, the alarm signal is output in the next one state, the output of the alarm signal is prohibited in the next two states, the alarm signal is output in the next one state, the output of the alarm signal is prohibited in the next one state, the alarm signal is output in the next one state, the output of the alarm signal is prohibited in the next two states, the alarm signal is output in the next one state, the output of the alarm signal is prohibited in the next one state and the alarm signal is output in the next one state, as shown in Fig. 3. When signals are simultaneously output from the PALs 10, 11, 12 and the speaker data generator 7, the selector circuit 15 selects one of the signals and supplies the selected signal to the speaker 8. More specifically, while the PALs 10, 11 and 12 are outputting alarm signals, they output the inverted signals ENB0 , ENB1 and ENSW , respectively. The inverted signal ENB1 from the PAL 11 is supplied to the AND gate 15d. The inverted signal SPKB0 which is further inverted by an inverter 15a is also supplied to the AND gate 15d. Therefore, while the PAL 11 is operated, the inverted signal ENB1 is "L", thereby prohibiting the inverted signal SPKB0 from being output from the PAL 10. On the other hand, the inverted signal SPKB1 from the PAL 11 is supplied to the base of the transistor 17 through the inverter 15b, the OR gate 15i and the OR gate 15k. Consequently, the output of the PAL 11 drives the speaker 8 at the highest priority. The inverted signal ENB0 from the PAL 10 and the inverted signal ENB1 from the PAL 11 are supplied to the AND gate 15e. Accordingly, a signal "H" is output from the AND gate 15e only when both PALs 10 and 11 are in the inoperative state. The output of the AND gate 15e is supplied to the AND gate 15g. The inverted signal SPKSW from the PAL 12 is also supplied to the AND gate 15g through the inverter 15c. Consequently, an alarm signal is output from the PAL 12 only when both PALs 10 and 11 are in the inoperative state. That is, the priority of the output of the PAL 12 comes third. The output of the AND gate 15g is supplied to the base of the transistor 17 through the OR gate 15j and the OR gate 15k. The inverted signal ENSW from the PAL 12 is supplied to the AND gate 15f. The output SPKOUT of the speaker data generator 7 is also supplied to the AND gate 15f. The output of the AND gate 15f is supplied to the AND gate 15h together with the output of the AND gate 15e. Consequently, the signal SPKOUT from the speaker data generator 7 is output from the AND gate 15h only when all the PALs 10, 11 and 12 are in the inoperative state and all the inverted signals ENB0 , ENB1 and ENSW are "H". The output from the AND gate 15h is supplied to the base of the transistor 17 though the OR gates 15j and 15k. In this manner, the selector circuit 15 selects one from the four signals for driving the speaker 8. The priority is in the order of the output of the PAL 11, the output of the PAL 10, the output of the PAL 12 and the output of the speaker data generator 7. As described above, according to this embodiment, an alarm is sounded by supplying a signal generated by an oscillator 13, which is provided exclusively for this purpose, to the base of the transistor 17 through the clock frequency divider 14, the PALs 10, 11 and 12 and the selector circuit 15. It is therefore possible to sound an alarm independently of the operation of the CPU 5. As a result, even if the RAM is reloaded by an application program, an alarm sounding operation is ensured. Especially, since the speaker 8 is driven in accordance with the signal selected by the selector circuit 15 from the signals including a sound signal from the CPU 5, an alarm sounding operation is further ensured. Second Embodiment Fig. 6 shows the structure of a second embodiment of an alarm sounding apparatus according to the present invention. A low battery detector 20 as part of an alarm sounding condition detecting means has both the function of the voltage detector 2 and the function of the low battery signal sampling circuit 16 in the first embodiment. In other words, the low battery detector 20 detects the voltage of the nickel cadmium battery 1 and outputs the signals BATT0 and BATT1. In this embodiment, a single PAL 21 as an alarm signal outputting means and a selecting means serves as the PALs 10, 11 and 12 in the first embodiment. To the PAL 21 are supplied the signals BATT0 and BATT1 from the low battery detector 20, the signal PANELSW from the panel switch, the signal SPKOUT from the speaker data generator, and an alarm signal having a frequency of, for example, 768 Hz and a clock signal CLKO.05 of, for example, 20 Hz, which determines the timing for shifting the state, from a buzzer clock PAL 22. The function of the PAL 21 is approximately a combination of the functions of the PALs 10, 11 and 12, and the selector circuit 15 in the first embodiment. The PAL 21 is characterized by the fact that a silent period is provided before and after an alarm sounding period. The frequency of an alarm signal is determined by the buzzer clock PAL 22. The phase number is determined according to whether each of the input signals PANELSW, BATT1 and BATT0 is "H" (1) or "L" (0), and what is output from the speaker is determined in accordance with the phase number, as follows. PANELSW BATT1 BATT0 Phase No. 0 0 0 0 (BATT1 alarm) 0 0 1 1 (Abnormal) 0 1 0 2 (BATT0 alarm) 0 1 1 3 (Normal) 1 0 0 4 (BATT1 alarm) 1 0 1 5 (LCD alarm) 1 1 0 6 (BATT0 alarm) 1 1 1 7 (LCD alarm) In the case of the phase 1 or 3, since the state is abnormal or normal and there is no need to sound an alarm, the command for loop is executed in the state S0, and the state S0 is not shifted to another state. Therefore, the signal SPKOUT is output as it is, as shown in Fig. 7. In the case of the phase 5 or 7, the state is shifted in the order of S0, S1, S2, S3, S4 and S0, and an alarm is sounded to warn the user that the LCD panel is closed during use. In the case of the phase 0 or 4, the state is shifted in the order of S0, S1, S8, S9, S10, ...S17 and S18, and an alarm is sounded to warn the user that the signal BATT1 is H. In the case of the phase 2 or 6, the state is shifted in the order of S0, S1, S19, S20, S21, ...S27, S28 and S29, and an alarm is sounded to warn the user that the signal BATT0 is H. In each state, the following operation is conducted. S0: The signal SPKOUT supplied from the system is output as it is. S1: The signal CO_ST is turned to "H", and the command for loop is executed until the Carry turns to "H" (timer used before sounding an alarm). S2: An alarm signal having a frequency (e.g., 768 Hz) determined by the buzzer clock is output. S3: The signal CO_ST is turned to "H", and the command for loop is executed until the Carry turns to "H" (timer used after sounding an alarm). S4: The command for loop is executed until the state is shifted to a state other than the states in the phase 5 or 7 (the signal SPKOUT supplied from the system is output as it is). S8: An alarm signal having a frequency determined by the buzzer clock is output. S9: Dummy state. S10: An alarm signal having a frequency determined by the buzzer clock is output. S11 to S13: Dummy state. S14: An alarm signal having a frequency determined by the buzzer clock is output. S15: Dummy state. S16: An alarm signal having a frequency determined by the buzzer clock is output. S17: The signal CO_ST is turned to "H", and the command for loop is executed until the Carry turns to "H" (timer used after sounding an alarm). S18: The command for loop is executed until the state is shifted to a state other than the states in the phase 0 or 4 (the signal SPKOUT supplied from the system is output as it is). S19 to S21: An alarm signal having a frequency determined by the buzzer clock is output. S22 to S24: Dummy state. S25 to S27: An alarm signal having a frequency determined by the buzzer clock is output. S28: The signal CO_ST is turned to "H", and the command for loop is executed until the Carry turns to "H" (timer used after sounding an alarm). S29: The command for loop is executed until the state is shifted to a state other than the states in the phase 2 or 6 (the signal SPKOUT supplied from the system is output as it is). The state is shifted in the above-described manner on the basis of the clock signal CLK0.05 which is supplied to the buzzer clock PAL 22 so as to determine the timing for shifting the state. When the LCD panel is closed during use, an alarm is sounded for 0.05 sec once, as shown in Fig. 8. When the voltage of the nickel cadmium battery drops below the first threshold value, an alarm is sounded for 0.15 sec twice, as shown in Fig. 9. When the voltage of the nickel cadmium battery drops below the second threshold value, an alarm is sounded for 0.05 sec twice, and this cycle is repeated twice, as shown in Fig. 10. In this embodiment, in the states S1, S3, S17 and S28, a predetermined time is elapsed (until the Carry turns to "H") in the state in which the signal CO_ST is "H". For this purpose, in this period, the signal SPKOUT supplied from the system is cut off and no alarm is sounded. A silent period (0.75 sec in this embodiment) is set before and after an alarm sounding period, thereby enabling discrimination between an alarm and the preceding sound produced in accordance with the signal SPKOUT supplied from the system. If a silent period is inserted before and after an alarm sounding period in the first embodiment, the same effect is produced as in the second embodiment. As described above, according to the alarm sounding apparatus of the present invention, after a condition of alarm sounding is detected, the speaker is controlled through a sounding circuit which is provided exclusively for this purpose. During this period, the command for producing a sound is prohibited from being supplied from the system. Thus, an alarm sounding operation is ensured. If a silent period is provided before and after an alarm sounding period, it is easy for the user to distinguish an alarm.

Claims: An alarm sounding apparatus for a computer provided with a speaker data generating means (7) which outputs a sounding signal (SPKOUT) for driving a speaker (8) so as to produce a sound on the basis of the data supplied from a CPU (5), said alarm sounding apparatus comprising: an alarm sounding condition detecting means (2, 4, 16; 20) for outputting a detection signal which commands an alarm to be sounded when a predetermined alarm sounding condition is satisfied; characterized by an alarm signal outputting means (10, 11, 12; 21) for outputting an alarm signal for driving said speaker (8) in accordance with said received detection signal output from said alarm sounding condition detecting means (2, 4, 16; 20); and a selecting means (15; 21) for receiving signals from said speaker data generating means (7) and said alarm signal outputting means (10, 11, 12; 21), and selecting and outputting either of said signals. An alarm sounding apparatus according to claim 1, characterized in that said selecting means is accommodated in said alarm signal outputting means (21) which receives said detection signal supplied from said alarm sounding condition detecting means (20) and said signal from said speaker data generating means (7), and which outputs said signal from said speaker data generating means as it is when said detection signal is judged not to command an alarm to be sounded, while it outputs an alarm signal for driving said speaker when said detection signal is judged to command an alarm to be sounded. An alarm sounding apparatus according to claim 1, characterized in that there are a plurality of said predetermined alarm sounding conditions, and said alarm sounding condition detecting means (2, 4, 16; 20) outputs different alarm signals in correspondence with said plurality of conditions. An alarm sounding apparatus according to claim 2, characterized in that there are a plurality of said predetermined alarm sounding conditions, and said alarm sounding condition detecting means (2, 4, 16; 20) outputs different alarm signals in correspondence with said plurality of conditions. An alarm sounding apparatus according to claim 3, characterized in that said alarm signal outputting means is composed of a plurality of logic circuits (10, 11, 12), and said plurality of detection signals output from said alarming sounding condition detecting means (2, 4, 16) are supplied to said respective logic circuits (10, 11, 12). An alarm sounding apparatus according to claim 4, characterized in that said alarm signal outputting means is composed of a logic circuit (21); said plurality of detection signals output from said alarm sounding condition detecting means (20) are supplied to said logic circuit (21); and said logic circuit (21) selects and outputs one alarming signal in accordance with the states of said plurality of detection signals. An alarm sounding apparatus according to claim 3 or 6, characterized in that said alarm sounding condition detecting means (2, 16; 20) detects the voltage of a battery (1), outputting a first detection signal (BATT0) when said voltage drops below a first threshold value, while outputting a second detection signal (BATT1) when said voltage drops below a second threshold value; and said alarm sounding condition detecting means also detects the ON/OFF state of a panel switch (4), which shows the open/closed state of a panel, and outputs a third detection signal (PANELSW) showing said ON/OFF state. An alarm sounding apparatus according to claim 1 or 2, characterized in that said alarm signal output from said alarm signal outputting means (10, 11, 12; 21) has a predetermined silent period both at the start and at the end of sounding an alarm. An alarm sounding apparatus according to claim 1 or 2, characterized in that said selecting means (15; 21) selects one signal in accordance with a predetermined order of precedence when a signal from said speaker data generating means (7) and a signal from said alarm signal outputting means (10, 11, 12; 21) are simultaneously input.

Inventors: IMAIZUMI YASUKAZU, YAWATA MASASHI, IMAIZUMI, YASUKAZU, YAWATA, MASASHI, YAWATA, MASASHI, 2-A ASAHI KOUPO YOSHIDA
Applicants: SANYO ELECTRIC CO, SANYO ELECTRIC CO., LIMITED.
Application year: 1992
Main classification: G08B29
IPC codes: G06F3, G08B29, G08B23, G06F1