Field of Invention
The present invention relates to a decoding circuit for Manchester-encoded data, and particularly, to a decoding circuit having a synchronously adjustable clock.
Background of Invention
Manchester encoding is a technique of encoding serial binary data to be transmitted between synchronous communication systems. Referring to FIG. 1, the binary data is typically in NRZ (non-return to zero) format in which a high level indicates a "1" bit and a low level indicates a "0" bit. The data is encoded with an encoding clock usually by Exclusive Or-ing rectangularwave clock pulses which are in phase with the bit cells of the NRZ data. This encoding process produces a transition in the center of each bit cell. That is, a data bit of "0" will be encoded as a high-to-low level transition in the center of the bit cell, and a data bit of "1" will be encoded as a low-to-high level transition at the bit center. The continuous encoding of binary data bits will produce an encoded data stream having positive or negative transitions for each bit transmitted.
The overall system must transmit a pattern that will insure the proper recovery of the binary data with a low bit rate error at the receiving end. At the beginning of a transmission of data, the system typically transmits a "dotting" pattern of alternate 1's and 0's for a short period of time in order to establish the phase of the encoding clock. This dotting pattern has a frequency of one-half the clock frequency, so that the encoded data have transitions only in the centers of the respective bit cells. The transmitted dotting pattern allows the receiving system to establish a decoding clock which is ideally in phase with the encoding clock. The decoding clock is then used to decode the transmitted data back into NRZ format usually by Exclusive Or-ing with the encoded data.
However, in the course of transmission, noise and path interferences or distortions can cause the received encoded data to deviate from the phase of the decoding clock initially established by the dotting pattern. As the phase errors accumulate, the transitions of the Manchester-encoded data can deviate quite far from the centers of the bit cells, thereby leading to errors in recovery of the binary data.
As one example of an application for Manchester encoding/decoding of binary data, the wideband output of an FM receiver discriminator in a cellular radio telephone contains voice signals and supervisory audio tones which are time multiplexed with 10 Kb/s Manchester-encoded control signals. A Manchester logic "1" level is represented by fo+8 khz and a "0" level by fo-8 khz. The data is used for such functions as establishing the cell-to-mobile connection and for radio channel selections. However, the cellular radio environment is replete with noise, Doppler shifts, reflections, and problems with discriminator linearity, so that simply Exclusive Or-ing the regenerated decoding clock with raw Manchester data will not provide data recovery at acceptably low error rates.
Summary of Invention
It is therefore a principal object of the invention to provide a decoding circuit which can adjust to phase deviations in the transmission of Manchester-encoded data. It is a specific object to provide a decoding circuit which has means for tracking and eliminating phase deviations in the data bit cells of the received data signal.
In accordance with the invention, a synchronous digital decoding circuit decodes Manchester-encoded data using a clock regenerating circuit which produces a decoding clock that is continuously adjusted in accordance with detected phase deviations in the received data signal. The Manchester-encoded data are transmitted with high-to-low and low-to-high transitions at the centers of the data bit cells. On the receiving end, a digital state machine, which is coupled to a timer/counter unit, detects whether a transition is on-time, early, or late in each bit cell as compared with the established decoding clock. If the transition is early or late, the state machine produces a correction signal which is used to correspondingly shorten or lengthen the clock count by a predetermined incremental amount so that the next bit cell has its transition restored toward the center time position of the bit cell. The adjustment of the clock counts on an on-going basis reduces or eliminates the phase deviation and prevents the accumulation of phase error over an extended length of time.
In the preferred embodiment, an oscillator input of 1.2 MHz is provided to a Mod 12 counter having its output coupled to a Mod 10 counter. The 100 KHz output of the Mod 12 counter is provided to the Mod 10 counter and the state machine. The Mod 10 counter normally counts out at 10 clock units (120 oscillator pulses) per bit cell, in order to generate a decoding clock of 10 KHz frequency for a data rate of 10K bits/sec. The state machine detects whether the transition in the current cell is early or late from the center of the current bit cell and, if so, correspondingly outputs a correction signal to the Mod 12 and/or Mod 10 counter to shorten or lengthen the time-out count for the bit cell by an incremental amount. The incremental time adjustment is preferably in the range of 1-6 oscillator pulses out of 120 oscillator pulses for a bit cell. The state machine continues to adjust the time-out counts for successive bit cells until the detected transition is on-time, i.e., in phase, with the center of the bit cell. The invention thus regenerates a decoding clock that is continuously adjusted to be phase-coherent with the received data signal. The original NRZ data can then be recovered by using the regenerated clock for Exclusive Or-ing with the received data signal or comparable decoding technique.
Brief Description of Drawings
The above objects and further features and advantages of the invention are described in detail below in conjunction with the drawings, of which:
FIG. 1 is a waveform diagram showing an example of Manchester encoding using an encoding clock in phase with binary data in NRZ format;
FIG. 2 is a schematic diagram of a synchronous digital decoding circuit incorporating a clock regenerating circuit for regenerating a continuously adjusted decoding clock from the received Manchester-encoded data in accordance with the invention;
FIGS. 3A, 3B, and 3C illustrate the detection of phase deviations in the bit transitions of the received encoded data and the resulting adjustment of the clock count for the respective bit cells in accordance with the invention;
FIG. 4 is a state diagram illustrating the various states of a preferred form of state machine used in the clock regenerating circuit of FIG. 2; and
FIG. 5 is a logic diagram of a preferred implementation of the state machine of FIGS. 2 and 4.
Detailed Description of Preferred Embodiments
In accordance with the general principles of the invention, a synchronous digital decoding circuit decodes Manchester-encoded data using a clock regenerating circuit which produces a decoding clock that is continuously adjusted in accordance with detected phase deviations in the received data signal. Referring to FIG. 2, the decoding circuit includes a digital state machine 20 coupled to a two-stage timer/counter unit 30 which receives a high frequency oscillator input. In the embodiment shown, the oscillator input of 1.2 MHz is provided to a modulo 12 counter, which normally counts out at 12 oscillator pulses, in order to provide a clock output Q3 at 100 KHz frequency to a modulo 10 counter. The count outputs Q0, Q1, Q2 of the Mod 12 counter are provided as inputs to the Mod 10 counter. The 100 KHz clock output of the Mod 12 counter is also provided to the clock input of the state machine 20. The Mod 10 counter normally counts out at 10 clock increments (120 oscillator pulses) per bit cell, in order to generate a decoding clock output Q7 of 10 KHz frequency. The count outputs Q4, Q5, Q6 of the Mod 10 counter are provided as inputs to the state machine. The decoding clock output Q7, as adjusted by the state machine (to be described hereinafter), is the recovered decoding clock which is used for decoding the received Manchester-encoded data into an NRZ data output. Logic tables for the counts, outputs, and count values of the timer/counter units are shown in Table A below.
As shown schematically in FIGS. 3A-3C, the state machine 20 looks at the raw Manchester-encoded data compared to the 10 clock increment count from the outputs Q4, Q5, Q6 of the Mod 10 counter for each bit cell. The count values of the Mod 10 counter are arbitrarily represented as "0, 1, 2, 3, 4, 8, 9, A, B, C" in each bit cell. The incoming transition of the Manchester data signal is detected by the state machine and a decision is made as to how to adjust the locally generated clock. Three possible decisions can be made. The first case is shown in FIG. 3A when the bit transition occurs at the center of the bit cell, between states "4" and "8", and therefore no correction of the clock is required. The second case is shown in FIG. 3B when the bit transition happens earlier then expected, for example, between the states "3" and "4", which indicates that the bit transition leads the center position of the bit cell and therefore requires that the clock count for the bit cell should be shortened. The third case is shown in FIG. 3C when the bit transition happens later than expected, for example, between states "8" and "9", which indicates that the bit transition lags the center position of the bit cell and therefore requires that the clock count for the bit cell be lengthened.
The state machine 20 outputs two signals back to the modulo counters, Preset and SQ0. The Preset output signal is only valid in the second and third cases which require clock corrections, and the SQ0 signal determines which type of clock correction to make, i.e., either shortening the clock count for the next bit cell (transition is early) or lengthening it (transition is late).
The bit cell count is shortened or lengthened by a predetermined incremental amount which is selected such that the clock adjustment will not overshoot typical values of phase deviation for the applied communications environment, and thereby lead to unstable swings ("jitter") in the correction cycles. On the other hand, the correction amount should not be too short, in order that correction of the phase deviation not take too long a time. For the cellular radio environment, the incremental time adjustment is preferably in the range of 1-6 oscillator pulses out of 120 oscillator pulses for a bit cell, which is about 1/120 to 1/20 of the length of a bit cell, or about 1/12 to 1/2 of a bit cell count increment. In the example shown, the preferred time adjustment is selected to be about 4 oscillator pulses, which is about 1/30 the length of a bit cell, or about 1/3 of a bit cell count increment. The correction amount is added or subtracted in the last count increment "C" of the bit cell. Small phase deviations may be corrected in a single correction cycle, whereas larger phase deviations will be corrected over a number of bit cells. The state machine continues to adjust the time-out counts for successive bit cells until the detected transition is in phase with the center of the bit cell.
The state machine 20 has as its inputs the raw Manchester-encoded data signal and the outputs of the two-stage timer/counter 30. The state machine coding as well as the configuration of the Mod 12 and 10 counters are optimized to allow the clock regenerating logic to be implemented in two standard 16R8 PAL chips. The Mod 12 counter is driven from a very accurate and stable 1.2 MHz TCXO oscillator, such as used as a timebase for a frequency synthesizer in the front end of a cellular receiver. This 1.2 MHz oscillator is phase-coherent to the carriers of typical cellular channels. By changing only the the logic equations of the system Mod 12 counter can be changed to a Mod 15 counter, the American AMPS standards can be converted to the European TACS standards (8 KHz).
Referring to FIG. 4, a preferred form of the state machine consists of 8 unique states, 6 of which are used for the regeneration of the phase-coherent 10 KHz Manchester clock and two unused or illegal states. The states of the state machine 20 are indicated by the numbers in the circles of the diagram. The timer count values from the Mod 10 counter to the state machine are indicated by the numbers in the squares along the arrows which indicate changes of state. While in State 0, the, machine waits for a timer count value of "2" from the Mod 10 counter/timer at which time it samples the Manchester data signal. If this signal is presently a logic 1, the machine advances to State 3, whereas if it is a logic 0, the machine advances to State 2. Once in State 2, the machine waits for a 0-to-1 logic transition of the raw Manchester data signal and changes state depending upon a determination if this transition is either ON TIME (State 4), EARLY (State 6), or LATE (State 7) as indicated by the Mod 10 count value ("4", "3", or "8", respectively) for the bit cell at the time of transition. The same is true if the machine is presently in State 3, with the exception of the polarity of the Manchester data signal. While in either State 4 (ON TIME), State 6 (EARLY), or State 7 (LATE), the state machine waits for the Mod 10 timer to reach a count value of "C" (count of 10 clock units) and issues the preset instructions to the Mod 12 and Mod 10 timers to make a correction in the bit cell clock count. If the state machine determined that the data signal was ON TIME, no correction is made, if EARLY, the timer count is shortened, and if LATE, the timer count is extended.
In FIG. 5, a logic implementation of the state machine 20 is shown having the outputs Q4, Q5, Q6, Q7 of the Mod 10 counter fed to the logic units S0, S1, S2. The logic unit S0 has an output signal S0 which is latched to the flip-flop FF0, and likewise logic unit signal S1 to FF1, and logic unit signal S2 to FF2. The flip-flops FF1, FF2, and FF3 receive as clock inputs the 100 KHz clock output Q3 of the Mod 12 counter. The respective outputs SQ1, SQ2, SQ3 of the state machine flip-flops are fed back to each of the logic units S0, S1, S2 and to the Preset logic unit P. Logic tables for the state machine coding and the inputs and outputs of the logic units are shown in Table B below. Instead of a hardware implementation of the logic units S0, S1, S2, the state machine may be implemented in a software program that is executed for the clock adjustment function. An example of the PAL logic equations used to program a software implementation of the state machine is provided in Table C below.
The Preset signal is generated when the state machine exits either States 6 or 7, and a logic signal of "1" is generated for SQ0 in State 6 and "0" for State 7. The Preset and SQ0 signals fed back to control the Mod 12 and Mod 10 counters to shorten or lengthen the clock count for the bit cell.
The raw Manchester data is fed to an NRZD logic unit N with the recovered decoding clock from output Q7 of the Mod 10 timer/counter. The NRZD logic unit may be a commercially available unit which employs Exclusive Or-ing, or may be specially programmed to implement another decoding logic for the NRZ data. The decoded NRZ data may then be sent on to a data processor or buffer storage for further use in the receiver system.
The invention thus regenerates a decoding clock that is continuously adjusted to be phase-coherent with the received data signal. The phase coherency is obtained without the need for a separate phase control signal or phase-locked loop control circuitry. The invention is particularly suitable for communication systems which operate in a high phase distortion environment, such as cellular radio. The timebase can be derived from the local oscillator such as used in cellular radio systems. The phase-coherency of the locally generated clock results in bit error rates which readily meet the 1:100 bit error rate standard for such cellular radio systems. The digital state machine implementation also has inherent high-pass filtering through the setting of the sampling of Manchester-encoded data at predetermined count intervals.
Corrections to the Mod 12 counter 40 and the Mod 10 counter 50 are made by logically changing the modulo divides of these counters. If a late correction is necessasry, the preset lead 100 is driven low and the SQ0 lead 110 of the state machine 20 instructs the Mod 12 counter 40 to change to a Mod 8 divide, thus shortening the bit cycle by four oscillator cycles. Normally there are 120 cycles per bit but in the above case, there will only be 116 oscillator cycles in a bit. Thus, the clock is shortened by 1/30th of a bit as illustrated in FIG. 6.
When an early correction is required, the state machine drives the preset lead 100 low and SQ0 lead 110 high. The Mod 12 counter 40 changes to a Mod 4 divide and the Mod 10 changes to a Mod 11 divide. This produces a bit cell with four additional oscillator cycles for a total of 124 cycles per bit or a net incerease of 1/30th of a bit.
This technique of changing the modulo divides on command from the state machine provides a means of determining the required amount of correction for recovering the Manchester clock by simply changing the equations used to program the PALS to implement different modulo divides. Our experiments showed this 1/30th of a bit to be the optimized amount of correction.
This technique also permits changing the equations of the Mod 12 counter to a Mod 15 counter which can be used to recover the Manchester clock for European TACS system. This TACS system encodes the data with an 8 KH clock. The American AMPS system encodes with a 10 KHz clock. The system described herein is primarily for the AMPS system. The 1.2 MHz oscillator provides a time base for both systems. In the AMPS system, the Mod 12 and Mod 10 (divide by 120) yield a 10 KHz clock and the in the TACS system, the Mod 15 and Mod 10 (divide by 1500) yield the 8 KHz clock.
The specific embodiments of the invention described herein are intended to be illustrative only, and many other variations and modifications may be made thereto in accordance with the principles of the invention. All such embodiments and variations and modifications thereof are considered to be within the scope of the invention, as defined in the following claims.