0% found this document useful (0 votes)
52 views17 pages

PCM Encoding

Uploaded by

ggraceangelie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views17 pages

PCM Encoding

Uploaded by

ggraceangelie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

RIZAL TECHNOLOGICAL UNIVERSITY

COLLEGE OF ENGINEERING AND ARCHITECTURE


DEPARTMENT OF CHEMISTRY, MATHEMATICS AND
PHYSICS ELECTRONICS AND COMMUNICATION ENGINEERING

PCM Encoding

SUBMITTED BY
Mamba, Cyrel Ann

SUBMITTED TO
ENGR. JENNY ARUTA

BS-ECE
st
1 Semester A.Y. 2024-2025
Experiment 12 - PCM encoding

Preliminary discussion
As you know, digital transmission systems are steadily replacing analog systems in
commercial communications applications. This is especially true in
telecommunications. That being the case, an understanding of digital transmission
systems is crucial for technical people in the communications and
telecommunications industries. The remaining experiments in this book use the
Emona Telecoms-Trainer 101 to introduce you to several of these systems starting
with pulse code modulation (PCM).

PCM is a system for converting analog message signals to a serial stream of Os and
1s. The conversion process is called encoding. At its simplest, encoding involves:

 Sampling the analog signal's voltage at regular intervals using a sample-and-


hold scheme (demonstrated in Experiment 11).
 Comparing each sample to a set of reference voltages called quantisation
levels.
 Deciding which quantisation level, the sampled voltage is closest to.
 Generating the binary number for that quantisation level.
 Outputting the binary number one bit at a time (that is, in serial form).
 Taking the next sample and repeating the process.

An issue that is crucial to the performance of the PCM system is the encoder's clock
frequency. The clock tells the PCM encoder when to sample and, as the previous
experiment shows, this must be at least twice the message frequency to avoid
aliasing (or, if the message contains more than one sinewave, at least twice its
highest frequency).

Another important PCM performance issue relates to the difference between the
sample voltage and the quantisation levels that it is compared to. To explain, most
sampled voltages will not be the same as any of the quantisation levels. As
mentioned above, the PCM Encoder assigns to the sample the quantisation level
that is closest to it. However, in the process, the original sample's value is lost, and
the difference is known as quantisation error. Importantly, the error is reproduced
when the PCM data is decoded by the receiver because there is no way for the
receiver to know what the original sample voltage was. The size of the error is
affected by the _number of quantisation levels. The more quantisation levels there
are (for a given range of sample voltages) the closer they are together and the
smaller the difference between them and the samples.

A little information about the PCM Encoder module on the Emona


Telecoms-Trainer 101
The PCM Encoder module uses a PCM encoding and decoding chip (called a codec)
to convert analog voltages between -2V and +2V to an 8-bit binary number. With
eight bits, it's possible to produce 256 different numbers between 00000000 and
11111111 inclusive. This in turn means that there are 256 quantisation levels (one
for each number).

Each binary number is transmitted in serial form in frames. The number's most
significant bit (called bit-7) is sent first, bit-6 is sent next and so on to the least
significant bit (bit-0). The PCM Encoder module also outputs a separate Frame
Synchronisation signal (FS) that goes high while bit-O is outputted. The FS signal
has been included to help with PCM decoding (discussed in the preliminary
discussion of Experiment 13) but it can also be used to help "trigger" a scope when
looking at the signals that the PCM Encoder module generates.

Figure 1 below shows an example of three frames of a PCM Encoder module's


output data (each bit is shown as both a 0 and a 1 because it could be either)
together with its clock input and its FS output.

The experiment

In this experiment you'll use the PCM Encoder module on the Emona Telecoms-
Trainer 101 to convert the following to PCM: a fixed DC voltage, a variable DC
voltage and a continuously changing signal. In the process, you'll verify the
operation of PCM encoding and investigate quantisation error a little.

It should take you about 1 hour to complete this experiment.

Equipment

 Emona Telecoms-Trainer 101 (plus power-pack)


 Dual channel 20MHz oscilloscope
 three Emona Telecoms-Trainer 101 oscilloscope leads
 assorted Emona Telecoms-Trainer 101 patch leads

Procedure Part A - An introduction to PCM encoding using a static DC


voltage

1. Gather a set of the equipment listed above.


2. Set up the scope per the instructions in Experiment 1. Ensure that:
 the Trigger Source control is set to the CH1 (or INT) position.
 the Mode control is set to the CH1 position.
