Abstract:
The circulating shift register time-keeping circuit described herein includes an incrementer/decrementer that increments and decrements the contents of both clock and stopwatch registers and performs reset and carry functions therefor.

Description:
BACKGROUND AND SUMMARY OF THE INVENTION 
     Circulating shift register time-keeping circuits are known in the prior art, see, for example, U.S. Pat. Application Ser. No. 492,303 entitled &#34;Circulating Shift Register Time-Keeping Circuit&#34; filed by France Rode et al. on July 26, 1974. In operation, real time data circulates in serially connected delay elements comprising a circulating shift register (CSR) which is clocked at a predetermined circulation rate. With every complete circulation of the CSR, the data word representing the lowest unit of time data available for readout by the user is incremented by an adder through which the data circulates before re-entering the shift register. In such systems, the rate at which the time data is incremented may be selected to suit the frequency of circulation of that data in the shift register and may actually correspond to the smallest unit of time available to the user. 
     The operation of a binary adder is described for a time-keeping circuit in the above-mentioned patent application. Since the binary adder only increments, other means must be provided for necessary carry functions between digits and for resetting prior digits to initial values. For example, when the hundredths-of-a-second digit (0.01) is incremented to a value of 0.09, the next increment of that digit must cause a carry of the tenths-of-a-second digit (0.1) and reset of the 0.01 digit from 9 to 0. Means for performing these carry and reset functions are also discussed in the above-referenced patent application (see, for example, the discussion of the operation of adder controller 43 in conjunction with auxiliary register 45 therein). 
     The incrementer/decrementer of the present invention increments, decrements and performs the carry and reset functions for the contents of circulating shift register memories, and is useful in both clock and stopwatch applications. BCD code has been selected for the preferred embodiment because the incrementer must operate on four-bit digits and count only from 0 through 9. Thus, when a 9 is detected in the first digit (1001 in BCD), then the incremented result should not be a 10 (1010) but rather a 0 (0000), with a &#34;carry&#34; to the next digit. 
     The preferred embodiment of the present invention comprises a flip-flop, two exclusive OR gates, two exclusive NOR gates and an AND gate. The circuit decrements or increments the contents of a circulating shift register memory in response to appropriately timed control signals as those contents circulate therethrough. 
    
    
     DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a logic diagram of an incrementer/decrementer constructed according to the preferred embodiment of the present invention. 
     FIG. 2a is a timing diagram showing the relative duration and timing of the control signals and time data for the incrementer/decrementer of FIG. 1 while incrementing when carry or reset functions are not required. 
     FIG. 2b is a timing diagram showing the relative duration and timing of the control signals and time data for the incrementer/decrementer of FIG. 1 while decrementing when carry or reset functions are not required. 
     FIG. 2c is a timing diagram showing the relative duration and timing of the control signals and time data for the incrementer/decrementer of FIG. 1 while incrementing when carry and reset functions are required. 
     FIG. 2d is a timing diagram showing the relative duration and timing of the control signals and time data for the incrementer/decrementer of FIG. 1 while decrementing when carry and reset functions are required. 
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, the preferred embodiment of the present invention comprises carry flip-flop 10, exclusive OR gates 12 and 14, exclusive NOR gates 16 and 18, and AND gate 720. Each of the eight digits of time data (i.e. 0.01, 0.1, 1.0 and 10 seconds digits; 1.0 and 10 minutes digits; and 1.0 and 10 hours digits) comprises four time data bits. Control signal A enables the complementing of particular data bits for resetting time data digits as time passes. This is logic 1 during the selected bit of a four-bit digit to be complemented. When no bit complement is required, this signal is logic 0 (positive logic signal convention is assumed for this description). Control signal B determines whether the time data digit is to be incremented or decremented and is logic 0 for increment, logic 1 for decrement. Control signal C presets carry flip-flop 10 (logic 1) for the first bit of each digit for one bit time. Input I receives time data from the output of the CSR, and output 0 applies the incremented or decremented time data to the input of the CSR. The clock signal input to flip-flop 10 is synchronous with the clock or timing signal of the CSR being incremented or decremented and therefore the same as time data bit timing. 
     As shown in FIGS. 2a and 2b, during operation as an incrementer, control signals A and B are logic 0. Control C is logic 1 for the first bit time of each digit, then is logic 0 for the remaining three-bit times. For operation as a decrementer, control signal A is logic 0, control signal B is logic 1, and control signal C is the same as for incrementing. 
     Referring now to FIG. 2c, when the time data for a particular digit, for example, the 0.01 seconds digit, reaches a value of 9, the result of incrementing that digit during the next clock pulse is zero (0) which is obtained by complementing bit four of the four-bit digit. A carry is provided for the 0.1 seconds digit by preset flip-flop 10. Thus 
     
         ______________________________________ ##STR1##Control signal A = 1 for b.sub.4Control signal A = 0 for b.sub.1, b.sub.2, b.sub.3Control signal B = 1 for b.sub.1, b.sub.2, b.sub.3, b.sub.4Control signal C = 1 for b.sub.1 of next digit.______________________________________ 
    
     Control signal A = 1 for b 4   
     Control signal A = 0 for b 1 , b 2 , b 3   
     Control signal B = 1 for b 1 , b 2 , b 3 , b 4   
     Control signal C = 1 for b 1  of next digit. 
     For the case of decrementing from 10 to 09, the control signals are the same except that control signal B is logic 0 for all four bits of the digit, as shown in FIG. 2d. 
     The 0.1 and 1.0 seconds and the 1.0 minutes digits are reset in the same manner. Similarly, the result of incrementing the 10 seconds and the 10 minutes digits is zero during the next clock pulse after reaching a value of 5 and a carry is provided by flip-flop 10 for the next digit. Resetting of the 1.0 and 10.0 hours digits varies with the mode of the clock -- i.e., whether in 12 or 24 hour mode. In the 24-hour mode, the 1.0 and 10 hours digits must be reset to zero when the 1.0 hours digit reaches a value of three 59 minutes and 59.99 seconds after the 10 hours digit becomes two. In the 12-hour mode, the 1.0 hours digit must be reset to a value of one 59 minutes and 59.99 seconds after reaching a value of two when the 10 hours digit is one. Tables I and II summarize the action of the circuit for the reset and carry functions discussed above 
     
                       TABLE I______________________________________                   Input Digit                             DesiredInput Digit     Action        After Act.                             Output Digit______________________________________b.sub.4 b.sub.3 b.sub.2 b.sub.1                   b.sub.4 b.sub.3 b.sub.2 b.sub.1                             b.sub.4 b.sub.3 b.sub.2 b.sub.11 0 0 1 Change increment to                   0 0 0 1   0 0 0 0   decrement, complement(BCD `9`)   b.sub.4 and preset carry   F/F for next digit.0 1 0 1 Change increment to                   0 0 0 1   0 0 0 0   decrement, complement(BCD `5`)   b.sub.3 and preset carry   F/F for next digit______________________________________ 
    
     In the case of minutes digits, there will be a &#34;carry&#34; from the prior digit -- i.e., for the 10 minutes digit, the carry will come from the 1 minute digit, and for the 1 minute digit the carry will come from the 10 seconds digit. 
     
                       TABLE II______________________________________                  Input Digit                             DesiredInput Digit     Action       After Action                             Output Digit______________________________________b.sub.6 b.sub.5 b.sub.4 b.sub.3 b.sub.2 b.sub.1                    b.sub.4 b.sub.3 b.sub.2 b.sub.1                              b.sub.4 b.sub.3 b.sub.2 b.sub.11 0 0 0 1 1     Change increment                    0 0 0 1   0 0 0 0     to decrement,(BCD 23 hours)     complement b.sub.2and carry F/F     and preset carrypreset    F/F for next digit0 0 1 0   Change increment                    0 0 0 1   0 0 0 0     to decrement,and carry F/F     complement b.sub.1preset    and b.sub.2 and preset     carry F/F for     next digit______________________________________ 
    
     Referring to Table II for the 1.0 and 10 hours digits, the circuit &#34;looks ahead&#34; to the first two bits of the following digit. Thus, the 1.0 and 10 hours digits are reset to zero, as shown. Since electronic time-keeping circuits may include a calender CSR having days, months and even years digits, that CSR is incremented in the same manner described for the clock registers, with similar reset and carry functions wherein the 1.0 days digit is incremented when the 1.0 and 10 hours digits are reset to zero in the 24-hour mode or when those digits are reset to one and zero respectively in the 12-hour mode. 
     The present invention may be used with a stopwatch CSR in two different modes. For applications where an event is timed for total elapsed time (e.g., a race), the register will be incremented in the same manner described, including reset and carry functions. For applications where time is known and time data is preloaded into the register (e.g., boiling a 3-minute egg), that time data will be decremented (i.e. control signal b = logic 1) as summarized in Table III below for the seconds digits. 
     
                       TABLE III______________________________________                  Input Digit                             DesiredInput Digit    Action        After Action                             Output Digit______________________________________(b.sub.4 b.sub.3 b.sub.2 b.sub.1)                  (b.sub.4 b.sub.3 b.sub.2 b.sub.1)                             (b.sub.4 b.sub.3 b.sub.2 b.sub.1)0 0 0 0  Change decrement to                  1 0 0 0    1 0 0 1    increment, invert b.sub.41st &#34;second&#34;    and preset. Carry        (BCD 9)digit)   F/F for next digit0 0 0 0  Change decrement to                  0 1 0 0    0 1 0 1    increment, invert b.sub.4(2nd &#34;second&#34;)    and preset carry F/F     (BCD 5)digit)   for next digit______________________________________ 
    
     It should be noted that, using the incrementer/decrementer of the present invention, a stopwatch register can be decremented &#34;through zero,&#34; i.e. when time data reaches a value of zero in all registers control signal B can be changed to logic 0 and registers begin incrementing. This feature is useful to determine how much more than the preselected time the egg boiled. Of course, the event of time data reaching zero in all registers may also be used to produce an alarm signal or output control signal for controlling an appliance. 
     Any form of CSR may be used with the present invention. Furthermore, any combination of logic circuitry or program controlled circuit or combination thereof may be used to generate the clock and control signals. Since the circuit of the present invention will increment, decrement, or perform and carry functions for the contents of a CSR in response to the timed control signals, the timing of those signals will depend upon the particular application which may include time-keeping circuits, counter, and the like.