

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


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]