Docsity

EECS 145M Spring 2001 Midterm #1 Solutions and Common Mistakes, Exams of Microcomputers

Toggle sidebar
bg1
February 26, 2001 page 1 S. Derenzo
Solutions for Midterm #1 - EECS 145M Spring 2001
1a
• Acquire a computer with a digital I/O port and an internal clock
• Connect a pushbutton switch to one line of the digital input port and one line of the output port
to an amplifier and fast light (like an LED)
• Write a computer program that detects a pushbutton, waits a random delay, prompts the
subject by turning on the light and measures the time until the pushbutton is pressed
• Select a large number of candidates representing group d (racecar drivers) and group p (jet
fighter pilots)
• After initial training and a good nights sleep, take as much reaction time data as possible,
allowing for rest periods
• Compute the average reaction times dp and , the standard deviation of the samples
σσ
dp
and , and the standard errors of the mean σσ
dp
and and compute Student’s t:
tdp dp
mm
dpdd pp
== āˆ’
+=āˆ’
+
āˆ†
āˆ†
σσσ σ σ
22 2 2
//
• Look up the probability of exceeding this value or t by chance. If the probability is < 0.1%,
then the group with the lowest average has a faster reaction time.
[2 points off if only two subjects]
[1 point off if probability mentioned but not looked up or calculated]
2a
remote
µcomputer
camera and
interface
input port
output port
central
µcomputer
input port
output port
data
data available
ready for data
2b
1 car passes, remote computer acquires license plate number
2 remote computer stores license plate in local memory
3 remote computer waits until central computer signals ā€œready for dataā€ TRUE (meanwhile steps
1 and 2 can continue and new license plate numbers can stack up in local memory)
4 remote computer writes license plate number to its output port and signals ā€œdata availableā€
TRUE
5 central computer reads data, sets ā€œready for dataā€ FALSE
6 remote computer sets ā€œdata availableā€ FALSE
[4 points off for setting ā€œdata availableā€ TRUE before the data have been asserted
pf3
pf4

Partial preview of the text

Download EECS 145M Spring 2001 Midterm #1 Solutions and Common Mistakes and more Exams Microcomputers in PDF only on Docsity!

Solutions for Midterm #1 - EECS 145M Spring 2001

1a

  • Acquire a computer with a digital I/O port and an internal clock
  • Connect a pushbutton switch to one line of the digital input port and one line of the output port to an amplifier and fast light (like an LED)
  • Write a computer program that detects a pushbutton, waits a random delay, prompts the subject by turning on the light and measures the time until the pushbutton is pressed
  • Select a large number of candidates representing group d (racecar drivers) and group p (jet fighter pilots)
  • After initial training and a good nights sleep, take as much reaction time data as possible, allowing for rest periods
  • Compute the average reaction times d and p , the standard deviation of the samples σ (^) d and σ p , and the standard errors of the mean σ (^) d and σ p and compute Student’s t:

t d p d p

d p^ d^ m^ d^ p^ mp

σ (^) āˆ† σ 2 σ 2 σ (^2) / σ^2 /

  • Look up the probability of exceeding this value or t by chance. If the probability is < 0.1%, then the group with the lowest average has a faster reaction time. [2 points off if only two subjects] [1 point off if probability mentioned but not looked up or calculated]

2a

remote μcomputer

camera and interface

input port

output port

central μcomputer input port

output port

data

data available

ready for data

2 b 1 car passes, remote computer acquires license plate number 2 remote computer stores license plate in local memory 3 remote computer waits until central computer signals ā€œready for dataā€ TRUE (meanwhile steps 1 and 2 can continue and new license plate numbers can stack up in local memory) 4 remote computer writes license plate number to its output port and signals ā€œdata availableā€ TRUE 5 central computer reads data, sets ā€œready for dataā€ FALSE 6 remote computer sets ā€œdata availableā€ FALSE

[4 points off for setting ā€œdata availableā€ TRUE before the data have been asserted

A common mistake was to answer something like this: 1 car passes, remote computer acquires license plate number 2 remote computer stores license plate in local memory 3 remote computer signals ā€œdata availableā€ TRUE (fundamental error here- ā€œdata availableā€ should be set TRUE only after data are actually available to the receiver) 4 central computer detects ā€œdata availableā€ TRUE and when ready sets ā€œready for dataā€ TRUE 5 remote computer detects ā€œready for dataā€ TRUE and asserts data on its input port 6 central computer reads data and sets ā€œready for dataā€ FALSE 7 remote computer detects ā€œready for dataā€ TRUE and sets ā€œdata availableā€ FALSE

WHAT IS WRONG WITH THE ABOVE?

the central computer could perform steps 4 and 6 before step 5 is completed

Another common mistake was to think that the remote computer could ā€œsendā€ data to the central computer without any action on the part of the central computer. This appeared as the above with step 6 as 6 remote computer sends data to the central computer and sets ā€œready for dataā€ FALSE

3a

μcomput

16-bit digital output port

(^12) D/A converter S/H

S/H

S/H

S/H

R1 R

L1 (^) L

A0 (^) R2 R

L2 L

R1, R3, L1, and L3 are digital control lines to S/H amps [2 points off for using only two S/H amps, a design that does not update both left and right within << 1 μs]

3 b 1 reset_clock; (this sets the clock to zero) 2 i= 3 write to output port, sending val_right[i] to the D/A, SAMPLE to R1 and HOLD to R3, L1, and L3 (during this 1 μs step the D/A output A0 can convert, glitch, and settle down; this stable analog voltage appears at R2) 4 write to output port, sending val_right[i] to the D/A, HOLD to R1, R3, L1, and L3 (this holds the new analog value on R2) 5 write to output port, sending val_left[i] to the D/A, SAMPLE to L1 and HOLD to L3, R1, and R3, (during this 1 μs step the D/A output A0 can convert, glitch, and settle down; this stable analog voltage appears at L2)

Midterm #1 class statistics:

Problem max average rms 1 20 18.0 2. 2 20 16.7 2. 3 60 47.4 9. total 100 82.1 10.

Grade distribution:

Range number approximate letter grade 61-65 1 C– 66-70 2 C 71-75 0 C+ 76-80 3 B 81-85 3 B+ 86-90 4 A– 91-95 0 A 96-100 2 A+