Student Workbook

Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.1
Student Workbook
DigiPoints Volume 1
Student Workbook
Module 3 – Analog-to-Digital Conversion
Summary
The purpose of this module is to describe the analog-to-digital conversion process. The
student will learn how a continuously varying analog signal is encoded into a binary
digital signal and then recovered. Covered in this section will be the Nyquist Frequency,
the concepts of sampling, quantizing, and encoding, as well as the distortion that results,
the PAM and PCM signals created, and the importance of the synchronization in a digital
network. The student will also learn the concept of parallel versus serial transmission
techniques and where those are commonly found. Synchronous and asynchronous
transmission techniques will be covered as well as their basic variations. Finally, the
concept of simplex, half duplex, and full duplex will be covered.
Module Objectives
Upon successful completion of this module, the student should be able to:
•
•
•
•
•
•
Describe the Nyquist Frequency and explain its importance.
Find the Nyquist Frequenc y for a given analog signal.
Explain what a CODEC does.
Explain how an analog signal is converted into a digital signal. This explanation must
include each of the following items:
– Nyquist Frequency
– Sampling
– PAM Signal
– Quantizing and Distortion
– Encoding
– µ-Law Standard Scale
– PCM Signal
– Decoding
– Clock
Describe the peculiarities of the µ-Law standard scale.
Describe the importance of coding and know the basic differences between:
– Morse Code
– Baudot Code
– BCDIC (Binary Coded Decimal Interchange Code)
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
•
•
•
Page 3.2
Student Workbook
– EBCDIC (Extended Binary Coded Decimal Interchange Code)
– ASCII
Describe difference between parallel and serial transmission techniques.
Compare asynchronous transmission with synchronous transmission and explain the
key characteristics of each.
Explain how simplex, half duplex, and full duplex differ.
Prerequisites
Read DigiPoints, Volume 1, Chapter 3.
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.3
Student Workbook
SINE WAVES
What are the differences between these sine waves?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.4
Student Workbook
Amplitude
Analog to Digital Conversion Steps
What are the three steps in converting an analog signal to a digital signal?
What is a Codec?
What is the Nyquist Frequency?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.5
Student Workbook
Nyquist Frequency
Sample Rate = 2 x Maximum Frequency = Nyquist Frequency
Voice : Maximum Frequency: 4,000 Hz
Nyquist Frequency: 8,000 samples/sec
Sampling Interval: 1/8000 or .000125 sec or 125 µsec
Video: Maximum Frequency: 4 MHz (4,000,000 Hz)
If the highest frequency for a video signal is 4 MHz,
What is the Nyquist Frequency?
What is the sampling interval?
What type of device is implied here?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.6
Student Workbook
Amplitude
Sampling
Sample Interval:
125 µsec
or _______
How often is a sample being taken, in seconds?
How “long” is the sample period?
What are these sample signals called?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.7
Student Workbook
Quantizing the Sample
Amplitude
PAM Signals
Time
Amplitude
Time
P
A
M
-2.5
-3.0
What is a PAM signal?
What is Quantizing Error?
Why does it happen?
How does that impact the information being sampled?
Why?
SCTE
Quantizing Error
or
Distortion
- 2.72
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.8
Student Workbook
Example of an Encoding Table
Millivolts
Discrete
Points
0
-0.5
-1
-1.5
-2
-2.5
-3
-3.5
-4
Binary
Number
for the
Intervals
Discrete
Intervals
1
2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8
111
110
101
100
011
010
001
000
A) Converting a signal whose amplitude varies between - 4.00 mV and 0.00 mV, to a
discrete binary number.
B) Assign Discrete Binary Numbers to represent a voltage in an interval.
C) For the interval -4.00 to -3.50 mV, the binary number is 000.
D) For the interval -1.50 to -1.00 mV, the binary number is 101.
E) For 0.50 to 0.00 mV, the binary number is 111.
F) For our value of -2.72 mV, we read the interval from -3.00 to -2.50 mV as 010.
What type of error has been introduced?
What is the encoded value of a PAM signal of -2.1 mV?
What is the PAM value of a signal encoded as 111?
What is the encoded signal of -2.92 mV?
What is the encoded signal of -2.51 mV?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.9
Student Workbook
Encoding the PAM Signal
010
PCM
Quantizing Error
or
Distortion
Amplitude
Time
Encoder
P
A
M
P
A
M
0 1 0
bit bit bit
-2.50
- 2.72
-3.00
0
-0.50
-1.00
-1.50
-2.00
-2.50
-3.00
-3.50
-4.00
111
110
101
100
011
010
001
000
What are the three steps required to convert an analog signal to a digital signal?
How fast do we have to sample an analog signal in order to ensure that we get all the
information of that signal?
What is the sampling rate called?
What is the sampled signal known as?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.10
Student Workbook
What types of errors are introduced in our process?
Why?
Why are they not considered a problem?
What is the outputted encoded signal called?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.11
Student Workbook
Powers of 2
Digit
Position
1
2
3
4
5
6
7
8
Powers
of 2
27
26
25
24
23
22
21
20
VALUE
128
64
32
16
8
4
2
1
What is the decimal value of 1111 1111?
Which is the most significant bit on this table?
Which is the least significant bit?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.12
Student Workbook
µ-Law Encoding
North American Standard
V
Interval
7
16 Mini-Intervals
V/2
Interval
6
V/4
Interval
5
V/8
Interval 4
V/16
Interval 2
V/32
0
Interval 3
V/64
Why do the maxi intervals change in size by a factor of 2?
How do you convert a PCM signal back to an analog signal?
How many bits in the “word” that is being used to transmit voice grade analog signals?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.13
Student Workbook
What will it create with these 8 bits?
How will this wave differ from the original?
How does this encoding scheme handle low amplitudes?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.14
Student Workbook
Other Coding Techniques
ADPCM - Adaptive Differential Pulse Code Modulation Predicts the shape of voice signals by
transmitting the difference between the measured amplitude of the actual pulse and the expected amplitude
of the next pulse. Although ADPCM works well for voice and toll grade transmission, this method
effectively cuts the data rate that can be sent via a telephony modem by one-half. This is because ADPCM
sends only 4 bits of information rather than 8 for each sample.
DSI - Digital Speech Interpolation. Recognizes periods of silence on digital circuits, and does not transmit
anything during those periods. This technique does not work well for data transmission, where there is
continuous information on the line.
VQL - Variable Quantum Level Coding. Similar to PCM, except that the amplitude of the sample is
recorded as a relative value, rather than the actual value. This method is used mostly for data transmission.
LPC - Linear Predictive Coding. A technique that uses compression. It involves creating a model of a
voice tract. Typically, LPC is used to find intelligible sound, not necessarily recognizable voice. It has
been used in another conversion technique, called vocoding, which is the oldest analog to digital
conversion method.
Delta Modulation - A technique that transmits the difference between two successive samples as a 1 or 0.
For samples that are higher amplitude than the previous sample, a 1 is transmitted. For lower samples, a 0
is transmitted.
SBC - Sub-Band Coding. SBC splits voice into two or more frequency bands and treats each band
separately. This technique is usually combined with another, such as ADPCM.
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.15
Student Workbook
Morse Code
How do you transmit an “E” in Morse Code?
What is the second most used letter?
What type of receiver was used to decode these transmissions?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.16
Student Workbook
Baudot Code
How many different characters can be represented with 5 bits, that is, 25 ?
How can the Baudot code be used to send 52 different characters when only 5 bits are
available?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.17
Student Workbook
Binary Coded Decimal Interchange Code
BCDIC
How many bits are used in the BCDIC coding scheme?
How many characters can be represented?
For what type of equipment was the BCDIC code developed?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.18
Student Workbook
Extended Binary Coded Decimal Interchange Code
EBCDIC
Why is this code more efficient then Baudot, BCD, or EBCD?
What do we not have with EBCDIC?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.19
Student Workbook
What is a “checksum”?
How would the errors be corrected?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.20
Student Workbook
American Standard Code for Information Interchange
ASCII
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.21
Student Workbook
If different programmers can define certain characters differently, what does that mean
with respect to interoperability of equipment?
What is the ASCII code for “P”?
What is the ASCII code for “p”?
What is the advantage to the way the letters and numbers are represented by these binary
digits?
If the 8th bit is used as a data bit, that gives an additional 128 possible characters. Where
or who defines these? What is the significance of that?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.22
Student Workbook
ASCII Control Character Set
NUL (NULL)
The all zeros character, used for time or media fill.
SYN (Synchronous id le)
Used for character synchronization in synchronous
transmissions.
DEL (Delete)
Used to ease in paper tape punching.
SOH (Start of Header)
Use at the beginning of routing information.
STX (Start of Text)
Used at the end of the header or start of text.
ETX (End of Text)
Used at end of text or start of trailer.
EOT (End of Transmission)
Used at end of transmission, i.e., end of call.
SO (Shift Out)
Code characters that follow are not in the code set
of the standard code in use.
(Predefined as to which code you shift to.)
Typically used to define graphic character
extensions.
SI (Shift In)
Code characters that follow are in the code set of
the standard code in use. (94 characters in ASCII.
DLE (Data Link Escape)
Used to change the meaning of a limited number of
contiguously following characters. Use of DLE for
additional controls is described in ANSI
specification X3.28
ETB (End Of Transmission Block)
Used to indicate end of a block of data.
CAN (Cancel)
Disregard the data sent with.
EM (End of Medium)
End of wanted information recorded on a medium.
SS (Start of Special Sequence)
As named.
ESC (Escape)
Provided for an alternate set of control characters or
a different code set. This is described in ANSI
specification X3.64.
FS, GS, RS, US
(File, Group, Record, Unit Separators).
ENQ (Enquire)
Used as a request for response; “who are you”
ACK (Acknowledge)
Used as a request for response to a sender.
BEL (Bell) DC1, DC2, DC3, DC4
(Device Controls) Characters for the control of
auxiliary devices; i.e., start, pause, stop. DC1=Xon
and DC#=Xoff.
Nak (Negative Acknowledgement)
Used as a negative response to a sender.
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.23
Student Workbook
Parallel Transmission
Transmitter
Receiver
Digit 1
Digit 2
Digit 3
Digit 4
Digit 5
Digit 6
Digit 7
Digit 8
Where could you find parallel or serial ports?
What is the difference between parallel and serial transmission?
Which is faster? Why?
Which is more distance sensitive? Why?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.24
Student Workbook
Asynchronous Transmission
Start Bit
8 Bit Word
Stop Bit
10 bits total: 8 bit word plus 2 bits for start and stop
Overhead = 2/10 = 20%
What is meant by the term Asynchronous Transmission?
What are the advantages of asynchronous transmission?
What are the disadvantages?
Consider a PC-to-PC connection. If the modem being used transmits at 28.8 kbps, and the
word being transmitted is 11 bits (2 start, 8 information, and 1 stop bit), what is the
estimated throughput of information?
Give an example of overhead in the NON-cyber world?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.25
Student Workbook
Synchronous Transmission
Bit Oriented
Bit Stream within a Frame
(May be a Mix of Words, Graphics,
and Individual Bits)
Control
Character
Control
Character
Byte Oriented
Control
Character
Multiple Words Within a Frame
Percent Overhead is Variable, based on the Frame Length
What makes up a Frame?
Why synchronous transmission?
What is the overhead rate for this frame?
1000 bits (125 bytes) of information, with 48 bits of overhead.
Explain the difference between bit-oriented and byte-oriented frames.
SCTE
Control
Character
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.26
Student Workbook
Explain the difference between fixed and variable length frames. What makes this
possible?
Name a method of error control?
How can the receiver and transmitter be synchronized if there is no central clocking
device employed?
Where are priority characters and sequence numbers found in the frame?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.27
Student Workbook
Directions of Transmission
Simplex: Transmission in One Direction Only
Half Duplex: Transmission in Both Directions, but
Only One Direction at a Time
Full Duplex: Transmission in Both Directions Simultaneously
What are the three Modes of Transmission?
Which one requires 2 pair of wires?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.28
Student Workbook
Study Questions
1. What are the three steps in changing an analog signal to digital form?
2. What is the function of a clock in digital circuits, and what are the two sources for the
clock?
3. What is the quantizing error, and where does it come from?
4. What was the basis for assigning a letter to a symbol in Morse code?
5. What makes Baudot code a sequential code?
6. What mechanism for error correction is contained in the BCDIC code, and how does
it work?
SCTE
Analog to Digital Conversion
DigiPoints, Volume 1
Page 3.29
Student Workbook
7. What are the two most widely used code sets today?
8. What is the difference between serial and parallel transmission?
9. What is the difference between synchronous and asynchronous transmission?
SCTE