Semiconductor timer
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a semiconductor timer, particularly to a timer circuit formed on a metal oxide semiconductor (MOS) integrated circuit. 
     2. Description of the Prior Art 
     In certain MOS integrated circuits, it is necessary to provide a timer circuit which can set a long time interval. For example, an electrically erasable and programmable read only memory (EEPROM) in general requires timer circuits having a time interval of about 10 to 20 msec for erasing and writing operations. According to the prior art, since such a time interval is produced by a time delay of a continuously charged or discharged CR circuit, a capacitor having a relatively high capacitance, for example, about 5600 pF, is required. Such a capacitor cannot be formed from a semiconductor, so an external capacitor having a very high capacitance is attached to the integrated circuit. However, this requires the integrated citcuit to have an additional connecting pin, and adds to the manufacturing process. 
     Furthermore, when the EEPROM functions include automatically erasing, writing, and performing verification, timer circuits or delay circuits having a time interval of about 3 to 5 msec are required to produce each control pulse. According to the prior art, since such timer circuits or delay circuits are formed from a continuously charged or discharged CR circuit consisting of a depletion mode transistor and a MOS capacitor in the MOS integrated circuit, the sizes of the depletion mode transistor and MOS capacitor are very large. Particularly, the size of the MOS capacitor is extremely large. For example, a timer circuit having a time interval of 3 msec requires a depletion mode transistor having a size of about W/L=5 μm/500 μm and a MOS capacitor having a size of about W/L=500 μm/500 μm, where W indicates the channel width and L indicates the channel length of a MOS transistor or capacitor. 
     SUMMARY OF THE INVENTION 
     It is therefore an object of the present invention to provide a semiconductor timer which can be constructed as a MOS integrated circuit having a small size. Preferably, the semiconductor timer has a MOS capacitor of a size smaller than W/L=50 μm/50 μm, even if the time interval of the timer is about 3 msec. 
     The above object is achieved by a semiconductor timer comprising: a first capacitor; a charge circuit connected to the first capacitor for charging the first capacitor; and a discharge circuit connected to the first capacitor for discharging the first capacitor. At least one of the charge circuit and the discharge circuit includes a transistor connected to the first capacitor in series, and a second capacitor connected to the gate of the transistor. The second capacitor receives clock pulses and intermittently turns the transistor on in response to the clock pulses, to gradually charge or discharge the first capacitor. 
     According to the present invention, the charge circuit or the discharge circuit includes a transistor connected in series to a first capacitor used for charge and discharge, and a second capacitor connected to the gate of the transistor. The second capacitor receives clock pulses and intermittently turns the transistor on in response to those clock pulses, to gradually charge or discharge the first capacitor, and a long time interval can be set without increasing the size of the first capacitor. For example, a timer having a time interval of about 3 msec can be constructed with a first MOS capacitor having a size smaller than W/L=50 μm/50 μm. 
     A semiconductor timer according to the present invention is useful to provide the erasing time period and writing time period of an EEPROM, or to provide a time interval of several msec for another job, especially in a computer system. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1a is a circuit diagram of a discharge circuit used in the present invention; 
     FIG. 1b is an equivalent circuit diagram of the diagram in FIG. 1a; 
     FIG. 1c is a wave-form diagram illustrating a relationship between clock pulses and gate voltage; 
     FIG. 2 is a circuit diagram of an embodiment of the present invention; 
     FIG. 3 is a wave-form diagram illustrating an operation of the embodiment of FIG. 2; 
     FIG. 4 is a circuit diagram of a part of a discharge circuit used in another embodiment of the present invention; 
     FIG. 5 is a circuit diagram of another embodiment of the present invention; 
     FIG. 6 is a wave-form diagram illustrating an operation of the embodiment of FIG. 5; 
     FIG. 7 is a circuit diagram of a circuit for stabilizing the amplitude of the clock pulses; and 
     FIG. 8 is a circuit diagram of a further embodiment of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1a illustrates an example of a discharge circuit in a semiconductor timer according to the present invention. In FIG. 1a, reference symbol T T  denotes an enhancement mode transistor. The drain of the transistor T T  is connected to a node N C  to which a first MOS capacitor (not shown) is connected. The source of the transistor T T  is grounded, and the gate of the transistor T T  is connected to one terminal of a second MOS capacitor T C . The other terminal of the capacitor T C  is connected to a clock generator (not shown) to receive clock pulses clock from the clock generator. In response to the clock pulses clock, the second MOS capacitor T C  applies a voltage V G  , which is higher than the threshold voltage V th  of the enhancement mode transistor T T  , to the gate of the enhancement mode transistor T T . Thus, the transistor T T  is intermittently turned on to gradually discharge the first MOS capacitor. 
     FIG. 1b illustrates an equivalent circuit of the discharge circuit illustrated in FIG. 1a. Equivalent capacitors C TC  and C TT  correspond to the second MOS capacitor T C  and the transistor T T , respectively. A relationship between the clock pulses clock and the voltage V G , at the gate of the enhancement mode transistor T T  is illustrated in FIG. 1c. The capacitance C TC  and C TT  of the equivalent capacitors C TC  and C TT  shown in FIG. 1b are defined as 
     
         C.sub.TC =ε.sub.OX ·ε.sub.O ·L.sub.TC ·W.sub.TC /t.sub.OX                              (1) 
    
     
         C.sub.TT =ε.sub.OX ·ε.sub.O ·L.sub.TT ·W.sub.TT /t.sub.OX                              (2) 
    
     where ε OX  is the relative permittivity of the gate oxide layer, ε O  is the permittivity of free space, t OX  is the thickness of the gate oxide layer, L TC  and L TT  are the channel length of the transistor constituting the MOS capacitor T C  and of the enhancement mode transistor T T , and W TC  and W TT  are the channel width of the above transistors. The voltage V G  at the gate of the enhancement mode transistor T T  when the clock pulses clock have the voltage V CC  is defined as ##EQU1## Therefore, the voltage V G  at the gate of the transistor T T  when the clock pulses clock have the voltage V CC  can be easily selected to be a voltage higher than the threshold voltage V th  of the enhancement mode transistor T T  , by designing the channel length L TC  and the channel width W TC  of the MOS capacitor T C  to appropriate values. 
     The enhancement mode transistor T T  will be turned on only when the clock pulses clock have the voltage V CC  , causing the charge in the first MOS capacitor to discharge very slowly. As a result, the size of the first MOS capacitor can be reduced. 
     FIG. 2 illustrates an embodiment of the present invention, in which the discharge circuit illustrated in FIG. 1a is used. In FIG. 2, reference numeral 10 indicates a discharge circuit, and 20 indicates a charge circuit. The discharge and charge circuits 10 and 20 are connected to one terminal (node N C ) of a first MOS capacitor C 1 . The other terminal of the first MOS capacitor C 1  is grounded. One terminal of each of the first and second comparators COM 1  and COM 2  is connected to node N C  of the first MOS capacitor C 1 . The first comparator COM 1  compares the voltage V NC  at the node N C  with a constant reference voltage of 3 V, and the second comparator COM 2  compares the voltage V NC  with a constant reference voltage of 1 V. The output terminals of the first and second comparators COM 1  and COM 2  are connected to input terminals of a flip-flop FF of a negative edge trigger type. One output terminal (node N D ) of the flip-flop FF is connected to the discharge circuit 10, and the other output terminal (node N U ) is connected to the charge circuit 20. The output of this timer is obtained from the node N D . It is apparent that the output of the timer may also be obtained from the node N U . A transistor T 2  for resetting and starting the timer is connected in parallel with the first MOS capacitor C 1 . 
     The discharge circuit 10 comprises a second MOS capacitor C 2  which corresponds to the second MOS capacitor T C  in FIG. 1a, an enhancement mode transistor T 3  which corresponds to the transistor T T  in FIG. 1a, a transistor T 4  connected between the gate of the transistor T 3  and ground, and an inverter INV connected between the gate of the transistor T 4  and the node N D . 
     The charge circuit 20 comprises a transistor T 1  connected between a voltage supply (not shown), for supplying the power supply voltage V CC  , and the node N C . The gate of the transistor T 1  is connected to the node N U . 
     FIG. 3 illustrates wave-forms at various points in the embodiment of FIG. 2. Hereinafter, the operation of the embodiment of FIG. 2 will be described with reference to FIG. 3. During a reset condition, since the transistor T 2  is in an on state, the voltage V NC  at the node N C , which is equivalent to the voltage across the first MOS capacitor C 1  , is zero (0 V). Therefore, the output of the first comparator COM 1  is the &#34;H&#34; level (5 V) and the output of the flip-flop FF, namely the voltage V NU  at the node N U  , is also the &#34;H&#34; level (5 V). As a result, the transistor T 1  is in the on state. Furthermore, since the voltage V ND  at the node N D  is the &#34;L&#34; level (0 V), the transistor T 4  is in the on state and, thus, the transistor T 3  is maintained in the off state during the reset condition. 
     From the above reset condition, if a reset/start signal Reset/Start changes to the &#34;L&#34; level (0 V) and thus the transistor T 2  is turned off, the charging operation of the first MOS capacitor C 1  starts. Namely, current is supplied to the first MOS capacitor C 1  via the transistor T 1 . Thus, the voltage V NC  at the node N C  increases, as illustrated in FIG. 3. When the voltage V NC  exceeds 3 V, the output of the first comparator COM 1  changes from &#34;H&#34; level to &#34;L&#34; level, causing the outputs V ND  and V NU  of the flip-flop FF to change from &#34;L&#34; level to &#34;H&#34; level and from &#34;H&#34; level to &#34;L&#34; level, respectively, as illustrated in FIG. 3. As a result, the transistor T 1  is turned off and the transistor T 4  is turned off, causing the discharging operation of the first MOS capacitor C 1  to start. In other words, since the transistor T 1  is turned off, the charging operation of the first MOS capacitor C 1  will stop. Meanwhile, since the transistor T 4  is off, the voltage V G  at the gate of the transistor T 3  momentarily increases each time a clock pulse having a predetermined frequency is applied to the second MOS capacitor C 2  , causing the transistor T 3  to intermittently turn on in response to the clock pulses clock. Therefore, the first MOS capacitor C 1  is gradually discharged. 
     When the voltage V NC  decreases to a level below 1 V, the output of the second comparator COM 2  changes from &#34;H&#34; level to &#34;L&#34; level, causing the outputs V ND  and V NU  of the flip-flop FF to change from &#34;H&#34; level to &#34;L&#34; level and from &#34;L&#34; level to &#34;H&#34; level, respectively. As a result, the transistor T 1  is turned on to start the charging operation with respect to the first MOS capacitor C 1  , and the transistor T 4  is turned on to ground the gate of the transistor T 3  , causing the transistor T 3  to be maintained in an off state. 
     According to the above embodiment, the voltage V NC  across the first MOS capacitor C 1  gradually changes between +3 V and +1 V. Thus, a long time interval of 3 msec can be obtained for the charging and discharging operations by using a first capacitor C 1  having a small size of about W/L=50 μm/50 μm. 
     FIG. 4 illustrates a part of another example of the discharge circuit 10 in FIG. 2. In this example, a transistor T 4  &#39; is inserted between the second MOS capacitor C 2  and the clock generator (not shown), instead of the transistor T 4  and the inverter INV in the circuit illustrated in FIG. 2. During a reset condition and charging operation, the transistor T 4  &#39; is off, and the clock pulses clock are not applied to the second MOS capacitor C 2  , causing the transistor T 3  (FIG. 2) to be maintained in an off state. 
     FIG. 5 illustrates another embodiment of the present invention, in which the discharge circuit 10 in FIG. 4 is used, and a charge circuit 20&#39; different from that illustrated in the embodiment of FIG. 2, is used. Furthermore, in this embodiment, a high voltage V pp  is used for charging the first MOS capacitor C 1 . 
     The charge circuit 20&#39; includes a charge pump circuit which comprises a third MOS capacitor C 3  and transistors T 5  , T 6  and T 7 . The gate and drain of the transistor T 7  and the source of the transistor T 6  are connected to one terminal of the third MOS capacitor C 3 . The other terminal of the third MOS capacitor C 3  is connected to the clock generator (not shown) to receive the clock pulses clock. The source of the transistor T 7  and the gate of the transistor T 6  are connected to the node N C . The drain of the transistor T 6  is connected to the source of the transistor T 5  , and the gate and drain of the transistor T 5  are connected to a line for supplying a high voltage V PP  of about 19 V. The first comparator COM 1  receives a constant reference voltage (V PP  -3) V which is about 16 V. The remainder of this embodiment is the same as that of the embodiment illustrated in FIG. 2. 
     FIG. 6 illustrates waveforms at various points in the embodiment in FIG. 5. Hereinafter, the operation of the embodiment in FIG. 5 will be explained with reference to FIG. 6. In response to the clock pulses clock, the voltage at the gate of the transistor T 7  momentarily increases and thus the transistor T 7  is intermittently turned on, causing a small charge from the line supplying the high voltage V PP  to be pumped into the first MOS capacitor C 1 . Therefore, the first MOS capacitor C 1  is gradually charged, as illustrated in FIG. 6. For example, the first MOS capacitor C 1  is charged by ΔQ 1  in response to the clock pulse. When the voltage V NC  exceeds (V PP  -3) V, which may be equal to 16 V, the output of the first comparator COM 1  changes from &#34;H&#34; level to &#34;L&#34; level, causing the output V ND  of the flip-flop FF or bistable device to change from &#34;L&#34; level to &#34;H&#34; level, as illustrated in FIG. 6. As a result, the transistor T 4  &#39; is turned on, causing a discharging operation of the first MOS capacitor C 1  to start. The first MOS capacitor C 1  is discharged by ΔQ 2  in response to the clock pulse by the discharge circuit 10 while it is being charged by ΔQ 1  in response to the clock pulse by the charge circuit 20&#39;. The circuit is designed so that ΔQ 2  &gt;ΔQ 1  and the first MOS capacitor C 1  is therefore discharged by ΔQ 2  -ΔQ 1  in response to the clock pulse. The remainder of this embodiment&#39;s operation is the same as that of the embodiment illustrated in FIG. 2. 
     According to the above embodiment, since the charge voltage is high (19 V), a MOS capacitor having a smaller capacitance than that in FIG. 2 can be used for forming the timer having the same time interval. Furthermore, since not only the discharging operation but also the charging operation are executed very slowly, by intermittently turning on the transistor to T7 to transmit charge, a timer having a longer time interval than that in FIG. 2 can be formed. 
     In the above mentioned embodiments, however, if the supply voltage V CC  varies, the amplitude of the clock pulses clock will change, causing the time interval of the timer to change. FIG. 7 illustrates an example of a circuit for preventing the above problem from occurring. In this example, a transistor T 8  is inserted between a clock generator 30 and the charge and/or discharge circuits, and a constant voltage of, for example, 4 V, is supplied to the gate of the transistor T 8 . Therefore, the amplitude of the clock pulses clock is always maintained at a voltage of (4-V th ) V irrespective of any change in V CC  , where V th  is a threshold voltage of the transistor T 8 . 
     FIG. 8 illustrates a further embodiment of the present invention. This embodiment also prevents the above-mentioned problem from occurring. In this embodiment, variable reference voltages are applied to the first and second comparators COM 1  and COM 2 . The variable reference voltges are produced by dividing the power supply voltage V CC  by means of resistors R 1  , R 2   and R 3  connected in series with each other. Therefore, the voltage V NC  for switching between the charging and discharging operations changes depending upon the power supply voltage V CC  , causing the change in time periods of the charging operation and the discharging operation due to changes in the level of V CC  to be reduced. The remainder of the construction and operation of the embodiment of FIG. 8 is the same as those of the embodiment of FIG. 2. 
     Many widely different embodiments of the present invention may be constructed without departing from the spirit and scope of the present invention. It should be understood that the present invention is not limited to the specific embodiments described in this specification, except as defined in the appended claims.