Docsity

Microcomputer Controlled Systems for A/D Converter Testing and Musical Instrument Analysis, Exams of Microcomputers

Toggle sidebar
bg1
Name (Last, First)
UNIVERSITY OF CALIFORNIA
College of Engineering
Electrical Engineering and Computer Sciences Department
EECS 145M: Microcomputer Interfacing Laboratory
Spring Midterm #2
Monday, April 21, 1997
•Closed book- calculators OK
•Many equations are listed at the back of the exam
•You must show your work to get full credit
PROBLEM 1 (50 points)
Design a computer controlled system for the automatic testing of 12-bit A/D converters.
You are provided with the following:
•A microcomputer equipped with a 16-bit parallel input port, and a 16-bit parallel output port.
•A 16-bit D/A converter with ±1 LSB absolute accuracy.
You may assume the following:
•The 16-bit parallel output port is in ā€œtransparentā€ mode. A 16-bit word A written to the output
port using the command outport(1, A) immediately appears on the output lines.
•The 16-bit parallel input port requires a low-to-high edge on a ā€œstrobeā€ input line for external
data to be latched onto the 16 bit registers. The program can read these registers using the
command B = inport(1).
•The parallel input port has an ā€œinput data availableā€ line that can be asserted high or low by an
external device and read by the program using the command C = inport(2).
•The parallel input port has an external ā€œready for input dataā€ line that can be set high using the
program command outport(2,1), and set low using outport(2,0).
•The A/D converter requires a ā€œstart conversionā€ low-to-high signal and after conversion
provides a ā€œdata readyā€ low-to-high signal that goes low when ā€œstart conversionā€ goes low.
•The A/D reference voltages are Vref– = 0.0000 V and Vref+ = 4.095 V
•The D/A reference voltages are Vref– = 0.0000 V and Vref+ = 4.096 V
EECS145M 1997 Midterm #2 Page 1 Derenzo
pf3
pf4
pf5

Partial preview of the text

Download Microcomputer Controlled Systems for A/D Converter Testing and Musical Instrument Analysis and more Exams Microcomputers in PDF only on Docsity!

UNIVERSITY OF CALIFORNIA

College of Engineering Electrical Engineering and Computer Sciences Department

EECS 145M: Microcomputer Interfacing Laboratory

Spring Midterm # Monday, April 21, 1997

  • Closed book- calculators OK
  • Many equations are listed at the back of the exam
  • You must show your work to get full credit

PROBLEM 1 (50 points)

Design a computer controlled system for the automatic testing of 12-bit A/D converters.

Y ou are provided with the following:

  • A microcomputer equipped with a 16-bit parallel input port, and a 16-bit parallel output port.
  • A 16-bit D/A converter with ±1 LSB absolute accuracy.

You may assume the following:

  • The 16-bit parallel output port is in ā€œtransparentā€ mode. A 16-bit word A written to the output port using the command outport(1, A ) immediately appears on the output lines.
  • The 16-bit parallel input port requires a low-to-high edge on a ā€œstrobeā€ input line for external data to be latched onto the 16 bit registers. The program can read these registers using the command B = inport(1).
  • The parallel input port has an ā€œinput data availableā€ line that can be asserted high or low by an external device and read by the program using the command C = inport(2).
  • The parallel input port has an external ā€œready for input dataā€ line that can be set high using the program command outport(2,1), and set low using outport(2,0).
  • The A/D converter requires a ā€œstart conversionā€ low-to-high signal and after conversion provides a ā€œdata readyā€ low-to-high signal that goes low when ā€œstart conversionā€ goes low.
  • The A/D reference voltages are Vref–^ = 0.0000 V and Vref+^ = 4.095 V
  • The D/A reference voltages are Vref–^ = 0.0000 V and Vref+^ = 4.096 V

1a. [25 points] Draw a block diagram of the major components, including the A/D circuit being tested. Show and label all essential components, data lines, and control lines.

1b. [10 points] How would you measure the maximum absolute accuracy error of the A/D? (Explain the procedure in steps or with a flow diagram.)

2a. [10 points] How does your design avoid aliasing? Give details.

2b. [10 points] What is the minimum sampling frequency required?

2 c. [5 points] What is the minimum time needed to take all the required samples?

2d. [5 points] What is the minimum number of samples required?

2 e. [5 points] Would a Hanning window be useful in your design? Explain your reasoning.

2 f. [5 points] To what frequency does the first FFT coefficient H 1 correspond?

2 g. (10 points] For a musical instrument with a first harmonic frequency of 500 Hz, which FFT magnitudes would you expect to be non zero?

Equations, some of which you might find useful:

G ( a ) =

2 Ļ€Ļƒ^2

exp āˆ’

a āˆ’Ī¼ σ

^2

 μ ā‰ˆ^ a^ =^ m^1 ai i = 1

m

σ a^2 = Var( a ) =

m āˆ’ 1

 (^) Ri^2 i = 1

m

āˆ‘ =^

m āˆ’ 1

 ( a i āˆ’ a )^2

i = 1

m

āˆ‘ Var( a^ )^ =^ Var( a )/^ m

t =

Ļƒāˆ†

a āˆ’ b

σ^2 a^ + σ^2 b^

a āˆ’ b

σ a^2 / ma + σ b^2 / mb

σ (^2) f^ =

āˆ‚ f āˆ‚ a 1

2 σ a^21 +

āˆ‚ f āˆ‚ a 2

2 σ a^2 2 + +

āˆ‚ f āˆ‚ an

2 σ an^2

f = k a ( + b ) σ^2 f^ = k^2 (σ a^2 + σ b^2 ) f = kab σ 2 f^ f^2 = σ^2 a^ a^2 +σ b^2 b^2