









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










NAME (please print)
STUDENT (SID) NUMBER
College of Engineering Electrical Engineering and Computer Sciences Berkeley
1 ____________ (100 max) 8 _____________ (100 max) 21 ____________ (100 max)
2 ____________ (100 max) 9 _____________ (100 max) 22 ____________ (100 max)
3 ____________ (100 max) 10 ____________ (100 max) 23 ____________ (100 max)
_______________ (600 max)
_______________ (100 max)
_______________ (100 max)
_______________ (200 max)
_______________ (1000 max)
Answer the questions on the following pages completely, but as concisely as possible. The exam is to be taken closed book. Use the reverse side of the exam sheets if you need more space. Calculators are OK but not needed. In answering the problems, you are not limited by the particular equipment you used in the laboratory exercises. Many formulae from the course have been provided for you on the last page.
Partial credit can only be given if you show your work.
FINAL EXAM GRADE :
1 __________ (36 max) 3 __________ (44 max) 5 _________ (30 max)
2 __________ (35 max) 4 __________ (55 max) TOTAL __________ (200 max)
Problem 1 (total 36 points):
Define the following terms (30 words or less)
a. (6 points) R-2R Ladder (of a D/A converter)
b. (6 points) Average Step Size (of an A/D converter)
c. (6 points) Relative Accuracy (of an A/D converter)
Problem 2 (35 points)
Describe how you would measure the frequency of the 60 Hz, 120 V power line to an accuracy of 0.001 Hz over a measurement period of 1 second. Assume that the frequency is in the 59 to 61 Hz range and that you have the following components:
Do the following:
a. (12 points) Draw a block diagram of your measurement system, showing and labeling all essential components and signal lines.
b. (12 points) Describe the operation of your system (hardware and software) in a flow chart or pseudo-code.
c. (11 points) Draw a timing diagram for the important signals.
b. (12 points) Describe the operation of your system in flowchart or pseudo code.
c. (12 points) Show a timing diagram for one complete sampling cycle.
Problem 4 (total 55 points):
In concert halls and outdoor arenas, the sound that the audience hears is not necessarily the sound produced by the performers. The reason is that the limited response of the loudspeakers, absorption by surrounding surfaces, reso- nances within enclosing volumes, and feedback effects can greatly alter the frequency spectrum. One spectacular feedback effect is the loud whine that occurs at particular frequency when the gain loop (from the recording microphone to the amplifier to the speakers and back through the air to the recording microphone) is greater than 1. At high volumes, it would be desirable to attenuate the signal at such resonant frequencies.
Stage
Audience
Recording microphone
Sensing microphone
Loud speakers
Design a system for frequency filtering in a sound system so that the sound that reaches a sensing microphone in the audience has the same frequency content as the sound that reaches a recording microphone on the stage. Do not worry about phase, separate stereo or quadriphonic channels, or trying to correct the sound at any other place in the audience.
Assume the following:
G ( f ) =
1 + ( f / fc )^2 n
Part 1 - determining the acoustical response of the hall:
a. (5 points) How many samples will you be taking?
Part 2 - correcting an arbitrary waveform
Assume that between the sensing microphone on the stage and the power amplifiers that there is a filter system (called a graphic equalizer) that has 100 adjustable gains gm that can be set by computer control. Each gain affects a narrow frequency band centered at fm. fm = 20 Hz (1.0723) m -1, m = 1 to 100. f 1 = 20 Hz, f 100 = 20 kHz.
Microphone Graphic equalizer g m Differential preamplifier
Power amplifier
Loud speaker
g. (20 points) Explain how would you use the response function measured in part 1 above to set the m gains of the graphic equalizer to correct an arbitrary waveform detected by the microphone on the stage. Include an equation for gm as a function of the Fourier amplitudes Fn determined in part 1.
Problem 5 (total 30 points):
Design a system for converting digital audio data from compact digital disk (sampled at 44 kHz) to digital audiotape (to be played at 48 kHz). Simply reading the 16-bit digital words from the compact disk and writing them to digital tape will not work because on playback all frequencies will be shifted upward by about 10%.
Note that there is no single correct answer- but note the following:
a. (15 points) Sketch the system. show and label all essential components and signal lines
b. (15 points) Describe how the system works
College of Engineering Electrical Engineering and Computer Sciences Department 145M Microcomputer Interfacing Lab
Final Exam Solutions May 20, 1993
and 2R that permits N switches to control a binary sequence of currents Ii = I 0 2 i.
tion voltages. Also, the last transition voltage V(2N^ –2, 2N^ –1) minus the first transition voltage V(0,1), divided by 2N^ –2.
plotted as a function of n and a straight line passing through the first and last transition voltages.
ensuring accurate data transmission. Typical signals are “ready to send”, “ready to receive”, “data sent”, “data received”.
line is asserted, output = input. Otherwise the output is in a high-impedance state.
59-61 Hz
20R
R
Micro- computer
≈8V p-p
9513 Timer/ Counter
8-bit parallel port (not used)
Comparator
2 Set counters 2 and 3 for cascaded upward counting at 1 MHz 3 Zero and arm all three counters 4 Latch and read counter 1 in a loop until it reads 1 5 Latch and read counters 2 and 3, pack bytes to produce a time T 6 Latch and read counter 1 in a loop until it reads 61 7 Latch and read counters 2 and 3, pack bytes to produce a time T 8 Compute power line frequency as 60 x 10^6 /(T2 – T1) [4 points off if the exact time of zero crossings not used. Counting the number of cycles in 1 sec gives only integer answers 59, 60, and 61- this is not accurate to 0.001 Hz.
145M Final Exam Solutions page 1 May 20, 1993 S. Derenzo/W. Wanchoba
59-61 Hz signal
Comparator output
Counter 1 (^0 1 2 )
LPF
LPF
S/H
S/H
A/D
A/D
Tri-state #
Tri-state #
16
16
16
16-bit parallel input
Timer
Hold mode, start conversion
End conversion, latch tri-state parallel output
End conversion, latch tri-state
Select #
Select #
BIHOLD
BISTROBE
1 2 3
2 Arm timer 3 Timer pulse puts both S/H in hold mode, starts both A/D converters 4 When conversion is complete, the two A/D converters strobe their data onto their respec- tive tri-state registers. 5 The next timer pulse is detected by the program, which has been looping to sense BISTROBE 6 Program puts out a pulse in output line #1 to select tri-state buffer #1, which asserts its data onto the 16-bit parallel input port 7 After a short delay to allow the data to settle, the program puts a pulse on output line #3, which is connected to BIHOLD and latches the data onto the 16-bit parallel input port 8 The program reads the input port 9 The program puts a pulse on output line #2 to select tri-state buffer #2, which asserts its data onto the 16-bit parallel input port 10 repeat steps 7 and 8 11 Repeat steps 3-4 and 5-10 which occur in parallel, so that the program is reading old data from the tri-state buffers during the 15 μs that it takes the A/D converters to convert new data. Steps 3-4 take 15 μs while steps 5-10 should take about 6 μs.
145M Final Exam Solutions page 2 May 20, 1993 S. Derenzo/W. Wanchoba
Method 2 (continuous mode); 1 Play the compact disk data through a standard compact disk player, which interpolates the steps in the D/A output waveform and low-pass filters to give a smooth analog waveform 2 Sample this waveform at 48 kHz and digitize [5 points off if a no interpolation or filtering used to smooth the higher harmonics caused by the abrupt edges of the 44 kHz D/A output steps. These higher frequencies can cause severe aliasing]
[15 points off if the DAT digital values are the same as the CD digital values]
145M Numerical Grades:
5/9 x Lab Lab Partic. Midterm #1 Midterm #2 Final Total Average 478 100 84 92 162 921 (B+) rms 23 0 12 4 28 53 Maximum 500 100 100 100 200 1000
145M Letter Grade Distribution
Letter Grade Course Totals (1000 max)
A+ 990 A 955, 958, 973 A– 935, 941, 943, 946, 946
B+ 919, 921 B 868, 880, 886, 897 B– none
C 772
145M Final Exam Solutions page 4 May 20, 1993 S. Derenzo/W. Wanchoba