Experiment-3_PCM_Decoding
Experiment-3_PCM_Decoding
Experiment-3_PCM_Decoding
Preliminary Discussion
Recovering the message from the serial stream of binary numbers is called decoding.
At its simplest, decoding involves:
Identifying each new frame in the data stream.
Extracting the binary numbers from each frame.
Generating a voltage that is proportional to the binary number.
Holding the voltage on the output until the next frame has been decoded (forming a
pulse amplitude modulation (PAM) version of the original message signal).
Reconstructing the message by passing the PAM signal through a low-pass filter.
The PCM decoder’s clock frequency is crucial to the correct operation of simple
decoding systems. If it’s not the same frequency as the encoder’s clock, some of the
transmitted bits are read twice while others are completely missed. This results in some of the
transmitted numbers being incorrectly interpreted, which in turn causes the PCM decoder to
output an incorrect voltage. The error is audible if it occurs often enough. Some decoders
manage this issue by being able to “self-clock”. There is another issue crucial to PCM decoding.
The decoder must be able to detect the beginning of each frame. If this isn’t done correctly,
every number is incorrectly interpreted. The synchronising of the frames can be managed in
one of two ways. The PCM encoder can generate a special frame synchronisation signal that
can be used by the decoder though this has the disadvantage of needing an additional signal to
be sent. Alternatively, a frame synchronisation code can be embedded in the serial data stream
that is used by the decoder to work out when the frame starts.
A little information about the TIMS PCM Decoder module Like the PCM Encoder module
on the Emona Telecoms-Trainer 101, the PCM Decoder module works with 8-bit binary
numbers. For 00000000 the PCM Decoder module outputs -2V and for 11111111 it outputs
+2V. For numbers in between, the output is a proportional voltage between ±2V. For example,
the number 10000000 is half way between 00000000 and 11111111 and so for this input the
module outputs 0V (which is half way between +2V and -2V). The PCM Decoder module is not
self-clocking and so it needs a digital signal on the CLK input to operate. Importantly, for the
PCM Decoder module to correctly decode PCM data generated by the PCM Encoder module, it
must have the same clock signal. In other words, the decoder’s clock must be “stolen” from the
encoder. Similarly, the PCM Decoder module cannot self-detect the beginning of each new
frame and so it must have a frame synchronisation signal on its FS input to do this.
The Experiment
In this experiment you’ll use the Emona Telecoms-Trainer 101 to convert a sinewave
and speech to a PCM data stream then convert it to a PAM signal using the PCM Decoder
module. For this to work correctly, the decoder’s clock and frame synchronisation signal are
simply “stolen” the PCM Encoder module. You’ll then recover the message using the Tuneable
Low-pass filter module. It should take you about 45 minutes to complete this experiment.
Procedure
Part A – Setting up the PCM encoder
To experiment with PCM decoding you need PCM data. The first part of the experiment
gets you to set up a PCM encoder.
1. Gather a set of the equipment listed on the previous page.
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 1 below.
This set-up can be represented by the block diagram in Figure 2 below. The PCM
Encoder module is clocked by the Master Signals module’s 100kHz DIGITAL output. Its analog
input is the Variable DC module’s VDC output.
Question 1 What do you observe about the PCM Data when the input is a continuously varying
(sinewave)?
_____________________________________________________________________________
17. Adjust the scope’s Timebase control to view two or so cycles of the message.
18. Set the scope’s Mode control to the DUAL position to view the PCM Decoder
module’s output as well as the message signal.
Question 2 What does the PCM Decoder’s “stepped” output tell you about the type of signal
that it is? Tip: If you’re not sure, see the preliminary discussion for this experiment or for
Experiment 1.
The PCM Decoder module’s output signal looks very similar to the message. However,
they’re not the same. Remember that a sampled message contains many sinewaves in addition
to the message. This can be better appreciated if you compare the message and the PCM
Decoder module’s output by listening to them.
19. Add the Buffer module to the set-up as shown in Figure 7 below leaving the scope’s
connections as they are. Figure 7 Turn the Buffer module’s Gain control fully anti-clockwise.
21. Without wearing the headphones, plug them into the Buffer module’s headphone socket.
22. Put the headphones on.
23. Turn the Buffer module’s Gain control clockwise until you can comfortably hear the PCM
Decoder module’s output.
24. Disconnect the Buffer module’s lead where it plugs to the PCM Decoder module’s output.
25. Modify the set-up as shown in Figure 8 below, again leaving the scope’s connections as they
are. Figure 8
26. Compare the sound of the two signals. You should notice that they’re similar but clearly
different.
Question 2 What must be done to the PCM Decoder module’s output to reconstruct the
message properly?
______________________________________________________________________________
______________________________________________________________________________
The entire set-up can be represented by the block diagram in Figure 11 below.
The Tuneable Lowpass Filter module is used to reconstruct the original message from
the PCM Decoder module’s PAM output.
35. Slowly turn the Tuneable Low-pass Filter module’s Cut-off Frequency control
clockwise and stop the moment the message signal has been reconstructed (ignoring phase
shift).
Question 3. What do you observe about the two signals
______________________________________________________________________________
_____________________________________________________________________________
36. Add the Buffer module to the set-up as shown in Figure 12 below leaving the scope’s
connections as they are. Figure 12
37. Turn the Buffer module’s Gain control fully anti-clockwise.
38. Put the headphones on.
39. Turn the Buffer module’s Gain control clockwise until you can comfortably hear the
Tuneable Low-pass Filter module’s output.
40. Disconnect the Buffer module’s lead where it plugs to the PCM Decoder module’s output
and connect it to the VCO module’s output (like you did when wiring Figure 8).
41. Compare the sound of the two signals. You should find that they’re very similar.
Question 4. Even though the two signals look and sound the same, why isn’t the reconstructed
message a perfect copy of the original message?
______________________________________________________________________________
______________________________________________________________________________