Microcomputer-built-in, on-vehicle electric unit

Abstract: An on-vehicle electric unit has a microcomputer (1) formed of a RAM (3) which stores information indicating an operating condition of the on-vehicle electric unit and momentary-power-supply-interruption check information, a ROM (4) which stores an operation program of the microcomputer (1), an initial value for the information indicating the operating condition, and the momentary-power-supply-interruption check information, and a CPU (2) which controls the on-vehicle electric unit according to the information indicating the operating condition and the operation program, and a reset circuit (8) which resets the microcomputer (1) if a voltage of the on-vehicle power supply (10) is reduced. The microcomputer (1) checks whether the momentary-power-supply-interruption check information stored in the RAM (3) remains when it is reset. When the momentary-power-supply-interruption check information is detected, the microcomputer (1) determines that a momentary interruption of the on-vehicle power supply (10) has occurred and restarts controlling the on-vehicle electric unit. If the momentary-power-supply-interruption check information is not detected, the microcomputer (1) determines that not a momentary interruption of the on-vehicle power supply (10) but a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred, initializes the RAM (3), and then restarts controlling the on-vehicle electric unit.

Description: The present invention relates to microcomputer-built-in, on-vehicle electric units, and more specifically, to a microcomputer-built-in, on-vehicle electric unit in which stored information in a memory section can be maintained by easy and inexpensive means when the microcomputer is reset because the voltage of an on-vehicle power supply which drives the on-vehicle unit is reduced for some reason. For an on-vehicle electric unit, for example, for an on-vehicle air conditioner, a product inspection test generally includes an item in which, even if the voltage of an on-vehicle power supply (battery) which drives the on-vehicle air conditioner is reduced for several milliseconds to several seconds, information indicating the operating condition which specifies an operating state immediately before the voltage reduction shall be maintained. An on-vehicle air conditioner which satisfies specifications, including such an item, is produced. An on-vehicle electric unit, for example, an on-vehicle air conditioner usually includes a manual-operation section formed of a pushbutton operating member for selecting an air outlet, a pushbutton operating member for making a selection from in-vehicle air circulation and ventilation, and a sliding operating member for selecting an inside-vehicle temperature. A CPU is also mounted to efficiently control the on-vehicle air conditioner, and a random access memory (RAM) and a read only memory (ROM) are also provided together with the CPU to serve as a microcomputer as a whole. Operation setting information specified when the manual-operation section is operated, and information indicating the operating condition of the on-vehicle air conditioner at automatically-set setting information are stored in the RAM. An operation program for operating the microcomputer is stored in the ROM. The automatically-set setting information refers to automatically-specified setting information such as a setting in which a front-face outlet is automatically selected as an air outlet when the on-vehicle air conditioner serves as a cooling system (cooling), and a setting in which a lower outlet is automatically selected as an air outlet when the on-vehicle air conditioner serves as a heater (heating). When the voltage of an on-vehicle power supply which drives the on-vehicle air conditioner is reduced for several milliseconds to several seconds, a voltage applied to a reset IC which resets the microcomputer is reduced, and thereby the microcomputer is reset. The RAM contents, namely, the information indicating the operating condition which must be maintained in the RAM even if the voltage of the power supply drops, is deleted. In a known on-vehicle air conditioner, some countermeasures have been taken against such a voltage drop of an on-vehicle power supply, in order to prevent the information indicating the operating condition stored in the RAM from being deleted. Fig. 5 is a block diagram of such a known on-vehicle air conditioner provided with a countermeasure against a voltage drop of an on-vehicle power supply. As shown in Fig. 5, this on-vehicle air conditioner includes-a one-chip microcomputer 50 formed of a central processing unit (CPU) 51, a RAM 52, and a ROM 53, an input and output circuit 54 which includes a manual-operation section, an air-feeding compressor, and a temperature control mechanism, a regulator 55 connected to a power supply for adjusting a power-supply voltage, a reset circuit 56 for detecting a voltage drop of the output voltage of the regulator 55 and generating a reset signal to the CPU 51, and a backup circuit 57 formed of a diode 58 connected in series and a large-capacitance capacitor 59 shunt-connected. In this on-vehicle air conditioner, the large-capacitance capacitor 59 in the backup circuit 57 is always charged to have the voltage of an on-vehicle power supply (battery, not shown). If the voltage of the on-vehicle power supply is reduced for some reason, for example, due to an activation of a starter motor, a voltage drop is compensated for by discharging the charged voltage of the large-capacitance capacitor 59 to prevent the output voltage of the regulator 55 from being reduced. Fig. 6 is a block diagram of another known on-vehicle air conditioner provided with a countermeasure against a voltage drop of a power supply. As shown in Fig. 6, this on-vehicle air conditioner differs from the on-vehicle air conditioner shown in Fig. 5 in that the backup circuit 57 is removed and an electrically erasable programmable read-only memory (EEPROM) 60 is provided instead. In Fig. 6, the same symbols as those used in Fig. 5 are assigned to the same elements as those shown in Fig. 5, and descriptions thereof will be omitted. In this on-vehicle air conditioner, information indicating an operating condition is stored in the EEPROM 60 as well as in a RAM 52 at the same time. If the voltage of an on-vehicle power supply is reduced for some reason, a CPU 51 reset due to a voltage drop reads the information indicating the operating condition stored in the EEPROM 60 and stores it into a RAM 52. Therefore, the information indicating the operating condition is always stored in the RAM 52 substantially. In the known on-vehicle air conditioners each having a countermeasure against a voltage drop of the power supply, if the voltage of the on-vehicle power supply is reduced for several milliseconds to several seconds, by compensating the power-supply voltage by the use of the charged voltage of the large-capacitance capacitor 59 in the backup circuit 57, or by always storing the information indicating the operating condition stored in the EEPROM 60 into the RAM 52, the information indicating the operating condition stored in the RAM 52 is effectively maintained. Since special hardware, such as the backup circuit 57 and the EEPROM 60, has been added, the number of components increases the structure becomes complicated, and the number of assembling processes also increases. In addition to these causes, since the large-capacitance capacitor 59 in the backup circuit 57 and the EEPROM 60 are expensive circuit components, the manufacturing cost of the on-vehicle air conditioner is increases and the price of the on-vehicle air conditioner is also increased. A conventional, general, system for restoring a processor after a power drop or failure is described in EP-A2-0393631. A more particular situation, that is to say power failure in a television receiver, is discussed in EP-A2-0213577. Here an apparatus for data backup in the event of a power failure is disclosed. Accordingly, an object of the present invention is to provide a microcomputer-built-in, on-vehicle electric unit which can maintain information indicating an operating condition stored in a RAM if a voltage of an on-vehicle power supply is reduced, without any special hardware with a least cost increase. A RAM generally maintains it stored contents even if its power voltage drops for a short period of time. This short-time voltage drop in which the RAM maintains its stored contents is defined as a momentary interruption. According to an aspect of the present invention there is provided an on-vehicle electric unit comprising a microcomputer; wherein the microcomputer includes: a RAM which stores a plurality of sets of information, each set of information, indicating an operating condition of said on-vehicle electric unit at a specific different point in time; a ROM which stores an operation program of said microcomputer and an initial value for the information indicating the operating condition; a CPU which controls said on-vehicle electric unit according to said stored information indicating the operating condition and the operation program; and a reset circuit which resets said microcomputer if a voltage of an on-vehicle power supply which drives said on-vehicle electric unit is reduced; whereby the CPU compares corresponding information within the plurality of sets of information stored in said RAM when the microcomputer is reset by said reset circuit and, if the corresponding information match each other, the CPU determines that a momentary interruption of the on-vehicle power supply has occurred, and restarts controlling said on-vehicle electric unit; and if the corresponding information do not match each other, the CPU determines that a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred, the CPU initialises said RAM, and restarts controlling said on-vehicle electric unit. As described above, according to one aspect of the present invention, since the momentary-power-supply-interruption check information is stored in the RAM, the microcomputer detects whether the momentary-power-supply-interruption check information stored in the RAM remains if the voltage of the on-vehicle power supply drops, and the microcomputer determines that a momentary power-supply interruption has occurred when the momentary-power-supply-interruption check information is detected, or the microcomputer determines that not a momentary power supply interruption but a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred when the momentary-power-supply-interruption check information is not detected, special hardware, such as the backup circuit and the EEPROM, is not required, and thereby the number of components is reduced, the structure becomes simple, assembly becomes easy, and the production cost is reduced. According to another aspect of the present invention, there is provided an on-vehicle electric unit comprising a microcomputer; wherein the microcomputer includes: a RAM which stores a plurality of sets of information obtained at a constant time interval, each set of information includes information indicating an operating condition of said on-vehicle electric unit; a ROM which stores an operation program for the microcomputer and an initial value for the information indicating the operating condition; a CPU which controls said on-vehicle electric unit according to said stored information indicating the operating condition and the operation program; and a reset circuit which resets the microcomputer if a voltage of an on-vehicle power supply which drives said on-vehicle electric unit is reduced, whereby the CPU compares corresponding information within the plurality of sets of information stored in said RAM when the microcomputer is reset by said reset circuit and, if the corresponding information match each other, the CPU determines that a momentary interruption of the on-vehicle power supply has occurred, and restarts controlling said on-vehicle electric unit; and if the corresponding information do not match each other, the CPU determines that a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred, the CPU initialises said RAM, and restarts controlling said on-vehicle electric unit, wherein the corresponding information includes: the information about the operating condition, confirmation information obtained by inverting a sum of the information about the operating condition, and two rolling codes; and wherein the CPU determines that a momentary interruption of the on-vehicle power supply has occurred if the inverted sum of the current information about the operating condition matches the confirmation information, and if the two rolling codes match each other. According to the above aspect of the present invention, since one or more sets of copied information obtained by copying at a constant time interval the information indicating the operating condition are stored into the RAM; the microcomputer checks whether one or more sets of copied information stored in the RAM have the specified information contents when the voltage of the on-vehicle power supply drops; if the specified information contents are satisfied, it is determined that a momentary interruption of the on-vehicle power supply has occurred; and if the specified information contents are not satisfied, it is determined that not a momentary interruption of the on-vehicle power supply but a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred, special hardware, such as the backup circuit and the EEPROM, is not required, and thereby the number of components is reduced, the structure becomes simple, assembly becomes easy, and the production cost is reduced. The microcomputer-built-in, on-vehicle electric unit may be configured such that the on-vehicle electric unit serves as an on-vehicle air conditioner, and the information indicating the operating condition includes information indicating a selected air outlet in the on-vehicle air conditioner, a selection from in-vehicle air circulation and ventilation, and an operating condition of a compressor which determines the amount of output air. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a microcomputer-built-in, on-vehicle electric unit according to a first embodiment of the present invention. Fig. 2 is a flowchart showing an outlined operation state of the microcomputer-built-in, on-vehicle electric unit shown in Fig. 1 according to the first embodiment. Fig. 3 is a flowchart showing an outlined operation state of the microcomputer-built-in, on-vehicle electric unit shown in Fig. 1 according to a second embodiment. Fig. 4 shows procedures for creating two sets of copied information, for checking whether a momentary interruption has occurred, and for creating copied information at a momentary interruption in the second embodiment. Fig. 5 is a block diagram of a known on-vehicle air conditioner provided with a countermeasure against a voltage drop of a power supply. Fig. 6 is a block diagram of another known on-vehicle air conditioner provided with a countermeasure against a voltage drop of a power supply. Embodiments of the present invention will be described below by referring to the drawings, by way of example only: Fig. 1 is a block diagram showing a configuration of an on-vehicle electric unit in which a microcomputer is built according to a first embodiment of the present invention. The on-vehicle electric unit serves as an on-vehicle air conditioner in this embodiment. As shown in Fig. 1, the on-vehicle air conditioner according to the present invention is provided with a one-chip microcomputer 1 formed of a central processing unit (CPU) 2, a random access memory (RAM) 3, and a read only memory (ROM) 4, a manual-operation section 5, a controlled section 6, a regulator 7, and a reset circuit 8. A starter motor 9 and an on-vehicle power supply (battery) 10 are connected to the on-vehicle air conditioner. The manual-operation section 5 is disposed in a front panel of the on-vehicle air conditioner and includes a pushbutton operating member for selecting an air outlet, a pushbutton operating member for making a selection from in-vehicle air circulation and ventilation, and a sliding operating member for specifying the temperature of a supply air and the amount of air. The manual-operation section 5 is connected to the microcomputer 1 through an I/O line. The controlled section 6 forms an input and output section which includes an air compressor and a temperature control mechanism for a circulating air, and is connected to the microcomputer 1 through an I/O line. The regulator 7 is inserted into a power supply circuit of the microcomputer 1 and adjusts the output voltage of the on-vehicle power supply (battery) 10. The reset circuit 8 generates a reset signal when it detects a reduction in the output voltage of the regulator 7, and sends the signal to the CPU 2. The starter motor 9 is connected between the output terminals of the on-vehicle power supply 10. When the starter motor 9 is driven, a high current flows through it. The on-vehicle air conditioner according to the first embodiment of the present invention will be described below. In the first embodiment, the RAM 3 stores momentary-power-supply-interruption information, information indicating the operating condition of the on-vehicle air conditioner, including operation setting information and automatically-set setting information, and other pieces of information, and the ROM 4 stores an operation program for operating the CPU 2. The automatically-set setting information refers to automatically-specified setting information such as a setting in which a front-face outlet is automatically selected as an air outlet when the on-vehicle air conditioner serves as a cooling system (cooling), and a setting in which a lower outlet is automatically selected as an air outlet when the on-vehicle air conditioner serves as a heater (heating). Among these pieces of information, the momentary-power-supply-interruption check information is used for determining whether the power supply of the microcomputer 1 has been momentarily interrupted. When the on-vehicle air conditioner is turned on, the CPU 2 writes the momentary-power-supply-interruption check information into a part of a memory area in the RAM 3, preferably both at the top and the bottom of the memory area, and the information is stored there. The contents of the momentary-power-supply-interruption check information are not specified, but they must not be affected by noise. For example, an information pattern in which a plurality of binary codes, 0's and 1's, are disposed alternately in the horizontal direction and the vertical direction in a memory area, namely, a check pattern is used. The information indicating the operating condition needs to be maintained in the RAM 3 according to the specifications when the power supply is momentarily interrupted. The information includes the automatically-set setting information, and operation setting conditions in the manual-operation section, namely, operation setting information indicating an operation setting condition for an air outlet, an operation setting condition for in-vehicle air circulation or ventilation, and an operation setting condition for the temperature of a supply air and the amount of air. When the on-vehicle air condition is turned on, the CPU 2 writes the information indicating the operating condition into a memory area for the information in the memory area in the RAM 3, and the information is stored there. The other pieces of information includes various pieces of information (data) sequentially obtained when the CPU 2 controls the on-vehicle air conditioner and additional information (data). The CPU 2 writes these pieces of information into a memory area for the information in the memory area in the RAM 3 and the information is stored there. Fig. 2 is a flowchart indicating a general operation state of the on-vehicle air conditioner according to the first embodiment. An operation in the first embodiment will be described below by referring to the flowchart shown in Fig. 2. While the CPU 2 controls the controlled section 6 (normal control processing) based on the operation setting information and the other pieces of information stored in the RAM 3 according to the operation program stored in the ROM 4, when the on-vehicle starter motor 9 is driven and an instantaneous high current flows through the starter motor 9 or an instantaneous high current flows through a circuit section other than the starter motor 9, the output voltage of the on-vehicle power supply 10 is instantaneously reduced much due to its internal resistor, for example, for about one second, and the reduced voltage is supplied to the regulator 7. In another case, when the output voltage of the on-vehicle power supply 10 is instantaneously reduced for some reason, the reduced voltage is supplied to the regulator 7. The regulator 7 compensates the supplied voltage for its reduction to some extent. If the voltage drop is relatively large, sufficient compensation cannot be performed. The regulator 7 outputs a reduced voltage and supplies it to the microcomputer 1 (CPU 2, RAM 3, and ROM 4) and to the reset circuit 8. The reset circuit 8 detects a reduction in the power supply voltage, generates a reset signal, and sends it to the CPU 2 of the microcomputer 1. The CPU 2 is reset by the sent reset signal and starts operating according to the flowchart shown in Fig. 2. In a step S1, the CPU 2 checks whether the momentary-power-supply-interruption check information stored in advance in the RAM 3 remains unchanged irrespective of a reduction in the power-supply voltage. When the CPU 2 finds according to the check that the momentary-power-supply-interruption check information has not remained is unchanged (N), the CPU 2 determines that not a momentary power-supply interruption but a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred. In other words, it is determined that all information stored in the RAM 3 is deleted or changed, and the procedure proceeds to the next step S2. On the other hand, when the CPU 2 finds that the momentary-power-supply-interruption check information has remained unchanged (Y), the CPU 2 determines that a momentary power-supply interruption has occurred. In other words, it is determined that all information stored in the RAM 3 remains, and the procedure proceeds to a step S4. In the step S2, according to the decision that the voltage drop has occurred for the time period exceeding that of a momentary interruption and that the information indicating the operating condition has been deleted or changed, the CPU 2 initializes the memory area in the RAM 3 for the information indicating the operating condition to delete all the information indicating the operating conditions, which has been deleted or changed, and writes the initial settings. In the next step S3, according to the decision that the voltage drop has occurred for the time period exceeding that of a momentary interruption and that the information indicating the operating condition has been deleted or changed, the CPU 2 overwrites the momentary-power-supply-interruption check information into the memory area in the RAM 3 for the momentary-power-supply-interruption check information to store it. The momentary-power-supply-interruption check information stored in the ROM 4 is used. In the step S4, since the CPU 2 cannot use the other pieces of information stored in the RAM 3 due to its reset, the CPU 2 initializes the memory area in the RAM 3 for the other pieces of information to delete all the other pieces of information, and writes the initial settings. In a step S5, the CPU 2 stores the momentary-power-supply-interruption check information, the information indicating the operating condition, and the other pieces of information into the RAM 3. Since the contents stored in the RAM 3 return to the condition obtained before the voltage reduction of the on-vehicle power supply occurred, the CPU 2 restarts a control operation of the controlled section 6 (normal control processing). In this point of time, specifically, the settings of various switches in the on-vehicle air conditioner are read, the values of various sensors are read, and the information of motor control, relay control, and a display device (LED) and setting information are read. As described above, according to the first embodiment, since the momentary-power-supply-interruption check information is stored in the RAM 3; the microcomputer detects whether the momentary-power-supply-interruption check information stored in the RAM 3 remains if the voltage of the on-vehicle power supply drops; and the CPU 2 determines that a momentary power supply interruption has occurred when the momentary-power-supply-interruption check information is detected, or the CPU determines that not a momentary power supply interruption but a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred when it is found that the momentary-power-supply-interruption check information has been deleted or changed, unlike the known on-vehicle air conditioner, neither the backup circuit nor the EEPROM is required, and thereby the production cost is reduced. An on-vehicle air conditioner according to a second embodiment of the present invention will be described below. A circuit configuration in the second embodiment is the same as that shown in Fig. 1. In the second embodiment, however, a RAM 3 stores one or more sets of copied information and other pieces of information, and the ROM 4 stores an operation program for operating a CPU 2. In the above information, since the other pieces of information and the operation program are substantially the same as those used in the first embodiment, descriptions thereof will be omitted. One or more sets of copied information is obtained by copying the information indicating the operating condition at a constant time interval while the CPU 2 performs control of the controlled section 6 (normal control processing). The CPU 2 updates the copied information copied from the information indicating the operating condition at a constant time interval, and always stores one or more sets of the obtained latest copied information into the RAM 3. In the second embodiment, one or more sets of the copied information are substituted for the momentary-power-supply-interruption check information used in the first embodiment. Fig. 3 is a flowchart indicating a general operation state of the on-vehicle air conditioner according to the second embodiment. Fig. 4 shows procedures for creating two sets of copied information, for checking if momentary interruption has occurred, and for creating copied information at momentary interruption in the second embodiment. An operation in the second embodiment will be described below by referring to the flowchart shown in Fig. 3 and the procedures shown in Fig. 4. In the second embodiment, while the CPU 2 controls the controlled section 6 (normal control processing) based on the information indicating the operating condition and other pieces of information stored in the RAM 3 according to the operation program stored in the ROM 4, the CPU 2 creates two sets of copied information at a constant time interval. A procedure for creating the two sets of copied information will be described below by referring to the copy procedure shown in Fig. 4. In the following description, to make it simple, namely, the information indicating the operating condition, which needs to be maintained in the RAM 3 at momentary interruption of the power supply, is called A, B, and C, two rolling codes assigned to two sets of copied information obtained in the previous time are set to R 10 and R 20 , and two rolling codes assigned to two sets of copied information obtained at this time are set to R 11 and R 21 . which are incremented by 1 from the codes R 10 and R 20 . When the CPU 2 copies the information indicating the operating condition, and according to the information, the CPU 2 stores two sets of copied information into the RAM 3, a first set of copied information includes one rolling code, R 11 , at this time, stored in a memory area "r 1 " in the RAM 3, the information indicating the operating condition, A, B, and C stored in memory areas, "a 1 ," "b 1 ," and "c 1 ," confirmation information obtained by inverting the sum of the information indicating the operating condition, A, B, and C, stored in a memory area "s 1 ," and one rolling code R 11 stored in a memory area "e 1 ," in the same way as in the memory area "r 1 ." A second set of copied information includes the other rolling code, R 21 , at this time, stored in a memory area "r 2 " in the RAM 3, the information indicating the operating condition, A, B, and C stored in memory areas, "a 2 ," "b 2 ," and "c 2 ," confirmation information obtained by inverting the sum of the information indicating the operating condition, A, B, and C, stored in a memory area "s 2 ," and the other rolling code R 21 stored in a memory area "e 2 ." During the operation of the on-vehicle air conditioner, when the starter motor 9 is driven and an instantaneous high current flows through the starter motor 9 or an instantaneous high current flows through a circuit section other than the starter motor 9, the output voltage of the on-vehicle power supply 10 is instantaneously reduced much due to its internal resistor, for example, for about one second, and the reduced voltage is supplied to the regulator 7. In another case, when the output voltage of the on-vehicle power supply 10 is instantaneously reduced for some reason, the reduced voltage is supplied to the regulator 7. The regulator 7 compensates the supplied voltage for its reduction to some extent. If the voltage drop is relatively large, sufficient compensation cannot be performed. The regulator 7 outputs a reduced voltage and supplies it to the microcomputer 1 (CPU 2, RAM 3, and ROM 4) and to the reset circuit 8. The reset circuit 8 detects a reduction in the power supply voltage, generates a reset signal, and sends it to the CPU 2 of the microcomputer 1. The CPU 2 is reset by the sent reset signal and starts operating according to the flowchart shown in Fig. 3. In a step S11, the CPU 2 checks whether the two sets of copied information stored in the RAM 3 have the specified information contents described later, irrespective of a reduction in the power-supply voltage. When the CPU 2 finds according to the check that the two sets of copied information does not have the specified information contents (N), the CPU 2 determines that not a momentary power-supply interruption but a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred. In other words, it is determined that all information stored in the RAM 3 has been deleted or changed, and the procedure proceeds to the next step S12. On the other hand, when the CPU 2 finds that the two sets of copied information have the specified information contents (Y), the CPU 2 determines that a momentary power-supply interruption has occurred. In other words, it is determined that all information stored in the RAM 3 remains, and the procedure proceeds to a step S13. Whether the two sets of copied information have the specified information contents is checked separately for each of the two sets of copied information. For example, it is performed in the following way. As indicated in the procedure for checking the information contents shown in Fig. 4, the CPU 2 detects for the first set of copied information that the memory contents stored at the memory area "r 1 " and at the memory area "e 1 " in the RAM 3 match and that the memory contents stored in the memory area "s 1 " match the confirmation information obtained by inverting the sum of the information indicating the operating condition, a 1 , b 1 , and c 1 . When these match conditions are satisfied, the CPU 2 determines that the specified information contents are satisfied. If these match conditions are not satisfied, the CPU 2 detects for the second set of copied information that the memory contents stored at the memory area "r 2 " and at the memory area "e 2 " in the RAM 3 match and that the memory contents stored in the memory area "s 2 " match the confirmation information obtained by inverting the sum of the information indicating the operating condition, a 1 , b 1 , and c 1 . When these match conditions are satisfied, the CPU 2 determines that the specified information contents are satisfied. If the above match conditions are not satisfied for each of the first and second sets of copied information, it is determined that the specified information contents are not satisfied. In the step S12, according to the decision that the voltage drop has occurred for the time period exceeding that of a momentary interruption, the CPU 2 determines that all information stored in the RAM 3 has been deleted or changed. The CPU 2 initializes the memory area in the RAM 3 for the information indicating the operating condition to delete all the information indicating the operating condition, which has been deleted or changed, and writes the initial settings. In a step S13, even if it is determined that a momentary interruption of the power supply has occurred, since either the first set or the second set of copied information stored in the RAM 3 may have been deleted or changed, the CPU 2 recovers either the first set or the second set of copied information in the following way. As indicated in the procedure for recovering the information indicating the operating condition shown in Fig. 4, when the above-described match conditions are satisfied for the first set of copied information, the pieces of information stored in the memory areas "a 1 ," "b 1 ," and "c 1 " in the RAM 3 are copied onto the memory areas A, B, and C in the RAM 3, respectively, and the pieces of information stored in the memory areas "r 1 ," "a 1 ," "b 1 ," "c 1 ," "s 1 ," and "e 1 " in the RAM 3 are copied onto the memory areas "r 2 ," "a 2 ," "b 2 ," "c 2 ," "s 2 ," and "e 2 " in the RAM 3, respectively. When the above-described match conditions are satisfied for the second set of copied information, the pieces of information stored in the memory areas "a 2 ," "b 2 ," and "c 2 " in the RAM 3 are copied onto the memory areas A, B, and C in the RAM 3, respectively, and the pieces of information stored in the memory areas "r 2 ," "a 2 ," "b 2 ," "c 2 ," "s 2 ," and "e 2 " in the RAM 3 are copied onto the memory areas "r 1 ," "a 1 ," "b 1 ," "c 1 ," "s 1 ," and "e 1 " in the RAM 3, respectively. In the next step S14, since the CPU 2 cannot use other pieces of information stored in the RAM 3 due to its reset, the CPU 2 initializes the memory area in the RAM 3 for the other pieces of information to delete all the other pieces of information, and writes the initial settings. In a step S15, since the contents stored in the RAM 3 return to the condition obtained before the voltage drop of the power supply occurred, the CPU 2 restarts a control operation of the controlled section 6 (normal control processing). As described above, according to the second embodiment, since the two sets of copied information obtained by copying at a constant time interval the information indicating the operating condition are stored into the RAM 3; the CPU 2 checks whether the two sets of copied information stored in the RAM 3 have the specified information contents when the voltage of the on-vehicle power supply drops; if the specified information contents are satisfied, it is determined that a momentary interruption of the on-vehicle power supply has occurred; and if the specified information contents are not satisfied, it is determined that not a momentary interruption of the on-vehicle power supply but a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred, unlike the known on-vehicle air conditioner, neither the backup circuit nor the EEPROM is required, and thereby the number of components is reduced, the structure becomes simple, assembling becomes easy, and the production cost is reduced. In each of the above embodiments, the on-vehicle electric unit serves as an on-vehicle air conditioner. An on-vehicle electric unit according to the present invention is not limited to an on-vehicle air conditioner. It is a matter of course that an on-vehicle electric unit similar to the on-vehicle air conditioner may be used. In each of the above embodiments, the information indicating the operating condition to be maintained in the RAM 3 if the power supply is momentarily interrupted includes information indicating an operation setting condition for an air outlet in the on-vehicle air conditioner, an operation setting condition for in-vehicle air circulation or ventilation, and an operation setting conditions for the temperature of a supply air and the amount of air. The information indicating the operating condition of an on-vehicle air conditioner according to the present invention is not limited to those pieces of information. It is a matter of course that the information may include other pieces of information. In the second embodiment, the two sets of copied information are stored in the RAM 3. The number of copied information sets is not limited to two, but may be just one. The scope of the present invention is not limited to that described in the above embodiments. It can be modified as required unless it exceeds the technical contents of the present invention.

