Electronic apparatus with memory backup system
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to an electronic apparatus which is capable of retaining stored data in a memory during interruption of power supply thereto, with the aid of a memory backup power source. 
     2. Discussion of the Prior Art 
     In conventional electronic apparatus of the foregoing type, generally, the data stored in a memory, such as a random access memory, is retained by the use of a memory backup power source when power to the apparatus is interrupted. In order to ascertain whether the content of the memory is accurately retained or not at the time power is again supplied to the apparatus, it was heretofore customary to execute this step by accessing check data written previously at a partial storage position in the memory, then, deciding, in accordance with the correctness or incorrectness of the check data thus accessed, the validity of the desired data written at other storage positions in the memory, and producing an error signal in case any error was detected from the check data. However, if the voltage of the memory backup power source was reduced to near the threshold value of a data retaining voltage, at the time of interruption of power to the apparatus, the desired data may become destroyed in the memory even though the check data was retained validly therein. Thus, disadvantageously, exact decision on the validity of the desired data is not attainable by discriminating the check data at the time of resumption of power. 
     Furthermore, in another conventional apparatus of a type equipped with additional circuitry for checking the data retaining voltage of a memory backup power source during interruption of the power supply, there also exist various disadvantages, such as higher production costs due to use of such additional circuitry, increased power consumption in the memory backup power source, and shortening of the total backup time for the memory. 
     Accordingly, there is still certain deficiencies which need correcting in backup power sources used for memory upon interruption of power supply to the apparatus using such memories. 
     SUMMARY OF THE INVENTION 
     Accordingly, an object of the invention is to provide an electronic apparatus capable of exactly deciding, during interruption of power supply thereto, validity of data retained in a memory with the aid of a memory backup power source. 
     Another object resides in providing an electronic apparatus adapted to ascertain the validity of the memory by checking the voltage of a memory backup power source prior to charging the memory backup power source, when power supply to the apparatus is resumed. 
     A further object is to provide an electronic apparatus wherein data writing and data reading are prohibited with regard to the memory, in case the voltage of a backup memory power source is below a predetermined value at the time power is again supplied. 
     A preferred embodiment of the present invention comprises a memory for storing data therein, a memory backup power source for furnishing electric power to the memory when power supply to the electronic apparatus is interrupted, a circuit for charging the memory backup power source after resumption of the power supply to the apparatus, voltage checking circuit for generating an error signal when the voltage of the memory backup power source is below a predetermined value, and control circuit for temporarily preventing the action of the charging circuit to the memory backup power source upon resumption of the power to the apparatus, and thereby render the action of the voltage checking circuit effectual. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is an electric circuit diagram depicting a charging circuit used in this invention. 
     FIG. 2 is a block circuit diagram depicting a memory used in this invention. 
     FIG. 3 is an electric circuit diagram depicting a voltage checking circuit used in the invention. 
     FIG. 4(A) through FIG. 4(H) depict voltage waveforms of signals effecting operation of the invention. 
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
     The preferred embodiment herein disclosed is used with a memory backup power source, memories, and associated circuits, and may be employed whereever such memories are used. Other circuit elements and components are not shown for convenience of description and for simplification of description. 
     Referring now to FIG. 1 and FIGS. 4(A)-4(H), in a reset ircuit 1, immediately after resumption of power supply to an electronic apparatus wherein one or more memories are used, such as in this invention, if the voltage of a first control power source VC1 having a waveform of FIG. 4(A) is lower than a predetermined voltage V1 set by a Zener diode ZD1, a reset signal RES (see FIG. 4(D) and FIG. 1) is inverted to a low level in response to conduction of a transistor Q1, thereby disabling a central processing unit CPU. Subsequently, when the voltage of first control power source VC1 increases above predetermined voltage V1, transistor Q1 is turned &#34;off&#34; so that the voltage of a second control power source VC2, having a waveform of FIG. 4(B), is applied to a capacitor C1. At the moment the charge voltage of capacitor C1, having a waveform of FIG. 4(C), reaches another predetermined voltage V2, reset signal RES is inverted to a high level, thereby enabling central processing unit CPU, while turning &#34;on&#34; transistor Q2 and Q3. 
     In charging circuit 2 (FIG. 1), transistors Q5 and Q6 are turned &#34;off&#34; when a transistor Q4 is turned &#34;on&#34; in response to a charge signal CHS (FIG. 4(G) and FIG. 1) of a high level fed from central processing unit CPU after power is supplied to the apparatus. As a result, second control power source VC2 is prevented from charging a memory backup power source 3, comprising, for example, a chargeable nickel-cadmium battery or the like, and simultaneously a power supply signal PDWN (FIG. 4(F) and FIG. 1) is inverted to a high level. The terminal voltage of memory backup power source 3 has a waveform of FIG. 4(E). From FIGS. 4(F) and 4(G), it is clear that the CPU has the function of setting a significant period and acts as a timing means. 
     When charge signal CHS fed from central processing unit CPU is inverted to a low level to turn &#34;off&#34; transistor Q4, transistors Q5 and Q6 are turned &#34;on&#34; so that memory backup power source 3 is charged by second control power source VC2. 
     Memories M1 . . . Mn, shown in FIG. 2, are, for example, random access memories composed of, for example, semiconductor elements and adapted for writing data and reading data. Memory backup power source 3 is connected (See +B in FIG. 2) in common to memories M1 . . . Mn. An address bus AB and a data bus DB from central processing unit CPU are connected to memories M1 . . . Mn. A chip selection signal CSS from central processing unit CPU is fed to each of terminals CS2, while power supply signal PDWN is fed in common to terminals CS1. If power supply signal PDWN is at a high level, data reading and data writing are prevented from occuring with regard to memories M1 . . . Mn. 
     A voltage checking circuit 4, shown in FIG. 3, comprises transistors Q7 and Q8. The base of transistor Q7 is connected to terminal +B of memory backup power source 3, via a resistor R1, and the emitter of transistor Q7 is connected to second control power source VC2, via a resistor R2, and also to the cathode of a Zener diode ZD2, serving to set a reference voltage Vref (which will be described hereinbelow) witht the collector of transistor Q7 being grounded via resistor R3, and the anode of the Zener diode ZD2 being grounded. The base of transistor Q8 is connected to the collector of transistor Q7 and the collector of transistor Q8 is connected to second control power source VC2, via a resistor R4, and to central processing unit CPU, with the emitter of transistor Q8 being grounded. In case the voltage at terminal +B is below a reference voltage Vref, set by Zener diode ZD2, an error signal ES of a low level is produced from the collector of transistor Q8 and is fed to central processing unit CPU. 
     The elements disclosed in the FIGS. 1-3, are well known in the art, and may be purchased on the market, with descriptions thereof being contained in any reputable handbook. 
     The operation of the above embodiment described in FIGS. 1-3 will now be described below with reference to the signal waveforms shown in FIGS. 4(A)-4(H). 
     Upon interruption of power supply to the described apparatus, wherein memories are used, electric power is supplied from memory backup power supply source 3, to memories M1 . . . Ms so as to retain data in the memories. The switching of the backup power to the memories and power supply interruption which causes the triggering of such switching may be done by known citcuits, and are not shown herein for convenience and simplicity of description. 
     When power supply to the apparatus is resumed, central processing unit CPU is reset and kept disabled until the charge voltage of capacitor C1 reaches a predetermined voltage V2 and feeds a charge signal CHS of a high level to the base of transistor Q4, hence trurning &#34;off&#34; transistors Q5 and Q6. Consequently, second control power source VC2 is prevented from charging memory backup power source 3 while power supply signal PDWN is inverted to a high level, thereby preventing the occurence of data reading and data writing with regard to memories M1 . . . Mn. 
     After this foregoing operation, when the charge voltage of capacitor C1 reaches predetermined voltage V2, to invert reset signal RES to a high level, central processing unit CPU samples error signal ES obtained from voltage checking circuit 4. In case signal ES has a high level to indicate that voltage at terminal +B of memory backup power source 3 is above reference voltage Vref, which is sufficient for validly retaining the data stored in memories M1 . . . Mn, central processing unit CPU confirms valid retention of the data stored in memories M1 . . . Mn and inverts charge signal CHS to a low level. 
     Charging circuit 2 turns &#34;on&#34; transistors Q5 and Q6 in response to such a level change of charge signal CHS, so that memory backup power source 3, is charged by second control power source VC2, while power supply signal PDWN is inverted to a low level, thereby placing memories M1 . . . Mn in a state, ready for the process of data reading and data writing. 
     If the voltage at terminal +B of memory backup power source 3 is below reference voltage Vref, central processing unit CPU, receives error signal ES of a low level from voltage checking circuit 4 and decides that data stored in memories M1 . . . Mn, have been destroyed and are therefore invalid, and a buzzer, alarm lamp, or the like (not shown) may be energized and actuated in response to the error signal ES. 
     Thus, according to the invention, charging circuit 2 is temporarily prevented from charging memory backup power source 3 upon resumption of power supply to the apparatus having the memory units, and simultaneously, voltage at terminal +B of memory backup power source 3 is compared with reference voltage Vref, which is sufficient for properly backing up memories M1 . . . Mn, so that it becomes possible to decide the validity of data stored in memories M1 . . . Mn. 
     The foregoing description is illustrative of the principles of the invention. Numerous modifications and extensions thereof would be apparent to the worker skilled in the art. All such modifications and extensions are to be considered to be within the spirit and scope of the invention.