Reliable Transfer - Introductory Microcomputer Interfacing Laboratory - Solved Exam, Exams of Microcomputers

Main points of this past exam are: Reliable Transfer, Essential Handshaking Steps, Digital Data, Circuit, Computer, Block Diagram, Interconnecting Line

Typology: Exams

2012/2013

Uploaded on 03/22/2013

sarup
sarup 🇮🇳

30 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
145M Final Exam Solutions page 1 May 11, 2010 S. Derenzo
UNIVERSITY OF CALIFORNIA
College of Engineering
Electrical Engineering and Computer Sciences Department
145M Microcomputer Interfacing Lab
Final Exam Solutions May 11, 2010
1.1 Handshaking steps:
When the receiver is ready, it sets “ready for data” (RD) TRUE
The sender detects RD TRUE and asserts the data
After the data have settled, the sender sets “data available” (DA) TRUE
The receiver detects DA true, reads the data, and sets RD FALSE
The sender detects RD false, and sets DA FALSE
[3 points off for asserting DA in a step before the step that asserts data]
[5 points off if the sender never asserts data]
2.1 Flash 8-bit A/D converter:
V
R/2
R
R
Address
encoder
logic
Digital
output
(8 bits)
R/2
1
2
Exclusive OR
V1
Comparators
V
ref
V
ref
255
255
pf3
pf4
pf5

Partial preview of the text

Download Reliable Transfer - Introductory Microcomputer Interfacing Laboratory - Solved Exam and more Exams Microcomputers in PDF only on Docsity!

UNIVERSITY OF CALIFORNIA

College of Engineering Electrical Engineering and Computer Sciences Department 145M Microcomputer Interfacing Lab Final Exam Solutions May 11, 2010 1.1 Handshaking steps: When the receiver is ready, it sets “ready for data” (RD) TRUE The sender detects RD TRUE and asserts the data After the data have settled, the sender sets “data available” (DA) TRUE The receiver detects DA true, reads the data, and sets RD FALSE The sender detects RD false, and sets DA FALSE [3 points off for asserting DA in a step before the step that asserts data] [5 points off if the sender never asserts data] 2.1 Flash 8-bit A/D converter: V R / R R Address encoder logic Digital output ( 8 bits) R / 1 2 Exclusive OR V 1 Comparators V ref V ref 255 255

