EE319K Fall 2007 Quiz 3 Solution
Page 1
Jonathan W. Valvano
November 28, 2007
10:00am-10:50am
(5) Question 1.
A) Finish instruction, push registers, I=1, PC=vector, execute ISR.
(5) Question 2.
2
12
=4096, 5V/4096, which is about 1.2mV
(5) Question 3.
(We can reduce dropout by multiplying before divide by 100)
Start with the goal of the problem:
A
=
H
*
W
Specify the fixed-point definitions:
A =
IA
/100, W =
IW
/100, H =
IH
/100
Substitute definitions into problem:
IA
/100 =
IW
/100 *
IH
/100
Solve algebraic
IA
= (
IW
*
IH)
/100
Questions 4 and 5
Hand execute and build a stack picture
SP
In
In
SP
In
SP
Cnt
In
SP
Cnt
OldA
0,SP
1,SP
2,SP
3,SP
4,SP
5,SP
6,SP
7,SP
movw #1000,2,-sp
jsr sub2
des
psha
pshx
(5) Question 4.
in
set
6
; binding of 16-bit input parameter
(5) Question 5.
cnt
set
3
; binding of 8-bit local variable
(15) Question 6.
Any resistor set that is a power of 2 is OK.
PM2
8k
Ω
PM3
4k
Ω
PM1
16k
Ω
PM4
2k
Ω
PM0
32k
Ω
Vout
(5) Question 7.
C) The software writes to the ATDCTL5 register.
(5) Question 8.
fdb
Brake,Go
(5) Question 9.
ldab 0,y
(or ldab 1,y+)
(5) Question 10.
ldy 1,y
(or ldy 0,y)
(5) Question 11.
C) Because the
Fifo
queue decouples execution of producer and consumer.
(5) Question 12.
This
preview
has intentionally blurred sections.
Sign up to view the full version.
This is the end of the preview.
Sign up
to
access the rest of the document.
- Spring '08
- BARD
- Interrupt handler, Jonathan W. Valvano, W. Valvano
-
Click to edit the document details