Docsity

Microcomputer Development System - Microprocessor Systems - Exam, Exams of Microprocessors

Toggle sidebar
bg1
CORK INSTITUTE OF TECHNOLOGY
INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ
Autumn Examinations 2012
Module Title: Microprocessor Systems 2
Module Code: ELTR6017
School: Mechanical, Electrical and Process Engineering
Programme Title: Bachelor of Engineering in Electronic Engineering
Programme Code: EELXE_7_Y2 , EELES_8_Y2
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: Autumn 2012
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
pf3
pf4
pf5

Partial preview of the text

Download Microcomputer Development System - Microprocessor Systems - Exam and more Exams Microprocessors in PDF only on Docsity!

CORK INSTITUTE OF TECHNOLOGY

INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ

Autumn Examinations 2012

Module Title: Microprocessor Systems 2

Module Code: ELTR

School: Mechanical, Electrical and Process Engineering

Programme Title: Bachelor of Engineering in Electronic 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: Autumn 2012

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 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]

Q2 (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 approximate length of the delay generated by the above subroutine, when fixed – show all workings. [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]

Q4 (a) In relation to serial data communications, what do the letters UART stand for? [1 mark]

(b) With the aid of a timing 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 2 below shows how an MC68681 DUART chip might be connected to a 68000 MPU. Carefully analyse the diagram and answer the following questions: (i) What function is performed by the 68681 chip? (ii) Describe the function of all input/output lines on the 68681 chip. (iii) How many internal registers are in the 68681? What do they do? (iv) Is the DUART an 8-bit or 16-bit device? - explain your conclusion (v) What is the purpose of the device 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

RXDB

TXDB

RXDA

TXDA

Figure 2

(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]

INCH MOVEA.L #$A00001,A

WAIT MOVE.B 2(A0),D

LSR.B #1,D

BCC WAIT

MOVE.B 6(A0),D

RTS

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