[4 points off for omitting the resistor chain that provides the 255 uniformly spaced reference voltages] [4 points off for omitting the 255 comparators] [8 points off for showing only 8 resistors, 8 comparators, and 8 output lines] [12 points off for showing only 255 comparators and 255 digital output lines] [4 points off for an output of 255 digital lines] 2.2 The analog input is send to the positive inputs of 255 comparators. A 255-resistor voltage divider provides an evenly spaced series of voltages for the negative input to the comparators. For a given analog input, the comparator output is one for all the divider voltages below the input and zero for all the voltages above. A series of exclusive or circuits identifies the highest comparator with an output of one and an encoder circuit determines the numerical value. 3 For f 1 < 10 kHz, the filter gain G 1 > 0. Let f 2 be the frequency that can alias below f 1 with gain G 2 < 0. fs = 60 kHz > f 1 + f 2 f 2 < fs – f 1 = 50 kHz Approximating fc ~ f 1 , f 2 /fc ~ f 2 / f 1 < 5 Searching for the n value where f/fc <5 at G = 0.001, we find n = 6 To check At G 1 = 0.99, f 1 /fc = 0.723 so fc = 13.8 kHz At G 2 = 0.001, f 2 /fc = 3.162, so f 2 = 43.7 kHz f 1 + f 2 = 53.7 kHz which is less than fs, so the sampling frequency of 60 kHz is adequate. Solution is n = 6, fc = 13.8 kHz [3 points off for n = 4] [3 points off for n = 10] [10 points off for a partial analysis that does not check if the gain requirements are met] 4.1 D/A glitches: When the input number changes in more than one bit, it is impossible for both bit switches to change exactly at the same time. During the brief time between the first switch change and the last switch change, an erroneous voltage will be produced. [4 points off for settling time and no mention of bit changes] [2 points off for not stating that the bits cannot change simultaneously] 4.

  • Amplifier
  • Low-pass filter
  • A/D converter (S/H not required for full credit) or analog input port
  • Digital input port (if no analog input port)
  • Digital output port
  • Trigger line between digital output port and sensor (1 Hz)
  • Start conversion line between digital output port and A/D converter (~5 kHz) (not required if analog input port shown)
  • Analog lines connecting sensor, amplifier, filter, A/D converter or analog input port
  • Digital lines between A/D converter and digital input port (not required if analog input port shown) [2 points off for each element missing] 5.2 The first consideration is that most of the amplifier noise was outside of the 1 Hz to 1 kHz frequency range of interest. So a low pass filter that had a gain G 1 = 0.99 at f 1 = 1 kHz and a gain G 2 = 0.0001 at f 2 = 4 kHz would effectively remove the noise from 4 kHz to 1,000 kHz. A low pass filter with n = 8 and fc = 1.27 kHz would satisfy these requirements. A sampling frequency fs = f 1 + f 2 = 5 kHz would avoid aliasing. A raised cosine window is not necessary, since all the data of interest are periodic. Since the sampling window was 100 s, a sampling frequency of 5,242.88 Hz would produce 524,288 = 2 19 samples for the FFT. The process for sampling is
  1. The computer pulses the trigger line at exactly 1 Hz
  2. The computer pulses the A/D start conversion line at exactly 5,242.88 Hz
  3. The computer waits for conversion to be complete (typically < 10 microseconds) and reads the data (using the “conversion complete” would be good practice but was not necessary for full credit). Note that the sampling rate (5.2 kHz) is much slower than the A/D converter or the digital input port (typically > 100 kHz)
  4. After 100 seconds, the computer stops sampling and takes the FFT of the 524, samples. [3 points off for not specifying low pass filter design] [3 points off for not specifying sampling frequency for triggering the analog input] [3 points off for not triggering the sensor at 1 Hz for 100 seconds] [3 points of for not calculating the FFT] 5.3 The FFT will have Fourier amplitudes Hn where n = 0 to 524,287. The frequency index n corresponds to frequency n/100s = n (0.01 Hz). The signal of interest will appear at frequency indexes 100k (k = harmonic index of the signal) and the random amplifier noise will be spread over all Fourier amplitudes. The highest frequency of interest 1 kHz will appear at n = 100,000 and at n = 424,287 (complex conjugate of amplitude at n = 100,000). The low pass filter will reduce the amplitude at higher frequencies, dropping to a gain below 0.01 at the center point n = 262,144 (2.62 kHz) where f/fc = 2.06. Frequencies above 4. kHz that could alias below 1 kHz are reduced by the filter to below 0.0001.

[4 points off for not showing range of FFT output in Hz or frequency index] [4 points off for not indicating harmonics of periodic signal on a noise background] [4 points off for not showing effect of low-pass filter] 5.4 The low pass filter removes most of the noise above 2 kHz but Fourier techniques can remove almost all the noise in the 1 Hz to 1 kHz frequency band of interest. Since only the Fourier amplitudes H100k contain signal information (k = integer harmonic number) and all others contain pure noise, the latter can be set to zero. Each Fourier harmonic H100k will also contain 1% of the noise which can be estimated by averaging the other Fourier amplitudes that contain only noise. Subtract the average noise from the harmonics H100k and set all others to zero. This reduces the noise in the Fourier domain by a factor of 100. Take the inverse FFT which will contain 100 periodic identical replicas of the signal. Any one of them can be taken as the recovered signal. [5 points off for time averaging the signal + noise before taking the FFT; this approach only reduces the noise by the square root of the number of signal repetitions ] [5 points off for increasing the sampling window; this does not change the noise content in each Fourier amplitude but each harmonic will increase; but this is not as effective as setting the non-harmonics to zero and taking the inverse FFT] [10 points off for not averaging in the time domain and not zeroing the non-harmonic Fourier amplitudes] 6.

Im( Hn ) = − hk sin( 2 π nk / M ) k = 0 M

An even more efficient approach is to use the infinite impulse response filter shown on page 418 of the textbook (lecture slide 145M Final Exam Grades: Problem 1 2 3 4 5 6 Total Average rms Maximum 15 40 45 45 30 25 200 145M Numerical Grades: Short labs Long labs Lab Partic. Midterm #1 Midterm #2 Final Total Average 100 rms 0 Maximum 100 400 100 100 100 200 1000 145M Letter Grade Distribution Letter Grade Course Totals (1000 max) A+ A A– B+ B B- C+ C C– D+ D D–

  • Graduate student