



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this exam paper are: Flight-68K, Subroutine, Facilitated, Subroutine, Master Clock, Instructions, Delay Generated, Simplified Block Diagram, Single-Port Parallel, Switches
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!




Autumn Examinations 2008/
Module Code: ELTR
School: Electrical and Electronic Engineering
Programme Title: Bachelor of Engineering in Electronic Engineering – Stage 2
Programme Code: EELXE_7_Y
External Examiner(s): Mr D Denieffe Dr P O’Sullivan
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: Autumn 2009
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) Briefly explain what is meant by a subroutine and describe how subroutines are facilitated in a microcomputer. [5 marks]
(b) The subroutine below is a programmer’s first effort at writing a subroutine to generate a short delay on the Flight-68K microcomputer development system. The code contains a fatal error. Identify the error, explain its effect and show how the subroutine could be rewritten to rectify the mistake.
DELAY MOVE.L #25000,D SUB.L #1,D BNE DELAY RTS [3 marks]
(c) Assuming the master clock on the Flight-68K operates at a frequency of 10MHz and the execution times for the instructions SUB.L and BNE are 12 and 8 MPU cycles respectively, determine the length of the delay generated by the above subroutine, when fixed – show all working. [6 marks]
(d) Write a main program which uses the above subroutine to slowly print out on the Flight-68K system a welcome message stored as a NULL-terminated ASCII string at location $400500. Use system subroutine OUTCH to facilitate printing of the message. [6 marks]
Q2 (a) Draw a simplified block diagram showing the internal structure of a programmable 8-bit single-port parallel input/output chip, and describe the function of each section of the device. How is the MPU able to access each section of this chip? [5 marks]
(b) Use a circuit diagram to show how four switches and four LEDs could be interfaced to the parallel port of the above chip. Give a brief explanation of the circuit action. [4 marks]
(c) With the aid of a simple diagram, explain how the input/output port lines can be configured for the above setup, and write a sample instruction that would facilitate this. [3 marks]
(d) Complete the before-and-after table accompanying this paper. [8 marks]
Q4 (a) In relation to serial data communications, what do the letters UART stand for? [1 mark]
(b) With the aid of a diagram, explain the principle of asynchronous serial datacommunications, and describe how the receiving computer is able to maintain synchronism with the incoming data stream. [5 marks]
(c) Figure 1 below shows how an MC68681 DUART chip might be connected to a 68000 MPU. Carefully analyse the diagram and answer the following questions: (i) identify and state the function of the 68681 chip (ii) describe the function of all lines on the right hand side of the 68681 chip. (iii) what is the purpose of address lines A1-A4 connected to the DUART? (iv) is the DUART an 8-bit or 16-bit device? - explain fully your conclusion (v) explain the function of the crystal connected to the X1 and X2 inputs. [10 marks]
A 1 -A 23
D 0 -D 15
LDS
AS
DTACK
R/W
RESET
D 0 -D 15 D^0 -D^7
D 0 -D 7
DTACK
R/W
RESET
A 5 -A 23 A^1 -A^4 RS 1 -RS 4
CS MC MPU
Address decoder
X 1 X 2
MC DUART
SEN
IP 0 -IP 5
OP 0 -OP 7
RX D B
TX DB
RX D A
TX DA
Figure 1
(d) Table 1 below shows a subroutine called INCH, written to input a character via Port A of the DUART. In relation to the overall task being performed, explain the function of each line of the routine. (^) N.B – see extra data on next page [4 marks]
Table 1
The following information from the Flight-68K manual may be of help to you:
DUART base address: $A Port A status register: $A Port A Rx buffer register: $A
Port A Status Register
Break Frame Parity Overrun TxEMT TxRDY FFULL RxRDY
7 6 5 4 3 2 1 0
SRA