3. Locate the PCM Encoder module and set its Mode switch to the PCM position.
4. Connect the set-up shown in Figure 2 below.

Note: Insert the black plugs of the oscilloscope leads into a ground (GND) socket.

The set-up in Figure 2 can be represented by the block diagram in Figure 3 below.
The PCM Encoder module is clocked by the Master Signals module’s 8kHz DIGITAL
output. Its analog input is connected to 0V DC.
5. Adjust
the scope’s Time base control to view three pulses of the PCM Encoder
module’s FS output.
6. Set the scope’s Slope control to the “- “position.

Setting the Slope control to the “- “position makes the scope start its sweep across
the screen when the FS signal goes from high to low instead of low to high. You can
really notice the difference between the two settings if you flip the scope’s Slope
control back and forth. If you do this, make sure that the Slope control finishes on
the “- “position.

7. Adjust the scope's Horizontal


Position control so that the
start of the trace aligns with
the left-most vertical line on
the screen.
8. Set the scope's Time base
control to the 0.1ms/div
position.
9. Adjust the scope’s Variable
Sweep control until the FS
signal looks like the signal in
Figure 4.

Note: This control is called


different things on different
scopes. If you can't find it or if
you're not sure you have the right control, ask the instructor for assistance.
Adjusting this scope's control in this way will make it easier for you to draw the
waveforms that you'll be asked to shortly. However, you should be aware that the
screen's horizontal divisions are no-longer equal to the Time base control's setting.
In other words, the scope's Time base is no-longer calibrated. This is a problem
when measuring the period of signals and so you must return the control to its
locked position at the end of the experiment.

10.Set the scope's Mode control to the DUAL position to view the PCM Encoder
module's CLK input as well as its FS output.
11.Draw the two waveforms to scale in the space provided on page 12-8 leaving
enough room for a third digital signal.

Tip: Draw the clock signal in the upper third of the graph paper and the FS
signal in the middle third.

12.Connect the scope’s Channel 2 input to the PCM Encoder module’s output as
shown in Figure 5 below.

Remember: Dotted lines show leads already in place.

This set-up can be represented by the block diagram in Figure 6 below. Channel
2 should now display 10 bits of the PCM Encoder module’s data output. The first
8 bits belong to one frame and the last two bits belong to the next frame.
13.Draw this waveform to scale in the space that you left on the graph paper.
Tip: If you’re having trouble triggering the CRO set its Trigger Source
Coupling to the HF REJ position.
Question 1

Indicate on your drawing the start and end of the frame. Tip: If you’re not sure
where these points are, see the preliminary discussion.
Question 2

Indicate on you’re the start and end of each bit.

Question 3

Indicate on your drawing which bit is bit-0 and which is bit-7.

Question 4

What is the binary number that the PCM Encoder module is outputting?

Question 5

Why does the code change even though the input voltage is steady?

Question 6

Why does the PCM Encoder module output this code 0V and not 0000000?

Part B - PCM encoding of a variable DC voltage

So far, you have used the PCM Encoder module to convert a fixed DC voltage (OV)
to PCM. The next part of the experiment lets you see what happens when you vary
the DC voltage.

14.Set the scope's Mode control to the CH1 position.


15.Set the scope's Trigger Source control to the EXT position.
16.Set the scope's Trigger Source Coupling control to the HF REJ position.
17.Modify the set-up as shown in Figure 7 below.

Note: Notice that the third input on the scope is being used. This input is usually
labelled EXT or EXTERNAL, but its position varies from one scope to another. If you
can’t find it, ask the instructor for help.
This set-up can be represented by the block diagram in Figure 8 on the next page.
The variable DCV module is used to let you change the DC voltage on the PCM
Encoder module’s input. The scope’s external trigger input is used so that you can
view the DC voltage on its Channel 1 input as a stable display.

18.Set the scope's Channel 1 Vertical Attenuation control to the IV/div position.
19.Set the scope's Channel 1 Input Coupling control to the GND position.
20.Use the scope's Channel 1 Vertical Position control to align the Channel 1
trace with one of the horizontal lines on the scope's screen.

Note: This line on the scope’s screen is now your zero-volt reference which you
can use to see whether the Variable DCV module’s output is positive or negative.

21.Set the scope's Channel 1 and Channel 2 Input Coupling controls to the DC
position.
22.Set the scope's Mode control to the DUAL position.
23.Adjust the Variable DCV module’s Variable DC control until the PCM Encoder
module outputs the code that you drew earlier.
24.Use the scope to measure the Variable DCV module's output voltage.

