Abstract:
A protection circuit to provide suitable disabling control signals to a microprocessor and to an electronic memory to prevent the loss of stored data from the memory during periods of power line interruption or unacceptable power deviations.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to a unique protection circuit for preventing a loss or change in the contents of an electronic memory system (e.g. a microprocessor controlled electronic pin ball game), as a result of undesirable line transients or power interruptions. 
     2. Prior Art 
     As is known to those skilled in the art, during the existence of power line interruptions or transient conditions, there may be a high occurrence of data loss or undesirable modification of stored data in an electronic memory circuit. One such electronic memory circuit which is adversely effected by power line interruptions is that utilized in a system, such as, for example, a micropressor controlled electronic pin ball game, wherein accounting data relating to bookkeeping and other credit information is stored and maintained. Power line interruptions may occur as a result of a power cut off, loading down the power supply with other utilization devices that consume large amounts of power, toggeling the power line, etc. 
     A conventional technique for protecting a low power semiconductor memory circuit from a loss of stored contents is a simple auxiliary battery backup arrangement that is integrated with the memory to maintain memory data integrity during power interruption. However, a major problem in this prior art scheme occurs during the transition from the line power supply to the auxiliary battery back up supply. During this transition period, the system d.c. power supply is in an out of tolerance condition (i.e. a condition wherein the available voltage deviates from the acceptable operating voltage level) which in turn causes a loss of control within the system microprocessor. As a result of this loss of control or uncertainty state, the microprocessor randomly produces control signals to undesirably write or to change the contents of the semiconductive memory. A loss or change of data stored in the semiconductive memory could result in loss of financial records and the corresponding profits relating thereto to the pin ball game operator. 
     SUMMARY OF THE INVENTION 
     Briefly, and in general terms, a protection circuit is disclosed to prevent the loss or change of the contents of an electronic memory used in a system, such as an electronic microprocessor controlled pin ball game, as a result of undesirable line transient or power interruptions. The circuit includes a voltage threshold level detector to sample input voltage signals from a power supply. An output terminal of the level detector is connected to respective input terminals of a pair of one-shot multivibrators. A first multivibrator is responsive to power coming up conditions, and the second multivibrator is responsive to power going down conditions. Therefore, should any out of tolerance condition be sensed during an interval of input power transition, the pair of multivibrators are triggered by output signals from the level detector. In such an out of tolerance condition, the multivibrators will continuously apply suitable control signals to input terminals of the memory and microprocessor control logic gates. These logic gates are adapted to selectively apply respective control signals to each of the system memory and the microprocessor to inhibit reading or writing data from the memory and to keep the microprocessor central processing unit in a reset mode, whereby the execution of bookkeeping or accounting instructions is delayed until the power has stabilized to an acceptable or an in tolerance level. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram which is representative of the protection circuit of the present invention. 
     FIG. 2 is a schematic of the protection circuit of the present invention that is represented by the block diagram of FIG. 1. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1 of the drawings, a block diagram is illustrated which is representative of the protection circuit of the present invention for preventing a loss or change in the contents of an electronic memory circuit, as a result of undesirable line transients or power interruptions. By way of example, the protection circuit disclosed herein has particular application in a system having a memory (e.g. a volatile CMOS RAM) that is utilized in a microprocessor controlled electronic pin ball game, wherein the critical accounting data relating to coin revenue, bookkeeping and credit information etc. is stored and maintained. Any loss or change of the accounting data stored in the electronic memory could result in serious loss of financial records and profits to the pin ball game operator. Although the instant protection circuit has particular utility for the memory of an electronic pin ball game, it is to be understood, however, that this is not to be regarded as limitative of the present invention. The presently disclosed protection circuit may be employed in any system (e.g. such as an electronic cash register, and the like) having a volatile memory and an auxiliary battery back up arrangement to maintain memory data integrity during power interruptions. 
     For normal operation of the electronic pin ball game, or similar apparatus, the electronic memory is regularly accessed by a central processing unit of the microprocessor, and the critical accounting data is stored or retrieved as needed, under the control of the system program. During an interval of power transistion, an output terminal 1 of a suitable power supply (not shown) applies a positive voltage signal +V to a threshold voltage level detector 2. Any out of tolerance (i.e., any voltage deviation from an acceptable operating power level) is sensed by the level detector 2. An output terminal of the level detector 2 is connected to respective input terminals of a pair of conventional one-shot monostable multivibrators 4 and 6. The one-shot multivibrator 4 is responsive to power coming up transitions, while the one-shot multivibrator 6 is responsive to power going down transistions. In a preferred embodiment, multivibrators 4 and 6 are retriggerable one-shots that are responsive to power up and power down conditions. The retriggerable characteristic is desirable in order to prevent loss of memory data during momentary perturbations occurring in the power line input signal. During these perturbations, the output of the level detector switches between signal levels that are indicative of in tolerance (i.e., acceptable) and out of tolerance (i.e., unacceptable) line conditions. The resulting output wave forms from the level detector 2 continuously retrigger both the power up and power down multivibrators 4 and 6 until the perturbations have ceased to exist and the power line input signal is stabilized at an acceptable level. 
     More particularly, in a power coming up condition, whenever the level detector 2 senes that the power supply is not yet at full operating voltage, a corresponding signal having a positive going transition is applied from the output of the level detector 2 to the input of the power up one-shot multivibrator 4. The positive transition signal triggers the power up one-shot multivibrator 4, whereby a relatively LOW logic level output signal Q 1 , one of two available complimentary signals, is generated by the multivibrator 4. This relatively LOW logic level output signal Q 1 , is applied to one input terminal of a selector gate 8. A relatively HI logic level output signal Q 1 , the second of the two complimentary output signals generated by the one-shot multivibrator 4, is applied to an input terminal of a microprocessor control gate 10. A suitable output signal from the control gate 10 is applied to the system microprocessor to hold the microprocessor in a reset condition during the time that power line interruptions occur. 
     Alternatively, in a power coming down condition, whenever the level detector 2 senses that the input signal is undesirably diminished from an acceptable voltage level, a corresponding signal having a negative going transition is applied from the output of the level detector 2 to the input of the power down one-shot multivibrator 6. The negative transition signal triggers the power down multivibrator 6, whereby a relatively LOW logic level output signal Q 2 , one of two available complimentary signals, is generated by the multivibrator 6. This relatively LOW logic level output signal Q 2  is applied to a second input terminal of the selector gate 8. 
     Thus, during an interval in which the power supply is out of tolerance, such that a power going up or power coming down condition exists, a relatively LOW logic level output signal is continuously applied to an input terminal of the selector gate 8 from one of the one-shot multivibrators 4 or 6. An output terminal of the selector gate 8 is connected to an input terminal of a memory control gate 12. Memory control gate 12 selectively enables the read and write logic of the memory for which data protection is provided. The selector gate 8 supplies a relatively LOW logic level output signal to the input terminal of the memory control gate 12, whenever a relatively LOW logic level input signal is applied to the selection gate 8 from either one of the one-shot multivibrators 4 or 6. Control gate 12 is adapted to supply a suitable disable signal to the electronic memory to inhibit the reading or writing operation thereof for the interval comprising the multivibrator output pulse width. Typically, the pulse width of the complimentary logic level output signals generated by multivibrators 4 and 6 is equivalent to a time that lies in a range of between 90-140 ms. In effect, the inhibiting signals supplied from the output terminals of the microprocessor control gate 10 and the memory control gate 12 impose a time delay before the microprocessor can execute instructions to enable the memory to commence bookkeeping or other accounting operations. Therefore, the normal memory operation can continue only after the power has stabilized at an acceptable or in tolerance operating voltage level and the last multivibrator has timed out. 
     FIG. 2 is a schematic of the protection circuit of the present invention, as represented by the block diagram of FIG. 1. The voltage threshold level detector 2 is comprised of diodes D 1  and D 2 , resistors R 1  and R 2 , and a pnp transistor device T 1 . A detailed discussion of the level detector 2 will not be presented. Briefly, however, the emitter electrode of transistor T 1  is connected to an electrical junction with one terminal of resistor R 1  and the cathode electrode of diode D 1 . The control electrode of transistor T 1  is connected at an electrical junction with the second terminal of resistor R 1  and the cathode electrode of a zener diode D 2 . The collector electrode of transistor T 1  is connected at an electrical junction with one terminal of resistor R 2  and the output terminal of level detector 2. In operation, diode D 1  samples the input signal from the power supply and provides a reference voltage for signal level detection. When there are no power line interruptions, so that the power supply is in tolerance with acceptable conditions, the control electrode of transistor T 1  receives a positive voltage signal from the output terminal 1 of the power supply via diode D 1  and resistor R 1 . Transistor T 1  is, thereby, rendered conductive. Thus, a positive going voltage edge is applied to the respective input terminals of each of the one-shot multivibrators 4 and 6 at the output terminal of level detector 2 via the collector electrode of transistor T 1 . The pulse duration of the power up multivibrator 4 is determined by a RC circuit comprising a resistor R 3  connected in electrical series with a capacitor C 1  between a supply of relatively positive (battery) reference voltage V B  and the multivibrator 4. The pulse duration of the power down multivibrator 6 is determined by an RC circuit comprising a resistor R 4  connected in electrical series with a capacitor C 2  between the supply of battery reference voltage V B  and the multivibrator 6. In a preferred embodiment of the invention, one-shot multivibrators 4 and 6 are battery powered CMOS devices. 
     The selector gate 8 and the memory control gate 12 are each comprised of conventional 2-input positive logic AND gates. The output terminals of the power up and power down multivibrators 4 and 6 are respectively connected to one of the input terminals of the selector gate 8. The output terminal of the selector gate 8 is connected to one input terminal of the memory control gate 12. The second input terminal of the memory control gate 12 is connected to receive an external memory control signal to selectively enable the reading or writing of data into the memory. Whenever the power source provides an acceptable operating voltage level, relatively HI logic level signals Q 1  and Q 2  are respectively applied from output terminals of the power up and power down multivibrators 4 and 6 to the input terminals of the selector gate 8. Therefore, a relatively HI logic level signal is applied from the output terminal of selector AND gate 8 to an input terminal of the memory control AND gate 12. The memory control gate 12 is, thus, adapted to enable the memory to read or write data, as requested by the system program. 
     However, when power is coming up to or going down from the acceptable level, a relatively LOW logic level signal Q 1  or Q 2  is applied from an output terminal of either the power up or power down multivibrators 4 and 6 to one of the input terminals of the selector gate 8, as previously disclosed when referring to FIG. 1. Hence, a relatively LOW logic level signal is applied from the output terminal of selector AND gate 8 to one of the input terminals of the memory control gate 12. Therefore, the memory control AND gate 12 is disabled during an out of tolerance power line condition, whereby a relatively LOW logic level signal is provided at the output terminal of the memory control gate 12 to inhibit the reading or writing of data into the memory. 
     During the time interval that memory control gate 12 inhibits the memory from reading or writing data (i.e., during an interval in which an out of tolerance power line condition exists), a relatively HI logic level signal Q 1  is applied from an output terminal of the power up multivibrator 4 to the microprocessor control gate 10. The microprocessor control gate 10 is comprised of resistors R 5 , R 6 , and R 7  and a pnp transistor T 2 . Since the microprocessor control gate 10 is of conventional design, a detailed description thereof is not presented. Briefly, however, the emitter electrode of transistor T 2  is connected at an electrical junction with one terminal of resistor R 5  and the source of battery reference voltage V B . The control electrode of transistor T 2  is connected to an electrical junction with the second terminal of resistor R 5  and an output terminal of the power up multivibrator 4 so as to receive the Q 1  output signal therefrom. The collector electrode of transistor T 2  is connected to an electrical junction with one terminal of resistor R.sub. 7 and the output terminal of the microprocessor control gate 10. The second terminal of resistor R 7  is connected to a supply of relatively negative reference voltage -V. When the logic level of the signal Q 1  from an output terminal of power up multivibrator 4 goes relatively HI, transistor T 2  is rendered non-conductive. Therefore, the output terminal of the microprocessor control gate 10 is clamped to the -V reference supply via resistor R 7  for the pulse width duration of multivibrator 4. The output terminal of the microprocessor control gate 10 is adapted to supply a suitable signal to maintain the central processing unit of the system microprocessor in a reset mode, whereby program execution is inhibited until power has stabilized at an acceptable operating voltage level. Therefore, the contents of the system memory is preserved without an undesirable loss or change of data, as a result of line transients or other power interruptions. 
     It will be apparent that while a preferred embodiment of the invention has been shown and described, various modifications and changes may be made without departing from the true spirit and scope of the invention.