Your SlideShare is downloading. ×
Objective5
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Objective5

531
views

Published on

Published in: Business, Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
531
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. NATIONAL COLLEGE OF SCIENCE & TECHNOLOGY Amafel Bldg. Aguinaldo Highway Dasmariñas City, Cavite EXPERIMENT 2 DIGITAL COMMUNICATION OF ANALOG DATA USING PULSE-CODE MODULATION (PCM)Tagasa, Jerald A. September 20, 2011Signal Spectra and Signal Processing/BSECE 41A1 Score: Engr. Grace Ramones Instructor
  • 2. Objectives: Demonstrate PCM encoding using an analog-to-digital converter (ADC). Demonstrate PCM encoding using an digital-to-analog converter (DAC) Demonstrate how the ADC sampling rate is related to the analog signal frequency. Demonstrate the effect of low-pass filtering on the decoder (DAC) output.
  • 3. Sample Computation Step2 Step 6 Step 9 Step 12 Step 14 Step 16 Step 18
  • 4. Data Sheet:MaterialsOne ac signal generatorOne pulse generatorOne dual-trace oscilloscopeOne dc power supplyOne ADC0801 A/D converter (ADC)One DAC0808 (1401) D/A converter (DAC)Two SPDT switchesOne 100 nF capacitorResistors: 100 Ω, 10 kΩTheoryElectronic communications is the transmission and reception ofinformation over a communications channel using electroniccircuits. Information is defined as knowledge or intelligencesuch as audio voice or music, video, or digital data. Often theinformation id unsuitable for transmission in its original formand must be converted to a form that is suitable for thecommunications system. When the communications system isdigital, analog signals must be converted into digital formprior to transmission.The most widely used technique for digitizing is the analoginformation signals for transmission on a digital communicationssystem is pulse-code modulation (PCM), which we will be studiedin this experiment. Pulse-code modulation (PCM) consists of theconversion of a series of sampled analog voltage levels into asequence of binary codes, with each binary number that isproportional to the magnitude of the voltage level sampled.Translating analog voltages into binary codes is called A/Dconversion, digitizing, or encoding. The device used to performthis conversion process called an A/D converter, or ADC.An ADC requires a conversion time, in which is the time requiredto convert each analog voltage into its binary code. During theADC conversion time, the analog input voltage must remainconstant. The conversion time for most modern A/D converters isshort enough so that the analog input voltage will not changeduring the conversion time. For high-frequency informationsignals, the analog voltage will change during the conversiontime, introducing an error called an aperture error. In this
  • 5. case a sample and hold amplifier (S/H amplifier) will berequired at the input of the ADC. The S/H amplifier accepts theinput and passes it through to the ADC input unchanged duringthe sample mode. During the hold mode, the sampled analogvoltage is stored at the instant of sampling, making the outputof the S/H amplifier a fixed dc voltage level. Therefore, theADC input will be a fixed dc voltage during the ADC conversiontime.The rate at which the analog input voltage is sampled is calledthe sampling rate. The ADC conversion time puts a limit on thesampling rate because the next sample cannot be read until theprevious conversion time is complete. The sampling rate isimportant because it determines the highest analog signalfrequency that can be sampled. In order to retain the high-frequency information in the analog signal acting sampled, asufficient number of samples must be taken so that all of thevoltage changes in the waveform are adequately represented.Because a modern ADC has a very short conversion time, a highsampling rate is possible resulting in better reproduction ofhigh0frequency analog signals. Nyquist frequency is equal totwice the highest analog signal frequency component. Althoughtheoretically analog signal can be sampled at the Nyquistfrequency, in practice the sampling rate is usually higher,depending on the application and other factors such as channelbandwidth and cost limitations.In a PCM system, the binary codes generated by the ADC areconverted into serial pulses and transmitted over thecommunications medium, or channel, to the PCM receiver one bitat a time. At the receiver, the serial pulses are converted backto the original sequence of parallel binary codes. This sequenceof binary codes is reconverted into a series of analog voltagelevels in a D/A converter (DAC), often called a decoder. In aproperly designed system, these analog voltage levels should beclose to the analog voltage levels sampled at the transmitter.Because the sequence of binary codes applied to the DAC inputrepresent a series of dc voltage levels, the output of the DAChas a staircase (step) characteristic. Therefore, the resultingDAC output voltage waveshape is only an approximation to theoriginal analog voltage waveshape at the transmitter. Thesesteps can be smoothed out into an analog voltage variation by
  • 6. passing the DAC output through a low-pass filter with a cutofffrequency that is higher than the highest-frequency component inthe analog information signal. The low-pass filter changes thesteps into a smooth curve by eliminating many of the harmonicfrequency. If the sampling rate at the transmitter is highenough, the low-pass filter output should be a goodrepresentation of the original analog signal.In this experiment, pulse code modulation (encoding) anddemodulation (decoding) will be demonstrated using an 8-bit ADCfeeding an 8-bit DAC, as shown in Figure 2-1. This ADC willconvert each of the sampled analog voltages into 8-bit binarycode as that represent binary numbers proportional to themagnitude of the sampled analog voltages. The sampling frequencygenerator, connected to the start-of conversion (SOC) terminalon the ADC, will start conversion at the beginning of eachsampling pulse. Therefore, the frequency of the samplingfrequency generator will determine the sampling frequency(sampling rate) of the ADC. The 5 volts connected to the VREF+terminal of the ADC sets the voltage range to 0-5 V. The 5 voltsconnected to the output (OE) terminal on the ADC will keep thedigital output connected to the digital bus. The DAC willconvert these digital codes back to the sampled analog voltagelevels. This will result in a staircase output, which willfollow the original analog voltage variations. The staircaseoutput of the DAC feeds of a low-pass filter, which will producea smooth output curve that should be a close approximation tothe original analog input curve. The 5 volts connected to the +terminal of the DAC sets the voltage range 0-5 V. The values ofresistor R and capacitor C determine the cutoff frequency (fC)of the low-pass filter, which is determined from the equationFigure 23–1 Pulse-Code Modulation (PCM)
  • 7. XSC2 G T A B C D S1 VCC Key = A 5V U1 Vin D0 S2 D1 V2 D2 D3 Key = B 2 Vpk D4 10kHz D5 0° Vref+ D6 Vref- D7 SOC VCC OE EOC 5V D0 D1 D2 D3 D4 D5 D6 D7 ADC V1 Vref+ R1 VDAC8 Output 5V -0V Vref- 100Ω 200kHz U2 R2 10kΩ C1 100nFIn an actual PCM system, the ADC output would be transmitted toserial format over a transmission line to the receiver andconverted back to parallel format before being applied to theDAC input. In Figure 23-1, the ADC output is connected to theDAC input by the digital bus for demonstration purposes only.PROCEDURE:Step 1 Open circuit file FIG 23-1. Bring down the oscilloscope enlargement. Make sure that the following settings are selected. Time base (Scale = 20 µs/Div, Xpos = 0 Y/T), Ch A(Scale 2 V/Div, Ypos = 0, DC) Ch B (Scale = 2 V/Div, Ypos = 0, DC), Trigger (Pos edge, Level = 0, Auto). Run the simulation to completion. (Wait for the simulation to begin). You have plotted the analog input signal (red) and the DAC output (blue) on the oscilloscope. Measure the time between samples (TS) on the DAC output curve plot. TS = 4 µsStep 2 Calculate the sampling frequency (fS) based on the time between samples (TS) fS = 250 kHzQuestion: How did the measure sampling frequency compare withthe frequency of the sampling frequency generator? Both frequency have difference of 50 kHz.
  • 8. How did the sampling frequency compare with the analog inputfrequency? Was it more than twice the analog input frequency? The sampling frequency is 20 times higher. It is more than twice the analog input frequency.How did the sampling frequency compare with the Nyquistfrequency? The Nyquist frequency is higher. Nyquist is 6.28 times more than the sampling frequency.Step 3 Click the arrow in the circuit window and press the A key to change Switch A to the sampling generator output. Change the oscilloscope time base to 10 µs/Div. Run the simulation for one oscilloscope screen display, and then pause the simulation. You are plotting the sampling generator (red) and the DAC output (blue).Question: What is the relationship between the samplinggenerator output and the DAC staircase output? Both outputs are both in digitalStep 4 Change the oscilloscope time base scale to 20 µs/Div. Click the arrow in the circuit window and press the A key to change Switch A to the analog input. Press the B key to change the Switch B to Filter Output. Bring down the oscilloscope enlargement and run the simulation to completion. You are plotting the analog input (red) and the low-pass filter output (blue) on the oscilloscopeQuestions: What happened to the DAC output after filtering? Isthe filter output waveshape a close representation of the analoginput waveshape? The output became analog after filtering. Yes it isclose representation.Step 5 Calculate the cutoff frequency (fC) of the low-passfilter. fC = 15.915 kHzQuestion: How does the filter cutoff frequency compare with theanalog input frequency? They have difference of approximately 6 kHz.Step 6 Change the filter capacitor (C) to 20 nF and calculatethe new cutoff frequency (fC). fC = 79.577 kHzStep 7 Bring down the oscilloscope enlargement and run thesimulation to completion again.Question: How did the new filter output compare with theprevious filter output? Explain.
  • 9. It is almost the same.Step 8 Change the filter capacitor (C) back to 100 nF. Change the Switch B back to the DAC output. Change the frequency of the sampling frequency generator to 100 kHz. Bring down the oscilloscope enlargement and run the simulation to completion. You are plotting the analog input (red) and the DAC output (blue) on the oscilloscope screen. Measure the time between the samples (TS) on the DAC output curve plot (blue) TS = 9.5µsQuestion: How does the time between the samples in Step 8 compare with the time between the samples in Step 1? The time between the samples in Step 8 doubles.Step 9 Calculate the new sampling frequency (fS) based on the time between the samples (TS) in Step 8? fS=105.26HzQuestion: How does the new sampling frequency compare with the analog input frequency? It is 10 times the analog input frequency.Step 10 Click the arrow in the circuit window and change the Switch B to the filter output. Bring down the oscilloscope enlargement and run the simulation again.Question: How does the curve plot in Step 10 compare with the curve plot in Step 4 at the higher sampling frequency? Is the curve as smooth as in Step 4? Explain why. Yes, they are the same. It is as smooth as in Step 4. Nothing changed. It does not affect the filter.Step 11 Change the frequency of the sampling frequency generator to 50 kHz and change Switch B back to the DAC output. Bring down the oscilloscope enlargement and run the simulation to completion. Measure the time between samples (TS) on the DAC output curve plot (blue). TS = 19µsQuestion: How does the time between samples in Step 11 compare with the time between the samples in Step 8? It doubles.Step 12 Calculate the new sampling frequency (fS) based on the time between samples (TS) in Step 11. fS=52.631 kHzQuestion: How does the new sampling frequency compare with the analog input frequency? The new sampling frequency is 5 times the analog input.
  • 10. Step 13 Click the arrow in the circuit window and change the Switch B to the filter output. Bring down the oscilloscope enlargement and run the simulation to completion again.Question: How does the curve plot in Step 13 compare with the curve plot in Step 10 at the higher sampling frequency? Is the curve as smooth as in Step 10? Explain why. Yes, nothing changed. The frequency of the sampling generator does not affect the filter.Step 14 Calculate the frequency of the filter output (f) based on the period for one cycle (T). T=10kHzQuestion: How does the frequency of the filter output compare with the frequency of the analog input? Was this expected based on the sampling frequency? Explain why. It is the same. Yes, it is expected.Step 15 Change the frequency of the sampling frequency generator to 15 kHz and change Switch B back to the DAC output. Bring down the oscilloscope enlargement and run the simulation to completion. Measure the time between samples (TS) on the DAC output curve plot (blue) TS = 66.5µsQuestion: How does the time between samples in Step 15 compare with the time between samples in Step 11? It is 3.5 times higher than the time in Step 11.Step 16 Calculate the new sampling frequency (fS) based on the time between samples (TS) in Step 15. fS=15.037 kHzQuestion: How does the new sampling frequency compare with the analog input frequency? It is 5 kHz greater than the analog input frequency.How does the new sampling frequency compare with the Nyquist frequency? It is 6.28 times smaller than the Nyquist frequency.Step 17 Click the arrow in the circuit window and change the Switch B to the filter output. Bring down the oscilloscope enlargement and run the simulation to completion again.Question: How does the curve plot in Step 17 compare with the curve plot in Step 13 at the higher sampling frequency? They are the same.
  • 11. Step 18 Calculate the frequency of the filter output (f) based on the time period for one cycle (T). f=10kHzQuestion: How does the frequency of the filter output compare with the frequency of the analog input? Was this expected based on the sampling frequency? They are the same. For sampling frequency of 15.037 kHz, it is expected to have same outputs.
  • 12. CONCLUSION: I conclude, that analog signal can be digitize for digitalcommunication. One way is the PCM. ADC and DAC are used forencoding and decoding of PCM. The ADC provides the sampling frequency. The samplingfrequency is inversely proportional to the sampling time of theDAC output. The staircase output is the output generated by theDAC. It is digital signal like the sampling pulse. The filter frequency is the frequency of the analog inputfrequency. The cutoff frequency is inversely proportional to thecapacitance and remain constant as the sampling frequency changes.