Note: It should be very close to OV.

25.Turn the Variable DCV module’s DC control clockwise while watching the
scope’s display.

Question 7

What happens to the variable DCV module’s output?

Question 8
In what way does the binary number that the PCM Encoder module outputs change?

26.Continue to turn the Variable DCV module’s Variable DC control clockwise and
stop the moment the PCM Encoder module’s output is 11111111.

Note: You may not be able to obtain 11111111 on the PCM Encoder module's
output. If this is the case, for the moment, settle for an input that generates the
highest binary number possible.

27.Use the scope to measure the PCM Encoder module's input voltage. Record
your measurement in Table 1 on the next page.

Question 9

It's possible that you were unable to obtain 11111111 on the PCM Encoder
module's output at Step 26. Explain why. Tip: Use the User Manual to compare the
operating specifications of the Variable DCV and PCM Encoder modules.

Question 10

Devise a method of obtaining a variable DC voltage that can reach (or exceed) the
upper and lower limits of the PCM Encoder module’s input range. Describe your
solution below.

28.Implement your solution to Question 10 and repeat Steps 26 and 27.

Note: Make this change even if you were able to obtain 11111111 on the PCM
Encoder module’s output. This will ensure that you’ll be able to successfully
complete Step 31.

Table 1

PCM Encoder’s output PCM Encoder’s input


code voltage
11111111
00000000

29.Make the necessary adjustments to the set-up so that the PCM Encoder
module’s input voltage is a small negative value (say -0.2V).
30.Increase the size of the negative voltage on the PCM Encoder module’s input
and note the effect on the binary number on its output.

Question 11

What happens to the binary number on the PCM Encoder module’s output as the
size of the negative input voltage increases?
31.Continue to increase the PCM Encoder module’s input voltage and stop the
moment its output is 00000000.
32.Measure the Variable DCV module’s output voltage and record the value in
Table 1 on the previous page.

Question 12

Based on the information in Table 1, what is the maximum allowable amplitude


(peak-to-peak) for an AC signal on the PCM Encoder module’s INPUT?

Part C - Quantisation

This next part of the experiment lets you investigate quantisation.

33.Remove the Buffer (or Adder) module to return the set-up that shown in
Figure 7 and set the Variable DCV module's Variable DC control to about the
middle of its travel.
34.See if you can vary the Variable DC control left and right without causing the
output code to change.

The sampled voltage can be changed without causing the output code to change
because it is compared to a set of quantisation levels but there are a finite number
of them. This means that, in practice, there's a range of sample voltages for each
quantisation level.

Question 13

What's the name for the difference between a sampled voltage and its closest
quantisation level? Tip: If you're not sure, see the preliminary discussion.

It's possible to calculate how far apart a PCM encoder's quantisation levels are using
the information you've gathered so far. To do so, answer the following question.

Question 14

Calculate the difference between the quantisation levels in the PCM Encoder module
by subtracting the values in Table 1 and dividing the number by 256 (the number of
codes).

Question 15

To reduce quantisation error, it's better to have

o fewer quantisation levels between $2.5V.


o more quantisation levels between +2.5V.
Part D – PCM encoding of continuously changing voltages

Now let's see what happens when the PCM encoder is used to convert continuously
changing signals like a sinewave.

35.Return the scope's Trigger Source control to the CHI (or INT) position.
36.Return the scope's Trigger Source Coupling control to the AC position.
37.Set the scope's Channel 1 and Channel 2 Vertical Attenuation controls to the
2V/div position.
38.Locate the VCO module and set its Range control to the HI position.
39.Turn the VCO module's Frequency Adjust control fully anticlockwise.

Note: The VCO module will be used to provide the PCM Encoder module with a
50KHz (approx) clock.

40.Disassemble the current set-up.


41.Connect the set-up as shown in Figure 9 below.

42.
Set the scope’s Timebase control to the 50µ/div position.
43.Watch the PCM Encoder module’s PCM DATA output on the scope’s display.

Question 16

Why does the PCM DATA change continuously?

44.Return the scope’s Variable Sweep control to the detent (locked) position.
QUESTIONS AND ANSWERS

DATA AND RESULTS:

PART A- FIGURE 2
PART A- FIGURE 5

PART B- FIGURE 7
PART B- FIGURE 7 NO. 23

PART D- FIGURE 9
OBSERVATION

CONCLUSION

You might also like