



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!




Semester 2 Examinations 2010/
Module Code: ELTR
School: Electrical and Electronic Engineering
Programme Title: Bachelor of Engineering in Electronic Engineering Bachelor of Engineering (Honours) in Electronic Systems Engineering
Programme Code: EELXE_7_Y2 EELES_8_Y
External Examiner(s): Dr A Donnellan Mr I Kennedy
Internal Examiner(s): Mr J O’Sullivan
Instructions: Attempt any three questions. All questions carry equal marks. Ensure you return the before-and-after sheet with your answer book.
Duration: Two hours
Sitting: Summer 2011
Requirements for this examination: N/A
Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the correct examination paper. If in doubt please contact an Invigilator.
You are expected to present your answers in a neat and tidy fashion Start each question on a new page Remember that there is plenty of time – two hours to do three questions
Q1 (a) Draw a diagram to show the principle of a stack in a microcomputer. Explain how the stack is used to facilitate subroutines. Mention why the stack is located in the main memory of general purpose computers and explain how the stack is controlled during program execution. [6 marks]
(b) It is required to generate a delay in software using a subroutine. Explain the difference between a variable-length delay subroutine and a fixed-length one and how this matters when calling the subroutine from the main program. [4 marks]
(c) You are required to write a subroutine to generate a delay of 250 ms as part of a control program for an industrial application. A 68000-based computer is used with a master clock frequency of 10 MHz. Using the accompanying MC instruction set, write a fixed-length subroutine for this operation. Show and explain all calculations when determining the length of the delay. You may find the following information useful: Execution times: SUB.L = 16 mpu cycles, BNE = 10 mpu cycles. [8 marks]
(d) Show how this subroutine would be called from the main program. [2 marks]
Q2 Figure 1 attached to this paper shows a section of memory installed in a simple 8-bit microcomputer. Study the diagram and answer the following questions. In each case give reasons for your answer and where appropriate show any calculations or other relevant working.
(a) Are the memory chips in the diagram RAM or ROM? [1 mark]
(b) Determine the overall storage capacity of the memory. [4 marks]
(c) What function is performed by A0 – A9 on the chips? [2 marks]
(d) Explain what is meant by logic conflict and how it is avoided in this circuit. [2 marks]
(e) What overall function is performed by the logic gates on the right? [1 mark]
(f) Analyse the circuit carefully and draw a full addressing map for the memory. [4 marks]
when this line goes HIGH? [2 marks]
(h) Describe fully what happens in the circuit in Figure 1 when the MPU executes the instruction MOVE.B $BC00,D0 [4 marks]
Q4 (a) Draw a diagram and explain the action of the simplest possible 8-line parallel port, either input or output, that could be implemented on a microcomputer. [6 marks]
(b) Briefly explain how the parallel input/output device used in the Flight-68K differs from the circuit in (a) above. [2 marks]
(c) Figure 2 below shows how parallel input/output is facilitated in the Flight-68K. Carefully analyse the diagram and answer the following questions: i) identify and state the function of the 68230 chip ii) describe in detail the function of all lines on the right hand side of the 68230 chip. Don’t forget to mention the purpose of lines H1-H4. iii) what is the purpose of address lines A1-A5 connected to the 68230? iv) is the chip an 8-bit or 16-bit device? - explain fully your conclusion v) describe the function of the NAND gate in of the diagram. [8 marks]
(d) Draw a sketch to show how a simple on/off switch would be interfaced to an input port. If eight such on/off switches were interfaced to Port A, write a program segment that would continuously check the switches until one of them was found to be closed. Assume Port A is located at $800001. [4 marks]
A 1 -A 23
D 0 -D 15
LDS
AS
DTACK
R/W
CLK
RESET
D 0 -D 15 D^0 -D^7
D 0 -D 7
DTACK
R/W
CLK
RESET
A 6 -A 23 A^1 -A^5 RS 1 -RS 5
CS MC MPU
Address decoder MC PI/T
PA 0 -PA 7
PB 0 -PB 7
PC 0 -PC 7
H 1 H 2 H 3 H 4
PEN
Figure 2
Semester 2 Examinations 2010/
Module Title: Microprocessor Systems 2
BEFORE-AND-AFTER TABLE
Question 3(a)
Name: Return this sheet with your answer book
X N Z V C
0 1 0 1 0
Registers before Flags before^ Instruction Registers after Flags after
D0: 98765432
D1: 23456789
D0: 19A42B6A
D1: B72D
D0: 7125BA9C
1 1 0 1 0 X N Z V C
X N Z V C 1 0 0 1 0
MOVE.L D0,D
SUB.B D1,D
EOR.B #$F0,D
D0: D1:
X N Z V C
D0: D1:
X N Z V C
D0: X N^ Z^ V^ C
D0: 41D60783 X N^ Z^ V^ C 0 1 0 1 0
LSR.B #2,D0 D0: X N^ Z^ V^ C