Download Assembly Language Program - Microprocessor Systems Engineering I- Past Exam Paper and more Exams Materials science in PDF only on Docsity!
EE206.i Sem I 2007/2008 Page 1 of 5
Autumn Examinations 2007/
Exam Code(s) 2BP121, 2BN
Exam(s) Second Electronic and Computer Engineering
Second Electronic Engineering
Module Code(s) EE206.i
Module(s) Microprocessor Systems Engineering 1
Paper No. 1
Repeat Paper
External
Examiner(s)
Prof. P. Cheung
Internal
Examiner(s)
Prof. G. Ó Laighin
Dr. M. Glavin
Instructions: Answer Question^^1 and any two other questions.
Question 1 is compulsory and carries 40 marks.
Questions 2, 3 and 4 carry 30 marks each.
Duration 2hrs
No. of Pages 5
Department(s) Electronic Engineering
Course Co-
ordinator(s)
Requirements :
MCQ
Handout
Statistical Tables
Graph Paper
Log Graph Paper
Other Material
EE206.i Sem I 2007/2008 Page 2 of 5
1. Compulsory Question [40 marks total]
(a) Describe in your own words the functions of the Address, Data and Control buses of a
typical microprocessor based system. You may use diagrams where necessary. [5 marks]
(b) Draw a block diagram of the architecture of a modern PC motherboard. [5 marks]
(c) Describe the process of converting from binary to floating point data type. You may use an
example to illustrate the process. [5 marks]
(d) With the aid of a system block diagram showing a microprocessor and memory device,
describe the memory read operation. You should further illustrate your answer with a timing
diagram. [5 marks]
(e) How long does the following piece of assembly language take to execute (assuming a
12MHz clock frequency)?:
MOV A,#55h
MUL AB
JMP NEXT
NEXT: MOV P2,A
MOV P3, B [5 marks]
(f) Write an assembly language program to add the number stored at memory location 27H to
the number 33, store the result in Bank 2, Register 4 and output this same value on port 2
(you may need to refer to the Microconverter quick reference guide at the end of this exam
paper). [5 marks]
(g) Describe the following addressing modes: (a) immediate addressing and (b) direct
addressing, and explain the differences between the two modes. Use examples to illustrate
your answer. [5 marks]
(h) Describe the sequence of events that takes place when an interrupt is asserted in an 8051
microcontroller, with particular reference to ISR vectoring. [5 marks]
2. (a) With reference to a modern computer system, explain briefly the following terms (your
answer must include a short description of main features of each technology):
i. DVI
ii. Firewire
iii. RAID [6 marks]
(b) Describe in simple terms how a Liquid Crystal Display (LCD) works (your answer should
make reference to polarisation etc.) [6 marks]
(c) How is cache used to speed up a modern computer system? (Your answer should include a
diagram of how cache is situated with respect to the microprocessor and main memory.)
How does it differ from conventional RAM? What are the differences between level 1 and
level 2 cache? [8 marks]
(d) Explain (with the aid of a diagram) how you would interface a keypad to a microcontroller.
You may assume that the keypad is a switch matrix and that the key decoding must be done
on the microprocessor. Describe the process of decoding for each key on the keypad. How
could such a keypad be set up to use interrupts? [10 marks]
3. (a) What is STACK memory generally used for in a microprocessor system? How does the
STACK operate and how is it addressed? [6 marks]
(b) Describe the basic Von Neumann architecture instruction cycle. You may use a flowchart to
illustrate your answer. [6 marks]
(c) External interrupt IE0 has a vector address of 03h. Explain what you understand by this
statement and how this information influences the behaviour of an 8051 Microcontroller
when external interrupt IE0 is triggered. [6 marks]
(d) Why are internal timers preferable to coded delay loops for timing events in an 8051
program? [6 marks]
(e) With the aid of a diagram, show how a switch might be connected to port pin p0.0 (note: it is
not necessary to show the internal details of the port pin). Explain your answer. [6 marks]
^
A#
"9%B%
CBD
" E%" 2%F
" E%" 2%F
"G+9
'H
A
/%I
'I
4'I
'I
'I
'I
#% !$' !::: I0B:JBK5CD
* 5''^ 1G '=
C1&G ^ '=
*D
C!/#"
" D
J
K
K
I!
J
#0:J5$5/!,$
#0:15A%
J
)/G
J
J
&J
I!
K
K
#:J5J5
J
K
K
#:5K5
#:055K
4$)C"D
0J
4$)C
D
01 0J 00 I!
0K
#:J505
#:15&55#A(
0K
#:5J505#A(
&J
&J
&K
J
I!
J
&K
J
J
J
#:J5J
J
J&
J
JJ
$) (^) !+,*
++*( "
(^) "
+
&0
-)
A 9$ "
+
J
'
'8 "* "
+
0
0
'" "-
(^) " "
+ 00
&
$
$ /- * "
+
J
'
'8 "* "
+
0
1
$
$ /- * "
+
)$./
# 5 "
+
0
% 5$
%$ "
+
0
K
$5'4
$ "
+
0 1!+/*
(^) $ " -*
(^) " "
+
J0
+ /
+ /
+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$ - * *
'4 (^) 8 "
%)G - * (^) 7"*C=$
(^) (^) %8 *7D
$)G (^) " *
(^) 7"*C=$
(^) (^) $8 *7D
'4'! (^) 8 ""C=9"
(^) $'4= +5 * "$'4D
$% " " (^) *C= +=
(^) "D
!$ (^) 5 (^) " * C= =
(^) " D
# + 5 * C= = +
(^) D
$ "
(^) * 9
#
(^) +D
#
(^) +D
#$
(^) +D
#
(^) " (^) +D
#$
(^) +D
#4
(^) +D
#$
(^) +D
#4
(^) +D
" +# (^) 9
% 8 "*
(^) (^)
A% 8 "*
(^) (^)
$ 5 (^) " 8 "*"+
$ 5 (^) " 8 "*"+
!$ 8 "*" (^) +
!$ 8 "*" (^) +
$8 + (^) " "
%8 + (^) -"
(^) 0 9
' "" (^) + C=*"
(^) + *D
' (^) "* C"
(^) +D
'$ "$5'4C$ - "
(^) +D
' "% 5$ C +
(^) " (^) +D
'$ "$C$ - "
(^) +D
'4 " 'C8 ""
(^) +D
'$ "$C$ - "
(^) +D
'4 " 'C8 ""
(^) +D
" +'"* 9
(^) 9
(^) C* BJ@1B0D
(^) *+ (^) 9
( (^) %$
(^) " (^) * (^) P
( (^) B 9
(^) B /5
B %$
B- *
B K%$
B/ 51&C8D
B K%$
B- *
( (^) " @0"* *+
(^) (^) " "
%'! (^) -"*
(^) " (^) *
$ " @0K "
% " @0K -
$ " "
+*
% -"
+*
(^) * (^) " " "
(^) * 9
$' (^) 5 (^) " +
(^) 5 * 99
$ 5 (^) " 8 "*"+
(^) 9 C"* 9@9*"+ D
0E?G0(?
$ 9
0EG0(
$ 9
$(/:05: (^) 9 (^) " (^) *C=9" (^) !$8D
$(/:5:
" 5 * C= D
$(/:5:J (^) * "
$(/:5:& (^) E0$1$5$5 * 8$F
C ++ "=$ "*=$ D 0
$ ( 9
$ $ - * *9C * "-
(^) %D
$% $ (^) " " (^) *C= =
(^) "D
$ $ - * *9C * "-
(^) %D
$% $ (^) " " (^) *C= =
(^) "D
' 8 " !$9C * "-
(^) %D
$ '+C=- 9=9 9D
' 8 " !$9C * "-
(^) %D
$ '+C=- 9=9 9D
$ " (^) * 9
#/!: (^) *
(^) "
#/!:& (^) )' *C="
(^) *= (^) )'9D
#/!: (^) 9" + (^) +
#/!: (^) 9" + (^) +
#/!: (^) + B "
(^) " C (^) - D
#/!: (^) B (^) " (^) C (^) - ""
(^) +D
(^) # "
(^) * 9
# " #9
$EG$(C$0D
(^) # "
7# "
(^) 9
(^) C* B@BD
/!: (^) C= = "D
/!: (^) 8 ", C= "B +, D
/!:J
"- "=15 *
/!:& (^) *7=116?5E1&F
/!: (^) > " *
/!: (^) >=E0&F5 *
/!: (^) $ (^) "- "*
/!: (^) 8 "/!,$"
" (^) * 9
" (^) * 9
" (^) +*
( ( "*
/!,
"" (^) "- (^) ""*
/!, "9* (^) "- (^) "
"+ "" P
B=B
=+
(^) "
K===I!
$ ('/!: (^) C (^) ""D
$ ('/!:J (^) !$,) *
$ ('/!:& (^) E
(^) " "
F
$ ('/!: (^) "9" -
(^) " C= @ D
$ ('/!: (^) " -*"
(^) +M$ N
$ ('/!: (^) " -"C= *@ * D
$ ('/!: (^) * (^) 7"C= D
(^) $ " -*
(^) " " (^) *%9
E0E)1
(^) $ '*+
(^) "%9
$ '*+
(^) " %9
$ '*+ (" %9
E*4
$ '*+
%9
$ " -*%9
(^) 0 "
(^) "%9
I0:
8" 7B+ " "C= D
I0:
#A(+" * C=#:15#:=#0:&5#0:0D
I0:J
(^) + +
(^) C= "*D
I0:&
* 5''@#A( *
(^) 7 -
I0:
,= /%' 5E01&J1J&88F
I0:
C (^) , (^) =0G6?RJSD
I0:
C (^) ""? (^) D
I0:
" "4%( C=8 "*4%(D
1EG1(
(^) * 5''
(^) 9
10G10/G10G10>
* 5'' 9 1 (^) '%'))J (^) '%'+9& (^) ,'% Q+9 #%/I%(+9 %'+9
* 5''
^ " 9 C** (^) '!$'%)/ (^) '4 $)/ (^) #%/I%( -D
# # " (^) +C " # " D
A/) (^) * " (^)
#' # "C= "=# "*D
# ( * C= *-D
#/)
#6
#% # *
#% = (^) 5E&1FC *-P#%=D
# " (^) * 9
# 9
#%' 9
(^) * "
#%' B=EJ:10:1:JJJJF
#%' = C D
#%' T= -
A % 9" (^) + + "
A 9 (^) *9C" 9
(^) D
A' 9"*
(^) " (^) C= D
AA% (^) 9 "C " D
A 9$
(^) " (^) * 9
' #: (^) + (^) $ "
(^) +C" -*D
' #:J (^) + (^) #( "
(^) +C+ (^) ++* " (^) D
' #:& (^) + (^) # "
(^) +C *" D
' #: (^) C (^) ""? (^) D
' #: (^) "*$ "
(^) +C" -*D
' #: (^) "*#( C+
(^) ++* " (^) " (^) +D
' #: (^) "* # "
(^) +C *" D
(^) " (^) +'"*5#
(^) 9
E$
+ %9
(^) C048= 0D
)$E
7# " 69
(^) #A( "
(^) * 9
#A(/!: (^) #A( E= = "95- : :
#A(/!:J (^) ="50="51&= *51!%<
#A(/!:& (^) J= 51= 51%<=C -DF
#A(/!: (^) #A( * (^) 7-
#A(/!: (^) #A( (^) " = * (^) 75E&11&F
#A(/!: (^) #A( * (^) 7 E= ,5J= ,
#A(/!: (^) 0=$8:": &=
/%' F
?EG$-
(^) #A( 9
EG$-
(^) #A( 9
# " "
(^) * 9
#/!: (^) + " B 99"C= *D
#/!:J
+ "
(^) " (^) *
#/!:& (^) E=J=+
(^) B" 0=+ (^) B &=)9*F
#/!: (^) "+ "
(^) " (^) *
#/!: (^) E=J=+
(^) B" 0=+ (^) B &=)9*F
#/!: (^) C" +" * !#/! 99*"9D
#/!: (^) + " * E="= F
$ 0 "
(^) * 9
$0/!:
$ 0 "C= D
$0/!:
" -
(^) C ,D
$0/!:
,=* 9E
/%' 5C0U DF5* 9
$0/!:
C " "D
$ 0 "*- 9
$0=CU
/%' D5C U
(^) DB1& ,
(/ $
(^) +
(' $
(^) + "C= D
(/ )G
(^) +
( $"+
( * C= *- D
% *+ (^)
$ (^) " (^) " "
(^) C=%4=$4D
*" "
(^) +
(^) " (^) * 9
(^)
(^) 9
(^) 9
/!0: (^) (^) " (^) *9C=" -D
/!0: (^) 9" " C=9" "D
/!0:J (^) " - 9 * " P
/!0:& (^) EJ010F
/!0:
* 7- C= *7= *75D
/!0:
C=- = D
/!0:
+ C= =9"D
/!0:
* " *
" (^) * 9
C )6
"*D "
C" ^
"*D "
" C &
"9D