# Making Measurements - Introductory Microcomputer Interfacing - Exam, Exams for Microcomputers. KIIT University

## Microcomputers

Description: Main points of this exam paper are: Making Measurements, Essentially Gone, Suppresses Output, Hold Amplifier, Sample, Accurate Conversion, Inputs
Showing pages  1  -  4  of  6
Name (Last, First)
UNIVERSITY OF CALIFORNIA
College of Engineering
Electrical Engineering and Computer Sciences Department
EECS 145M: Microcomputer Interfacing Laboratory
Spring Midterm #1 (Closed book- calculators OK)
Wednesday, February 21, 1996
PROBLEM 1 (25 points)
You have just tested an 8-bit D/A circuit by making measurements of its output glitches. Your
measurements show that after all possible changes in input bit patterns at time t, the output glitch
begins no earlier than t + 10 ns and is essentially gone after t + 30 ns. The output ranges from V1 =
0 volts to V255 = 2.55 volts.
You decide to design and build a circuit that does the following:
Uses the D/A converter, but suppresses output glitches by sensing changes in the input and
using a sample and hold amplifier.
Has accurate conversion at 0 Hz.
You have available the following components:
1A digital circuit that has 8 inputs and one output (normally low). If the input bits change at
time t, the output goes high from (t + 5 ns) to (t + 5 ns + td). You can choose the value of td.
2A sample-and-hold amplifier with an analog input, and analog output, and a digital control
line. When the control line is low, the analog output V0(t) is equal to the analog input V1(t).
When the control line is made high at time th, the analog output is initially held at V1(th), but
with an output droop of 100 mV per second.
Do the following:
a. (12 points) Draw a block diagram of your circuit design, showing and labeling all essential
components and connections.
EECS145M 1996 Midterm #1 Page 1 Derenzo
Name (Last, First)
PROBLEM 1 (continued)
b. (13 points) Briefly describe the operation of your circuit after a change in input.
PROBLEM 2 (50 points)
You are to design a system able to meet the following considerations:
1Measures the frequency f of a sinewave V(t) = V0 sin(2πft)
2Makes a new measurement every second
(Hint: Use the event timing measurement technique of Lab Exercise 2)
You are provided with the following components:
1A computer with C compiler, similar to the one used in the 145M lab. Inportb and outportb
commands each take 1 µs- assume that all other C program commands are essentially
instantaneous.
2A counter/timer circuit at port address 1, containing a single 32-bit counter/timer is set to take
its input from a 1 MHz clock.
All four bytes in the counter can be set to zero using the program command
outportb(1,0);
The four bytes i1 (least significant byte) to i4 (most significant byte) can be latched and read
using the following program commands:
outportb(1,1);
i1 = inportb(1);
i2 = inportb(1);
i3 = inportb(1);
i4 = inportb(1);
3An 8-bit parallel input port (similar to the one used in Lab 3) at port address 2. It is set to
operate in transparent mode so that the byte value b on the external lines can be read at any
time using the program command:
b = inportb(2);
EECS145M 1996 Midterm #1 Page 2 Derenzo
Name (Last, First)
PROBLEM 2 (continued)
Do the following:
a. (12 points) Draw a block diagram of your system, showing and labeling all essential
components and connections.
b. (14 points) List the steps in the operation of your system during a 1s measurement period.
Include both hardware events and program code as needed. (“Legal” C code not required- just
describe what each program command needs to do.)
EECS145M 1996 Midterm #1 Page 3 Derenzo
Name (Last, First)
PROBLEM 2 (continued)
c. (8 points) Draw a timing diagram for the important signals.
d. (8 points) What are the minimum and maximum frequencies that your system can measure?
(Show work)
e. (8 points) At the minimum and maximum frequencies, what are the uncertainties in the
measurements?
(Hint: You do not need to use the formal error propagation formula, just consider the range of
measured values for a fixed input frequency)
EECS145M 1996 Midterm #1 Page 4 Derenzo