



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!




College of Engineering Electrical Engineering and Computer Sciences Department 145M Microcomputer Interfacing Lab Final Exam Solutions May 18, 2001
1a The transparent latch input and output are digital while the sample and hold amplifier input and output are analog. Both have similar control lines whose state determines whether the output is equal to the input or held at its last value. [1 point off for describing both but not stating what is different] [4 points off for describing both without mentioning analog or digital] [4 points off for stating that the transparent latch is always transparent but the S/H can be either sample or hold]
1 b
successive approximation flash
requires S/H for steady input does not require S/H larger number of bits (12-16 typical) smaller number of bits (8-10 typical) uses a D/A uses 2N^ – 1 comparators [5 points off for # steps missing] [no points off for missing one other item] [2 points off for each additional missing item]
1 c Frequency aliasing is caused by insufficient sampling and causes frequencies above one- half the sampling frequency to appear as lower frequencies. Spectral leakage is caused by sampling a non-integer number of cycles, which produces a discontinuity at the edges of the sampling window, which adds erroneous contributions to many Fourier coefficients. (More precisely, the observed Fourier transform is the true Fourier transform convolved with the Fourier transform of the sampling window)
2a The following are essential [3 points off for each omitted]:
Parallel Output Port 1
Parallel Input Port
Converter
Micro- Computer
Analog Parallel Output Port 2
SC 1
SC 8
tri-state 1
tri-state 8
OE 1
OE 8
Parallel Input Port
OA 8
OA 1
SC = Start Conversion DA=Data Available OE=Output Enable
2 b The steps needed to measure the first transition voltage V(0,1) for the first A/D converter.
1 set SC1 low, disable all tri-state drivers, set N = 0
2 Put N on D/A
3 wait 10μs until D/A has settled [using wait(10)]
4 Put low-high edge on SC1 output line to start conversion
5 Wait until output data available
6 enable tri-state 1 (disable all others)
7 read input port to get value M
8 Put high-low edge on SC1 output port to end conversion cycle
9 if M=0, increase N by one and loop back to step 2
10 If M=1, save (D/A voltage step)(N-1/2) as the transition voltage
2 c Send successive 16-bit numbers 0 to 216–1 to the D/A converter and convert the analog output with the A/D. Whenever the A/D output value changes, store the corresponding D/A value in a transition voltage table To determine absolute accuracy , compare the D/A values for each A/D output transition with the ideal transition values. Since the step size of the D/A is 16 times finer than the average step size of the A/D, this design can measure the A/D transition voltages to an accuracy of 1/16 LSB. [3 points off if only 12 D/A bits are varied. The transition voltages (or the center of the steps) cannot be determined accurately unless more than 12 bits of the accuracy of the 16-bit D/A is used.]
2 d Determine the D/A values corresponding to first and last A/D transition voltages, and the equa- tion of the line that passes through them. Linearity is a measure of how closely the other measured transition values pass through the line.
2 e Determine the difference in D/A values between each A/D transition voltage. The differential linearity is a measure of the equality of those differences. Alternatively, the A/D step sizes
[3 points off for realizing that both frequencies produce the same non-zero magnitudes but stating that the magnitudes are the same] [3 points off for giving a magnitude ratio of 100 but not giving the non-zero coefficients] Note: a common mistake was to divide 178,144 Hz by 4 to get the frequency index- this is wrong because all frequencies above the Nyquist limit of 2 17 Hz = 131,072 Hz are aliased to lower frequencies. Another common mistake was that 178,144 Hz aliases to 178,144 Hz – 131,072 Hz = 47, Hz. Actually HM-m aliases to Hm so 178,144 Hz aliases to 84,000 Hz.
4a
Power amp Loudspeaker
Acoustic signal
Microphone
Analog input port
Analog output port
Micro- computer
Amplifier
1 Generate an impulse (maximum voltage, width 1 μs) at the input of the power amplifier
2 immediately sample the output at 100 kHz to acquire the digitized impulse response ci (number of samples is a power of 2).
3 Perform the FFT on ci.
4 b
d t a t c t d a c
d t a c
indicates convolution F F F indicates simple multiplication
F^1 F F
[5 points off for having first equation only] [2 points off for having first two equations only]
4 c
a t a t b t c t a a b c
b t c C jC
C jC
r i C^ C
r i r i
− − −
indicates convolution F F F F indicates simple multiplication
[5 points off for having first equation only] [2 points off for having first two equations only]
4 d
1 From the 100 kHz sampled impulse response ci, compute bi = FFT–1[1/FFT(ci)]
2 Use bi as an FIR digital filter on the 100 kHz sampled input stream a (^) i. This convolves ai with bi to produce f (^) i.
f (^) i b ak i k k
3 Sending fi through the loudspeaker convolves fi with ci, which will result in a signal similar to a (^) i. a t ( ) = f t ( ) • c t ( ) = [ ( ) a t • b t ( )] • c t ( ) = a t ( ) • [ ( ) b t • c t ( )] Note that b(t)•c(t)=delta function since FFT(b) x FFT(c) = 1
145M Final Exam Grades:
Problem 1 2 3 4 Total Average 27.0 61.8 40.6 40.6 170. rms 4.0 10.5 8.3 8.4 24. Maximum 30 70 50 50 200
145M Numerical Grades:
Lab total Lab Partic. Midterm #1 Midterm #2 Final Total Average 457.0 97.7 82.1 71.5 170.0 8 7 8. 3 rms 44.9 1.8 10.8 14.4 24.9 8 1. 1 Maximum 500 100 100 100 200 1 0 0 0
145M Letter Grade Distribution
Letter Grade Course Totals (1000 max) A+ 983; 965; 935 A 951; 923; 916; 909 A– 894; 887 B+ 872; 868 B 833 B- 805 C+ C 736 C– 698 D+ D