UART - Microprocessor Systems - Exam, Exams of Microprocessors

Main points of this exam paper are: UART, Embedded Controller, Addressing Mode, Memory Addressing, Explain, Addressing Mode, Powerful, Operation, Elementary Parallel, Input Port

Typology: Exams

2012/2013

Uploaded on 04/13/2013

kajol-ajay
kajol-ajay 🇮🇳

4.9

(7)

90 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Cork Institute of Technology
Bachelor of Engineering in Electronic Engineering – Stage 2
(EELXE_7_Y2)
Summer 2008
MICROPROCESSOR SYSTEMS
(Time: 3 Hours)
Answer Question 1 [40 marks] and any
three other questions [20 marks each]
Maximum available marks is 100
Examiners: Mr. J. J. O’Sullivan
Mr. D. Denieffe
Dr. P. O’Sullivan
Q1 (a) Draw a simple diagram showing the main parts of a microcomputer.
What do you understand by the term embedded controller?
(b) What do you understand by the term two’s complement as applied to numbers in a
computer?
Determine the two’s complement of $497B.
(c) There are two logical errors in the delay subroutine below. Identify and explain
the error in each case.
DELAY MOVE.L #307692,D0
SUB.B #1,D0
BNE DELAY
RTS
(d) Name the memory addressing mode used in the following instruction:
MOVE.W (A0)+,D0
In your own words, fully explain the operation carried out by this instruction.
Indicate why this addressing mode is so powerful when writing programs.
(e) Explain briefly how the CMP instruction works.
Two 8-bit unsigned values, P and Q, are stored in D0 and D1 respectively. Write a
program segment to branch somewhere if Q is less than or equal to P.
(f) Draw a circuit diagram of an elementary parallel input port.
Briefly explain how it is arranged that this port has its own unique address.
(g) What do the letters UART stand for?
Draw a simplified diagram showing the internal structure of such a device.
Is this device intended for serial or parallel operation?
(h) What is the purpose of a data direction register in a parallel input/output chip?
Draw a simple diagram to show the relationship between this register and the i/o
lines of the chip.
pf3
pf4
pf5
pf8

Partial preview of the text

Download UART - Microprocessor Systems - Exam and more Exams Microprocessors in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Engineering in Electronic Engineering – Stage 2

(EELXE_7_Y2)

Summer 2008

MICROPROCESSOR SYSTEMS

(Time: 3 Hours)

Answer Question 1 [40 marks] and any three other questions [20 marks each] Maximum available marks is 100

Examiners: Mr. J. J. O’Sullivan Mr. D. Denieffe Dr. P. O’Sullivan

Q1 (a) Draw a simple diagram showing the main parts of a microcomputer. What do you understand by the term embedded controller?

(b) What do you understand by the term two’s complement as applied to numbers in a computer? Determine the two’s complement of $497B.

(c) There are two logical errors in the delay subroutine below. Identify and explain the error in each case. DELAY MOVE.L #307692,D SUB.B #1,D BNE DELAY RTS

(d) Name the memory addressing mode used in the following instruction: MOVE.W (A0)+,D In your own words, fully explain the operation carried out by this instruction. Indicate why this addressing mode is so powerful when writing programs.

(e) Explain briefly how the CMP instruction works. Two 8-bit unsigned values, P and Q, are stored in D0 and D1 respectively. Write a program segment to branch somewhere if Q is less than or equal to P.

(f) Draw a circuit diagram of an elementary parallel input port. Briefly explain how it is arranged that this port has its own unique address.

(g) What do the letters UART stand for? Draw a simplified diagram showing the internal structure of such a device. Is this device intended for serial or parallel operation?

(h) What is the purpose of a data direction register in a parallel input/output chip? Draw a simple diagram to show the relationship between this register and the i/o lines of the chip.

(i) Showing all working, determine the storage capacity of the RAM chip in Fig 1 below.

GND 9 10 R/W

CS 8 11 D

A2 7 12 D

A1 6 13 D

A0 5 14 D

A3 4 15 A

A4 3 16 A

A5 2 17 A

A6 1 18 Vcc

Figure 1

(j) How many bytes of memory exist between locations $400400 and $400600?

[4 marks each – 40 marks in total]

Q2 (a) Giving examples of each, briefly explain the difference between high-level and low-level programming languages. [4 marks]

(b) A table of 100 16-bit values is stored in memory starting at location $400500. You are required to write a program, which will count the number of even values stored in the table, (note that all even values end with a zero).

i) Write a short paragraph to outline your plan for the program. [4 marks] ii) Draw a flowchart showing the main steps in the program. [4 marks] iii) With the aid of the accompanying 68000 instruction set, write the program in assembly language with appropriate comments. [8 marks]

Q3 (a) On the instruction set accompanying this paper, what do the column headings, #, Dn, An, .........d(PC), d(PC,Ri) refer to? What is the significance of the asterisks (*) in these columns? [4 marks]

(b) What is the significance of the asterisks (*) in the columns headed X N Z V C on the instruction set? [1 mark]

(c) The following addition is carried out by the 68000 MPU: $D64A + $D64A = $1AC Using one sentence in each case, state how the flags, X, N, Z, V and C are affected by this operation. [5 marks]

(d) Complete and return the before-and-after sheet attached to this paper. [10 marks]

Q5 (a) Draw a block diagram showing the internal details of the 68000 MPU. [8 marks]

(b) Explain what is meant by a stack in a computer and what function it performs. [4 marks]

(c) Identify the MPU register in the 68000 MPU, which controls the stack and with the aid of a diagram explain how the stack operates in a last-in-first-out manner. [6 marks]

(d) Give examples of 68000 assembly language instructions that can be used to push data onto and pop data off the stack. [2 marks]

Q6 (a) Draw a block diagram of the 68230 PI/T and briefly explain the function of each group of lines found on this device. What do the letters PI/T stand for? [8 marks]

(b) The following hardware is connected to Port A of the PI/T: Two simple on/off switches connected to i/o lines 0 and 1 A green LED connected to i/o line 6 and a red LED to i/o line 7 Draw a circuit diagram to show how this arrangement would be wired up. [6 marks]

(c) Table 1 below shows a program segment, which controls the hardware in (b). Assuming the PI/T is already properly configured, analyse the code in Table 1 and describe in terms of the switches and LEDs, the function performed by each instruction in the table. [6 marks]

MOVEA.L #$800001,A

MOVE.B #$80,$10(A0)

XXX MOVE.B $10(A0),D

AND.B #$03,D

BNE XXX

MOVE.B #$40,$10(A0)

Table 1

The following information from the Flight-68K manual may be of help to you:

PI/T base address: $ Port A data register: $

Higher Certificate in Engineering in Electronic Engineering

MICROPROCESSOR SYSTEMS

Summer 2008

BEFORE-AND-AFTER SHEET

Question 3(d)

Name: _______________________ Return with your answer book

X N Z V C

0 1 0 1 0

Registers before Flags before Instruction Registers after Flags after D0: BA D1: 456789AB D0: E1085D9E D1: B3A1C D0: 264B396D D1: 62B4939A

D0: FEDCBA

1 0 0 1 0 X N Z V C 1 1 0 1 0 X N Z V C

X N Z V C 1 0 0 1 1

MOVE.W D1,D

ADD.W D0,D

CMP.B D0,D

AND.B #$0F,D

D0: D1:

X N Z V C

D0: D1:

X N Z V C

D0: D1:

X N Z V C

D0: X^ N^ Z^ V^ C

D0: 01234567 X^ N^ Z^ V^ C 1 1 1 0 0

LSR.B #2,D0 D0: X^ N^ Z^ V^ C