



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
Exam questions from the microprocessor systems module of the bachelor of engineering in electronic engineering program at cork institute of technology. The questions cover various topics such as memory organization, two's complement, instruction execution, addressing modes, and serial communications. Students are required to answer question 1 with 40 marks and any three other questions with 20 marks each. The document also includes diagrams and subroutines.
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Answer Question 1 [40 marks] and any three other questions [20 marks each] Maximum available marks is 100
Examiners: Mr J O’Sullivan Mr D Denieffe Dr P O’Sullivan
Q1 (a) How many bits in a byte, a word, a longword? Rewrite the line of memory data below as it would appear on the Flight-68K computer screen after the following instructions have all been executed: 400500: 0000 0000 0000 0000 0000 0000 0000 0000 i) MOVE.W #$FEDC,$ ii) (^) MOVE.L #$6789ABC,$40050A iii) MOVE.B #20,$
(b) What do you understand by the term two’s complement as applied to numbers in a computer? List in ascending order of magnitude the following two’s complement numbers: F286 5E2B 9D4C 0000 1C3A B24E
(c) In your own words, explain how the instruction (^) CMP.W D0,D1 works. Assuming D0.W = $5678 and D1.W = $8765, what will happen after the following program segment is executed? CMP.W D0,D BGE LABEL
(d) Name all addressing modes used in the instructions below and explain the difference between the two instructions. MOVE.L #400500,D MOVE.L $400500,D
(e) Identify and explain each item of information in the line of code below: 00400400 A07B0064 ADD.W #100,D
(f) List the main parts of a microcomputer and briefly describe the function of each.
(g) Write down a list of all pins you would expect to find on a 4kByte byte-organised RAM chip – show all working.
(h) With the aid of a simplified block diagram, describe the function of each register found in a programmable parallel input/output port.
(i) It is required to input any 8-bit binary number to a computer through a parallel port. Draw a diagram using simple on/off switches to show how this can be done – give a brief explanation of the circuit.
(j) It is required to transmit the ASCII character “K”, (4Bhex ), in 8-bit asynchronous serial format. Draw a timing diagram to show how this is accomplished.
[4 marks each – 40 marks in total]
Q2 (a) What is the difference between high-level and low-level programming languages?[4 marks]
(b) Outline three advantages that programs written in a low-level language have over programs written in a high-level language. [3 marks]
(c) Briefly explain how a delay can be generated using a software routine. [3 marks]
(d) Write a subroutine for the Flight-68K computer that will generate a delay whose length may vary from a few microseconds to a number of hours. [4 marks]
(e) Show how this subroutine might be called by a main program to generate a delay of one second. The following information may be needed - Execution times: SUB.L = 16 mpu cycles, BNE = 10 mpu cycles Flight-68K master clock: 8 MHz [6 marks]
Q3 (a) What is the difference between signed and unsigned numbers? [2 marks]
(b) By means of an outline table in each case, show the range of values that can be represented by 8-bit signed and unsigned binary numbers. [4 mark]
(c) Of the five status flags, X, N, Z, V and C, in the MC68000 MPU, explain how some of these are used to distinguish between signed and unsigned numbers. [4 marks]
(d) Complete and return the before-and-after sheet attached to this paper. [10 marks]
Q4 (a) In the main memory of a 68000-based computer, briefly describe the function of the following control lines: AS UDS LDS R / W DTACK [5 marks]
(b) Draw a detailed circuit diagram to show how two 32kByte byte-organised chips would be connected in a 68000-based computer to implement a 64kByte block of fast RAM, paying particular attention to the above control lines. [10 marks]
(c) With the aid of an addressing map, show how the block of RAM could be positioned in memory with a base address of $E70000. [5 marks]
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
Q6 (a) Draw a block diagram showing the internal structure of the 68000 MPU and outline the function of each section in the device. [10 marks]
(b) What is the difference between logical errors and syntax errors in a computer program? [3 marks]
(c) The program segment in Table 2 below was intended to fill a 300-word block of memory starting at address $400500 with the data word $AAAA. Unfortunately the programmer made an error in each line of the program. Identify each error and state whether it was a logical error or a syntax error. [7 marks]
MOVEA.L #$400500.A0 Set start addrs MOVE.W D0,#300 Set block length MOVE.W $AAAA,D1 Set fill value FILNXT MOVE.W D1,(A0) Fill indexed loc SUB.B #1,D0 Block all full? BEQ FILNXT No, fill next loc TRAP #1 Yes, done
Table 2
Break Frame Parity Overrun TxEMT TxRDY FFULL RxRDY
7 6 5 4 3 2 1 0 SRA
Bachelor of Engineering in Electronic Engineering
MICROPROCESSOR SYSTEMS
Autumn 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: 33221100 D1: 456789AB D0: E1085D4E D1: B3A137A
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
SUB.W D1,D
CLR.B D
OR.B #$F0,D
D0: D1:
X N Z V C
D0: D1:
X N Z V C
D1: X^ N^ Z^ V^ C
D0: X^ N^ Z^ V^ C
D0: 01234567 X^ N^ Z^ V^ C 1 1 1 0 0
LSL.B #1,D0 D0: X^ N^ Z^ V^ C