Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Line Coding: A Tutorial on Line Code Transformations and Encoding/Decoding, Exercises of Digital Electronics

Create a MATLAB program for the B8ZS code. Create signaling formats corresponding to 1,000,000 bits making the following assumptions on your bitstream (the following are separate cases to consider)

Typology: Exercises

2017/2018

Uploaded on 09/29/2018

sreerama-samartha
sreerama-samartha ๐Ÿ‡ฎ๐Ÿ‡ณ

3 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Line coding Vol D1, ch 5, rev 1.0 - 41
LINE CODING
LINE CODINGLINE CODING
LINE CODING
PREPARATION................................................................................. 42
why line coding ? ......................................................................42
the modules ............................................................................... 43
terminology ..............................................................................................44
available line codes ................................................................... 44
NRZ-L...................................................................................................... 44
NRZ-M.....................................................................................................44
UNI-RZ ....................................................................................................45
BIP-RZ..................................................................................................... 45
RZ-AMI ...................................................................................................45
Biฯ†-L........................................................................................................ 45
DICODE-NRZ .........................................................................................45
band limiting ............................................................................. 46
duobinary encoding..................................................................................46
EXPERIMENT ................................................................................... 47
procedure................................................................................... 47
TUTORIAL QUESTIONS ................................................................. 48
pf3
pf4
pf5
pf8

Partial preview of the text

Download Line Coding: A Tutorial on Line Code Transformations and Encoding/Decoding and more Exercises Digital Electronics in PDF only on Docsity!

LINE CODINGLINE CODING LINE CODINGLINE CODING

  • Line coding Vol D1, ch 5, rev 1.0 -
    • PREPARATION.................................................................................
      • why line coding?
      • the modules
        • terminology ..............................................................................................
      • available line codes
        • NRZ-L......................................................................................................
        • NRZ-M.....................................................................................................
        • UNI-RZ ....................................................................................................
        • BIP-RZ.....................................................................................................
        • RZ-AMI ...................................................................................................
        • Biฯ†-L........................................................................................................
        • DICODE-NRZ .........................................................................................
      • band limiting
        • duobinary encoding..................................................................................
    • EXPERIMENT
      • procedure...................................................................................
    • TUTORIAL QUESTIONS

42 โ€“ D1 Line coding

LINE CODINGLINE CODING^ LINE CODINGLINE CODING

ACHIEVEMENTS: familiarity with the properties of the LINE-CODE ENCODER

and LINE-CODE DECODER modules, and the codes they generate.

PREREQUISITES: an appreciation of the purpose behind line coding.

EXTRA MODULES : LINE-CODE ENCODER and LINE-CODE DECODER

PREPARATIONPREPARATIONPREPARATIONPREPARATION

This โ€˜experimentโ€™ is tutorial in nature, and serves to introduce two new modules. In your course work you should have covered the topic of line coding at what ever level is appropriate for you. TIMS has a pair of modules, one of which can perform a number of line code transformations on a binary TTL sequence. The other performs decoding.

why line codingwhy line codingwhy line codingwhy line coding ????

There are many reasons for using line coding. Each of the line codes you will be examining offers one or more of the following advantages:

spectrum shaping and relocation without modulation or filtering. This is important in telephone line applications, for example, where the transfer characteristic has heavy attenuation below 300 Hz. bit clock recovery can be simplified. DC component can be eliminated; this allows AC (capacitor or transformer) coupling between stages (as in telephone lines). Can control baseline wander (baseline wander shifts the position of the signal waveform relative to the detector threshold and leads to severe erosion of noise margin). error detection capabilities. bandwidth usage ; the possibility of transmitting at a higher rate than other schemes over the same bandwidth.

At the very least the LINE-CODE ENCODER serves as an interface between the TTL level signals of the transmitter and those of the analog channel. Likewise, the

44 โ€“ D1 Line coding

terminologyterminology^ terminologyterminology

  • the word mark , and its converse space , often appear in a description of a binary waveform. This is an historical reference to the mark and space of the telegraphist. In modern day digital terminology these have become HI and LO, or โ€˜1โ€™ and โ€˜0โ€™, as appropriate.
  • unipolar signalling : where a โ€˜1โ€™ is represented with a finite voltage V volts, and a โ€˜0โ€™ with zero voltage. This seems to be a generally agreed-to definition.
  • those who treat polar and bipolar as identical define these as signalling where a โ€˜1โ€™ is sent as +V, and โ€˜0โ€™ as -V. They append AMI when referring to three-level signals which use +V and -V alternately for a โ€˜1โ€™, and zero for โ€˜0โ€™ (an alternative name is pseudoternary).

You will see the above usage in the TIMS Advanced Modules User Manual , as well as in this text. However, others make a distinction. Thus:

  • polar signalling : where a โ€˜1โ€™ is represented with a finite voltage +V volts, and a โ€˜0โ€™ with -V volts.
  • bipolar signalling : where a โ€˜1โ€™ is represented alternately by +V and -V, and a โ€˜0โ€™ by zero voltage.
  • the term โ€˜RZโ€™ is an abbreviation of โ€˜return to zeroโ€™. This implies that the particular waveform will return to zero for a finite part of each data โ€˜1โ€™ (typically half the interval). The term โ€˜NRZโ€™ is an abbreviation for โ€˜non-return to zeroโ€™, and this waveform will not return to zero during the bit interval representing a data โ€˜1โ€™.
  • the use of โ€˜Lโ€™ and โ€˜Mโ€™ would seem to be somewhat illogical (or inconsistent) with each other. For example, see how your text book justifies the use of the โ€˜Lโ€™ and the โ€˜Mโ€™ in NRZ-L and NRZ-M.
  • two sinusoids are said to be antipodal if they are 180 0 out of phase.

