Digital Output - Introductory Microcomputer Interfacing Laboratory - Solved Exam, Exams of Microcomputers

Main points of this past exam are: Digital Output, Temperature Sensor, Digital Number, Take Data, Output Data Available, Putsinglevalue, Continually

Typology: Exams

2012/2013

Uploaded on 03/22/2013

saryu
saryu 🇮🇳

4.3

(4)

42 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
February 26, 1997 page 1 S. Derenzo
Solutions for Midterm #1 - EECS 145M Spring 1998
1a
Temperature sensor
12
"take data"
"data available"
Digital
output
port
Digital
input
port
Micro-
computer
temperature
1b
1The program outputs a one to the digital output port, which makes “take data” high
2The program starts a loop that continuously reads the 16 bits of data and exits when the
“output data available” line goes high.
3The temperature sensor detects a one on “take data”, senses the temperature, converts to into a
12-bit number
4The temperature sensor asserts the 12-bit number on the 12 output lines
5The temperature sensor makes the “output data available” line high
6The program detects the “output data available” signal, and exits the loop
7The program masks the 12-bit number from the 16 bit data
8The program makes “take data” low
9The sensor makes “output data available” low
[4 points off if the computer never reads “output data available”]
[2 points off if computer makes “take data” low before reading data]
1c Take data
Data valid No NoYes
Data available
Temperature sensed
and converted
Computer reads data
pf3

Partial preview of the text

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

Solutions for Midterm #1 - EECS 145M Spring 1998

1a

Temperature sensor

12

"take data"

"data available"

Digital output port

Digital input port

Micro- computer

temperature

1b 1 The program outputs a one to the digital output port, which makes “take data” high 2 The program starts a loop that continuously reads the 16 bits of data and exits when the “output data available” line goes high. 3 The temperature sensor detects a one on “take data”, senses the temperature, converts to into a 12-bit number 4 The temperature sensor asserts the 12-bit number on the 12 output lines 5 The temperature sensor makes the “output data available” line high 6 The program detects the “output data available” signal, and exits the loop 7 The program masks the 12-bit number from the 16 bit data 8 The program makes “take data” low 9 The sensor makes “output data available” low

[4 points off if the computer never reads “output data available”] [2 points off if computer makes “take data” low before reading data]

1c Take data

Data valid (^) No Yes No

Data available

Temperature sensed and converted

Computer reads data

2a

Temperature sensor 1

"take data"

"data available 1"

Digital output port

Digital input port

Micro- computer

temperature

Temperature sensor 2

temperature

Two octal tri-state buffers

12

"output enable 1"

Two octal tri-state buffers

12

"data available 2"

data bus "take data" (^) "output enable 2"

2b

1 The program outputs a word to the digital output port that has a one on the “take data” bit, and ones on both output enable 1 and 2 to ignore the sensors. 2 The two temperature sensors simultaneously start producing a digital output 3 The program reads the digital input port in a loop waiting for “output data available n”, n = 1 or 2 to go high (Note that these two signals do not need tri-state buffers and can be read directly to constantly monitor both temperature sensors) 4 If sensor n (n = 1 or 2) is ready first, it makes “output data available n” high 5 The program detects the "output data available n" signal and writes a word to the digital output port with one on the “take data” bit, a zero on the “output enable n” bit to select sensor n, and a one on the “output enable 3-n” bit to ignore sensor 3-n. (Note: If n = 1, 3-n = 2. If n = 2, 3-n = 1.) 6 The program reads the input port for the sensor n data 7 The program masks the data to produce the 12-bit value from temperature sensor n 8 The program continues to read the digital input port in a loop waiting for the “output data available 3-n” bit to go high 9 When sensor 3-n is ready, it brings “output data available 3-n” high 10 The program detects the “output data available 3-n” and writes a word to the digital output port that has a one on the “take data” bit, a one on the “output enable n” bit to ignore sensor n, and a zero on the “output enable 3-n” bit to select sensor 3-n. 11 The program reads the input port for the sensor n data 12 The program masks the data to produce the 12-bit value from temperature sensor n 13 The program writes a word to the digital output port that brings “take data” low [4 points off if the computer does not read the “output data available” signals [4 points off if the computer does not selectively enable the two tri-states before reading data]