TECHNICAL FIELD OF THE INVENTION
The invention relates to the field of digital timing generators and, more particularly, to digital timing generators which generate a frequency by automatically adjusting their output pulse streams.
BACKGROUND OF THE INVENTION
Timing generators are used to synchronize the many functions found within electronic systems. Most commonly, a certain number of operations must be performed in a given interval of time, this interval of time, generally a cycle time, is marked by a start and a stop pulse or a cycle pulse whose duration is equal to the time between start and stop pulses. It is the purpose of the timing generator to divide the cycle time into sub-intervals, usually of equal length, so that the number of sub-intervals equals the number of operations to be performed. This process is performed in synchronism with the start/stop or cycle pulses. An example of sub-interval timing is in the division of a spinning motor's shaft rotation into 360 equal intervals, one for each degree of rotation. The fact that the rotational speed of the motor's shaft can change, requires that the timing generator adapt its interval timing rate to the varying shaft speed. In this sense, the timing generator is considered to be adaptive and, as such, must vary the time between sub-intervals to accommodate the change in cycle, or shaft rotation time.
The conventional approach to adaptive timing generation for these types of devices has been the phase locked loop (PLL). The dynamic range of the PLL, that is, its ability to accommodate large changes in cycle time, is relatively constrained by noise and saturation in the feedback loop, and in the limited range of the PLL's phase comparator. In electrophotographic copiers and material scanning systems, this necessitates manual adjustment of controls for document or material width, and often does not permit the most efficient use of image memory.
SUMMARY OF THE INVENTION
In the preferred embodiment of the invention, there is provided and all digital count-locked-loop (CLL) timing generator which automatically adjusts its output pulse intervals to fit within the durations of periodic input pulses. The intervals are synchronous with the leading edges of the input pulses and their number within the pulse interval is selectable in increments of one. The generator uses a direct digital feedback loop to correct its output timing for changes in input pulse width and in one embodiment employs an integer time marker to prevent unlocking on non-integer width input pulses.
In one embodiment, a clock oscillator is gated by the periodic input pulses through synchronizing logic circuitry and is used to drive a divide-by-N counter (first counter). The divide-by-N counter has first and second inputs, with the first input receiving the gated clock pulse signals from the clock oscillator and the second input receiving a number count N provided by an N counter (second counter). The output N from the N counter is incremented, left as is, or decremented at the end of the input pulse by the output from a magnitude comparator. The magnitude comparator compares the selected input interval value against the output interval value from the divide-by-N counter in accordance with the difference and/or error between the fixed input value and the provided output value. The digital feedback loop is comprised of an output clock divided-by-N counter (third counter), the magnitude comparator and a program input reference number device for providing the reference interval count number. The digital feedback loop conditions the N counter at a rate of one count per input pulse, to provide the divide-by-N counter with the appropriate value of N so that the number of clock pulses divided by N outputted during each input pulse, matches the number of desired output intervals entered into the program input to establish the reference interval count number.
In a second embodiment of the invention, a divide by the reference number counter (fourth counter) provides an output that is directed to an enabling input to the synchronizing logic circuitry. The reference number counter receives as an input the gated oscillator signal from the synchronizing logic circuitry and is connected to receive the reference number from the program input. In this embodiment, the fourth counter is synchronized in time with the divide-by-N counter and inhibits any change of the value in the N counter if the input pulses width changes and terminates at a time which is not longer by at least one integer value of the selected interval. Thus, the N counter is allowed to increment or decrement only at times corresponding to integer values for the clock divided by N signal interval thus maintaining the loop in lock even in the presence of jittery input pulses.
From the foregoing, it can be seen that it is a primary object of the present invention to provide an all digital timing generator which automatically adjusts its output pulse intervals to fit within the durations of periodic input pulses.
It is also another object of the present invention to provide output pulses which are synchronous with the leading edges of input pulses.
It is a further object of the present invention to provide a digital timing generator having an extended dynamic range which may be easily increased to accommodate differing input pulse widths.
It is a further object of the present invention to provide a digital timing generator which does not utilize analog phased locked oscillators.
These and other objects of the present invention will become more apparent when taken in conjunction with the following description and drawings wherein like characters indicate like parts and which drawings form a part of the present description.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram of one embodiment of the present invention.
FIG. 2 is a block diagram of another embodiment of the present invention.
FIGS. 3A-3E illustrate a group of waveforms useful in understanding the operation of the present embodiments when input pulse width is increasing.
FIGS. 4A-4E illustrate a group of waveforms. useful in understanding the operation of the present embodiments when input pulse width is decreasing.
FIGS. 5A through 5H assembled in accordance with the map of FIG. 5 form a detailed chip level schematic diagram of the FIG. 2 embodiment of the present invention.
DESCRIPTION OF THE PREFERRED EMBODIMENTS
For general background, in a typical divide-by-N counter, N is an integer value from which the counter is decremented to zero during each division cycle. At zero count, a terminal count pulse is generated which resets the counter to the value N, and the cycle repeats. Of course, if N is zero, every decrement will provide a terminal count pulse, hence, N defaults to one under this circumstance. If the counter is decremented at the rate of F clock hertz, the resulting terminal count pulse frequency, Ft, will correspond to:
F.sub.t =F.sub.clock /N (1)
where:
Ft =the terminal count pulse repetition frequency
Fclock =the frequency at which the counter is decremented
N=an integer value greater than zero with the time interval between terminal count pulses t, being the reciprocal of Ft,
t=1/F.sub.t (2)
Substituting Equation (1) for Ft,
t=1/F.sub.clock /N=N/F.sub.clock (3)
Assuming that the division cycle is repeated B times, exactly B terminal count pulses would be generated over a time duration tp,
t.sub.p =Bt (4)
Substituting Equation (3) for t,
t.sub.p =BN/F.sub.clock (5)
and thus, tp can be changed by altering the value of N.
Since Fclock is usually a fixed frequency developed by a crystal oscillator, for example, and B and N are integer values, it can be shown that Equation (5) is satisfied only for discrete values of tp. Since, however, in this equation, there are no upper limits placed on B, N or Fclock, tp can be resolved into very fine increments over an unlimited range of values. By rearranging Equation (5) and solving for B, the number of division cycles for a given pulse width is represented by,
B=t.sub.p F.sub.clock /N (6)
The digital count-locked-loop (CLL) timing generator 10 shown in FIG. 1 exploits this ability. Its operation is based upon a divide-by-N counter 15, connected to a digital feedback loop that is formed by an N counter 16, a magnitude comparator 17, an Fclock /N counter 18 and a program input reference number device 19. An oscillator 14 provides the clock signal Fclock to a synchronizing logic circuit 12. The synchronizing logic circuit 12 provides an enable signal to the N counter 16 and a gated F clock signal to the countdown input to the divide-by-N counter 15 in response to input pulses.
Referencing back to Equation (6), the pulse, tp, can be divided into B intervals by varying the value of N. This is accomplished automatically in the timing generator 10 most notably, without the need for high stability time or frequency sources. The input pulses to be dissected, of width tp, are applied to the synchronizing logic 12, where each pulse gates the passage of Fclock into a first counter, the divide-by-N counter 15. N is determined by the value in a second counter, N counter 16, which acts as a filter and storage register in the feedback loop and can be set to some specific value, if desired, when power is applied. The output of the divide-by-N counter 15, for the duration of each pulse tp, consists of terminal count pulses occurring from Equation (1) with a frequency of:
F.sub.t =F.sub.clock /N (7)
where:
Ft =the terminal count frequency
Fclock =the frequency at which the counter is decremented
N=the value of the N counter
At this point, the digital feedback loop comes into play. These terminal count pulses are accumulated in a thrid counter, the Fclock /N counter 18, which feeds the accumulated terminal count value (A) to the magnitude comparator 17. In the comparator, the number of terminal count pulses (A) accumulated during tp in the Fclock /N counter 18, is compared with the value (B). (B) is the number of terminal count pulses one wishes to provide during the interval tp, and the magnitude comparator indicates at any instant whether (A) is greater or less than (B). (A) can thus be regarded as an error signal that is compared with (B), a selectable reference number. At the termination of each input pulse, the synchronizing logic 12 inhibits the gated Fclock pulses from decrementing the divide-by-N counter 15 any further. Also, at this same time, the magnitude comparator 17 indicates the value of (A) relative to (B) and if, for example, too few terminal count pulses were produced, that is, (A)<(B), the N counter 16 is decremented and immediately provides this new, lower value of N to the divide-by-N counter 15.
The next iteration of tp provides the same sequence of events until (A)=(B), and the N counter 16 contains the appropriate value of N to satisfy Equation (6) for B, the number of terminal count cycles required during one input pulse.
In this way, the divide-by-N counter 15 is automatically conditioned by way of the feedback loop consisting of the Fclock /N counter 18, magnitude comparator 17, and N counter 16, to adapt its terminal count timing to the input pulse duration.
DYNAMIC RANGE
The dynamic range of the CLL timing generator 10 can be defined as the ratio of the maximum to the minimum input pulse duration to which the loop can adapt. Simply stated:
R=t.sub.pmax /t.sub.pmin (8)
where: R=the dynamic range of the CLL timing generator.
By substitution of Equation (5) for tp, it can be shown that;
R=N.sub.max /N.sub.min (9)
where N represents the value in the N counter 16.
For a binary counter, the minimum count is zero, which defaults to one in the divide-by-N configuration. The maximum count,
N.sub.max =2.sup.x-1 +2.sup.x-2 + . . . +2.sup.1 +2.sup.0 (10)
or more simply stated,
N.sub.max =2.sup.x-1 (11)
where x=the number of counter stages, in bits.
From Equation (9),
R=N.sub.max /N.sub.min =.sup.(2x-1) /1=2.sup.x-1 (12)
As such, the dynamic range of the CLL timing generator 10 is, theoretically speaking, unlimited, and increases exponentially with the number of counter stages employed.
TRANSIENT RESPONSE
The amount of time required for the N counter 16 to be incremented or decremented to the appropriate value of N, due to a change in input pulse duration, is a measure of the generator's transient response. If the value in the N counter 16 is modified at the rate of one count per input pulse, the time depends upon the pulse rate and duration, and the difference in input pulse width. This can be expressed as:
t.sub.d =(t.sub.rep)(t.sub.pmax /t.sub.pmin) (13)
or
t.sub.d =(t.sub.rep)(ΔN) (14)
where:
td =the time required for the loop to lock, in seconds
trep =1/the pulse repetition rate (in Hertz)
tpmax =the longer input pulse duration
tpmin =the shorter input pulse duration
ΔN=the change in the value of the N counter 16
Of course, since the dynamic range of the feedback loop determines the maximum difference in input pulse width over which the loop can lock, the maximum time required for the loop to lock on an instantaneous change in input pulse width spanning the full loop dynamic range would be from Equation (13)
t.sub.dmax =(t.sub.rep)(t.sub.pmax /t.sub.pmin) (15)
Since;
t.sub.pmax /t.sub.pmin =N.sub.max /N.sub.min (16)
and;
t.sub.max /t.sub.min =R (17)
then;
t.sub.dmax =(t.sub.rep)R (18)
where:
R=the dynamic range of the feedback loop from Equation (9)
trep =1/the pulse repetition rate (in Hertz)
Timing Error
Reviewing Equation (6) for B, the number of divide-by-N cycles required to dissect a pulse, tp, into equal intervals,
B=t.sub.p F.sub.clock /N (19)
it can be shown that, for a fixed Fclock, B will attain integer values only for specific values of tp.
Under these circumstances, the CLL timing generator 10 will attain an appropriate value for N, and the terminal (sub-interval) count pulses will all fall within + or -1/Fclock period of their respective times, relative to the leading edge of tp.
A situation arises when the values for tp and Fclock result in a fractional value for B. In this case, the loop will alternately switch between two values for N, one too low, and the other too high to satisfy the equation, and the number of sub-intervals generated during tp will, for one cycle, be too few, and for the next, too many.
A glance at Equation (6) reveals two solutions. Since N is confined to integer values, either tp or Fclock must be conditioned to settle on one value for N. Conditioning Fclock can be accomplished using a conventional PLL, but modifying tp by quantizing its duration is perhaps, the simplest approach. Restating (6),
B=t.sub.p F.sub.clock /N (20)
and rearranging,
F.sub.clock /B=N/t.sub.p (21)
Substituting,
F.sub.clock =1/t.sub.c (22)
where: tc =the period of Fclock
Bt.sub.c =t.sub.p /N (23)
where:
B=the number of sub-intervals created during tp
tp =the input pulse duration
N=the value in the N counter when the loop is locked
This sequence demonstrates that if a separate counter is configured to divide the gated Fclock by the value of B, the terminal count pulses from this counter will coincide precisely with the discrete time intervals of tp that satisfy Equation (6) for all values of N.
FIG. 2 illustrates in block diagram form the implementation of a CLL timing generator 20 with such a counter shown as a fourth counter 22.
The gated Fclock signal drives both the divide-by-N counter 15 and the divide-by-B counter 22 to guarantee synchronization of their output pulses. The integer time mark output pulses of the divide-by-B counter 22 are fed to a synchronizing logic circuit 21 where the termination of the input pulse is compared with the occurrence of an integer time mark. The result of the comparison controls the enable line to the N counter 16 to allow a decrement to occur only if the input pulse terminates at least one integer time mark later than the previous input pulse termination.
Under this condition, the maximum time error Δt between the actual and the quantized input pulses is,
Δt=t.sub.p -t.sub.q (24)
From Equation (23),
t.sub.p =NBt.sub.c (25)
and,
t.sub.q =(N-1)Bt.sub.c (26)
where: tq =the quantized input pulse width
Therefore;
Δt=NBt.sub.c -(N-1)Bt.sub.c (27)
Δt=NBt.sub.c -NBt.sub.c +Bt.sub.c (28)
Δt=Bt.sub.c (29)
where:
B=the number of desired sub-intervals during tp and
tc =1/Fclock
Referring to FIG. 3, which is a group of waveforms illustrating the CLL's operation when the INPUT signals' pulse width increases, specifically waveform (A) represents a string of INPUT pulses having a nominal pulse width designated tp which increases in width by an amount Δtp.
The waveform of FIG. 4B illustrates the integer time marks for a B value of 512. Each mark is 25 n sec. in width and is spaced at a distance t1. The integer time marks are compared against the termination of the input pulses. A decrement/increment can occur only if the input pulse terminates at least one integer time mark later than the previous input pulse termination. At the termination A1, the integer mark coincides with the input pulse termination and, at termination A2, it is greater. In turn, in FIG. 3C the counter is permitted to increment at these two times.
FIG. 3D shows that decrementing of the counter does not occur during this time period.
FIG. 3E illustrates the CLL timing generator output signal Fclock /N where X is equal to 512 equally spaced pulses.
Referring to FIG. 4, which is a group of waveforms illustrating the CLL's operation when the INPUT signals' pulse width decreases, specifically waveform (A) represents a string of pulses having a nominal pulse width tp which then decreases in width by an amount Δtp.
The waveform of FIG. 4B illustrates the integer timing marks occurring at least one integer time mark later than the previous input pulse termination. FIG. 4C illustrates the increment N waveform which remains flat while FIG. 4D illustrates the decrement N waveform which contains a decrement pulse that is fed to the N counter 16. The resultant output is a group of pulses, illustrated in FIG. 4E which contain 512 equally spaced pulses, except for the transition pulse E1, which contains less than 512 pulses.
FIGS. 5A through 5H illustrate in detail a chip schematic diagram of the CLL timing generator for enabling those persons skilled in the art to replicate the invention without undue experimentation. The illustrated CLL timing generator incorporates three TIL 311 displays coupled to the N counter stages, 74F193's, to display the values stored in the N counter 16. In addition, address outputs FAO through FA11 are derivable from the (A) output of the Fclock /N counter 18. These address signals may be used to address peripheral equipment such as a flying spot laser or a solid state linear array scanner (which form no part of the present invention).
Through circuitry in the sychronizing logic block 21 an ADDRVALID signal is generated to assist in the utilization of the address signals FAO through FA11.
The number of intervals program inputs block 19 can be set to the value of B from external sources on the input labeled A0 through A11 or the value may be established by setting the hexadecimal coded switches 230057GB to reflect the desired value. All of the dotted block circuitry corresponds to like numbered blocks in FIGS. 1 and 2.
Further description of the interconnections of the chips used in FIGS. 5A through 5B is believed unnecessary as the schematic is self-explanatory to a person skilled in the art.
While there has been shown what are considered to be the preferred embodiments of the present invention, it will be manifest that many changes and modifications may be made therein without departing from the essential spirit of the invention. It is intended, therefore, in the annexed claims to cover all such changes and modifications as may fall within the true scope of the invention.