Electrical Engineering 145M - Spring 1997 - Derenzo - Midterm 1

# Electrical Engineering 145M - Spring 1997 - Derenzo - Midterm 1

This preview shows pages 1–2. Sign up to view the full content.

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 26, 1997 For book- add drawing of timing diagram to problem 2 PROBLEM 1 (50 points) You wish to measure the distance from a point on the earth to the surface of the moon using the following components: 1 A pulsed laser that can send a narrow beam of light to the moon. The laser pulse is triggered by a low-to-high edge on a digital input line, and the laser pulse has a duration of 10 μs. 2 A special (retro-directive) mirror that reflects light back along its original direction, placed on the moon years ago by the Apollo astronauts. 3 A photodetector (at the focus of a large telescope) that can detect the laser light reflected from the mirror on the moon and produce an digital pulse that is high only when the reflected laser light is detected. 4 A computer with C compiler, similar to the one used in the 145M lab. “Import” and “outport” commands each transfer words of 16 bits and take 1 μs- assume that all other C program commands are essentially instantaneous. 5 A counter/timer circuit at port address 1, containing a single 32-bit counter/timer that is set to take its input from a 1 MHz clock. All 32 bits in the counter can be set to zero using the program command outport(1,0); The 16 bits i1 (least significant word) and the 16 bits i2 (most significant word) can be latched and read using the following program commands: outport(1,1); i1 = inport(1); i2 = inport(1); 6 A 16-bit parallel output port at port address 2. It is set to operate in transparent mode so that the word j can be made to appear immediately on the external lines using the program command: outport(2,j); 7 A 16-bit parallel input port at port address 3. It is set to operate in transparent mode so that the word k on the external lines can be read at any time using the program command:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This document was uploaded on 11/21/2009.

### Page1 / 7

Electrical Engineering 145M - Spring 1997 - Derenzo - Midterm 1

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online