available line codesavailable line codesavailable line codesavailable line codes

For a TTL input signal the following output formats are available from the LINE- CODE ENCODER.

NRZ-LNRZ-L NRZ-LNRZ-L

Non return to zero - level (bipolar) : this is a simple scale and level shift of the input TTL waveform.

NRZ-MNRZ-M NRZ-MNRZ-M

Non return to zero - mark (bipolar): there is a transition at the beginning of each โ€˜1โ€™, and no change for a โ€˜0โ€™. The โ€˜Mโ€™ refers to โ€˜inversion on markโ€™. This is a

Line coding D1 - 45

differential code. The decoder will give the correct output independently of the polarity of the input.

UNI-RZUNI-RZ UNI-RZUNI-RZ

Uni-polar - return to zero (uni-polar): there is a half-width output pulse if the input is a โ€˜1โ€™; no output if the input is a โ€˜0โ€™. This waveform has a significant DC component.

BIP-RZBIP-RZ BIP-RZBIP-RZ

Bipolar return to zero (3-level): there is a half-width +ve output pulse if the input is a โ€˜1โ€™; or a half-width -ve output pulse if the input is a โ€˜0โ€™. There is a return-to-zero for the second half of each bit period.

RZ-AMIRZ-AMI RZ-AMIRZ-AMI

Return to zero - alternate mark inversion (3-level): there is a half-width output pulse if the input is a โ€˜1โ€™; no output if the input is a โ€˜0โ€™. This would be the same as UNI- RZ. But, in addition , there is a polarity inversion of every alternate output pulse.

BiBi BiBiฯ†ฯ†ฯ†ฯ†-L-L-L-L

Biphase - level (Manchester): bipolar ยฑV volts. For each input โ€˜1โ€™ there is a transition from +V to -V in the middle of the bit-period. For each input โ€˜0โ€™ there is a transition from -V to +V in the middle of the bit period.

DICODE-NRZDICODE-NRZ DICODE-NRZDICODE-NRZ

Di-code non-return to zero (3-level) : for each transition of the input there is an output pulse, of opposite polarity from the preceding pulse. For no transition between input pulses there is no output. The codes offered by the line-code encoder are illustrated in Figure 2 below. These have been copied from the Advanced Module Users Manual , where more detail is provided.

Line coding D1 - 47

EXPERIMENTEXPERIMENTEXPERIMENTEXPERIMENT

Figure 3 shows a simplified model of Figure 1. There is no source encoding or decoding, no baseband channel, and no detection. For the purpose of the experiment this is sufficient to confirm the operation of the line code modules.

2.083 kHz bit clock

ext. trig.

8.333 kHz from MASTER SIGNALS

TTL out re-timed bit clock

change polarity

Figure 3: simplified model of Figure 1

When a particular code has been set up, and the message successfully decoded without error, the BUFFER should be included in the transmission path. By patching it in or out it will introduce a polarity change in the channel.

If there is no change to the message output, then the

code in use is insensitive to polarity reversals.

Note that the LINE-CODE DECODER requires, for successful decoding, an input signal of amplitude near the TIMS ANALOG REFERENCE LEVEL (ยฑ2 volt pp). In normal applications this is assured, since it will obtain its input from the DECISION MAKER.

procedureprocedureprocedureprocedure

There are no step-by-step Tasks for you to perform. Instead, it is left to you to ensure that (in the approximate order indicated):

  1. you read the TIMS Advanced Modules User Manual for more details of the LINE-CODE ENCODER and LINE-CODE DECODER modules than is included here.
  2. you select a short sequence from the transmitter message source

48 โ€“ D1 Line coding

  1. at least initially you synchronize the oscilloscope to show a snapshot of the transmitter sequence. Later you may be interested in eye patterns?
  2. examine each code in turn from the encoder, confirming the transformation from TTL is as expected. On the other hand, and far more challenging, is to determine what the law of each transformation is without help from a Textbook or other reference.
  3. of significant interest would be an examination of the power spectra of each of the coded signals. For this you would need data capturing facilities, and software to perform spectral analysis.
  4. (^) and so on .............

resettingresettingresettingresetting

Resetting of the LINE-CODE ENCODER and the LINE-CODE DECODER after the master clock is connected, or after any clock interruption, is strictly not necessary for all codes. But it is easier to do it for all codes rather than remember for which codes it is essential. For more details refer to the TIMS Advanced Modules User Manual.

TUTORIAL QUESTIONSTUTORIAL QUESTIONS TUTORIAL QUESTIONSTUTORIAL QUESTIONS

Q1 why introduce the complications of line encoding in a digital transmission

system?

Q2 apart from the inevitable delay introduced by the analog filter, did you notice

any other delays in the system? You may need this information when

debugging later experiments.

Q3 an important function of many line encoders is the elimination of the DC

component. When is this desirable?