Claims: An on-vehicle electric unit comprising a microcomputer (1); wherein the microcomputer includes: a RAM (3) which stores a plurality of sets of information, each set of information indicating an operating condition of said on-vehicle electric unit at a specific different point in time; a ROM (4) which stores an operation program of said microcomputer (1) and an initial value for the information indicating the operating condition; a CPU (2) which controls said on-vehicle electric unit according to said stored information indicating the operating condition and the operation program; and a reset circuit (8) which resets said microcomputer (1) if a voltage of an on-vehicle power supply (10) which drives said on-vehicle electric unit is reduced; whereby the CPU compares corresponding information within the plurality of sets of information stored in said RAM when the microcomputer is reset by said reset circuit and, if the corresponding information match each other, the CPU determines that a momentary interruption of the on-vehicle power supply has occurred, and restarts controlling said on-vehicle electric unit; and if the corresponding information do not match each other, the CPU determines that a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred, the CPU initialises said RAM, and restarts controlling said on-vehicle electric unit. An on-vehicle electric unit comprising a microcomputer (1); wherein the microcomputer includes: a RAM (3) which stores a plurality of sets of information obtained at a constant time interval, each set of information includes information indicating an operating condition of said on-vehicle electric unit; a ROM (4) which stores an operation program for the microcomputer and an initial value for the information indicating the operating condition; a CPU (2) which controls said on-vehicle electric unit according to said stored information indicating the operating condition and the operation program; and a reset circuit (8) which resets the microcomputer (1) if a voltage of an on-vehicle power supply (10) which drives said on-vehicle electric unit is reduced, whereby the CPU compares corresponding information within the plurality of sets of information stored in said RAM when the microcomputer is reset by said reset circuit and, if the corresponding information match each other, the CPU determines that a momentary interruption of the on-vehicle power supply has occurred, and restarts controlling said on-vehicle electric unit; and if the corresponding information do not match each other, the CPU determines that a voltage drop lasting for a time period exceeding that of a momentary interruption has occurred, the CPU initialises said RAM, and restarts controlling said on-vehicle electric unit, wherein the corresponding information includes: the information about the operating condition, confirmation information obtained by inverting a sum of the information about the operating condition, and two rolling codes; and wherein the CPU determines that a momentary interruption of the on-vehicle power supply has occurred if the inverted sum of the current information about the operating condition matches the confirmation information, and if the two rolling codes match each other. An on-vehicle electric unit according to Claim 1 or 2, wherein said on-vehicle electric unit serves as an on-vehicle air conditioner, and the information indicating the operating condition includes information indicating a selected air outlet in the on-vehicle air conditioner, a selection from in-vehicle air circulation and ventilation, and an operating condition of a compressor which determines the amount of output air.

Inventors: HAYASAKA SATOSHI, HAYASAKA, SATOSHI
Applicants: ALPS ELECTRIC CO LTD, ALPS ELECTRIC CO., LTD.
Application year: 1998
Main classification: G06F11
IPC codes: G06F11, G06F1, G06F12, B60H1