Docsity

Each Instruction - Microprocessor Systems Engineering II - Past Exam Paper, Exams of Materials science

Toggle sidebar
bg1
EE206.ii Microprocessor Systems Engineering II Page 1 of 5
Semester II Examinations 2010/2011
Exam Code(s)
2BN121, 2BP121, 2BEI121, 2BEE121
Exam(s)
Second Electronic Engineering
Second Electronic & Computer Engineering
Second Engineering Innovation - Electronic
Second Sports & Exercise Engineering
Module Code(s)
EE206.ii
Module(s)
Microprocessor Systems Engineering II
Paper No.
1
Repeat Paper
External Examiner(s)
Prof. G.W. Irwin
Internal Examiner(s)
Prof. G. Ó Laighin
Dr. J.G. Breslin
Instructions:
Answer Question 1 and any two other questions.
Question 1 is compulsory and carries 30 marks.
Questions 2, 3 and 4 carry 20 marks each.
Candidates should note that marks may be lost if answers are
not presented in a neat and legible format. Include rough-
work calculations. Provide adequate information in your
answers to illustrate your understanding.
All programs should be well structured and include clear
comments to clarify the solution method and program
structure.
State any assumptions made in your answers.
Duration
No. of Pages
Discipline(s)
Course Co-ordinator(s)
Requirements:
Handout
1. HD44780 instruction set (2 pages)
2. ADuC831 microconverter quick reference guide (2 pages)
3. ADuC831 microconverter datasheet (pp. 2, 18-24, 55-58)
pf3
pf4
pf5

Partial preview of the text

Download Each Instruction - Microprocessor Systems Engineering II - Past Exam Paper and more Exams Materials science in PDF only on Docsity!

Semester II Examinations 2010/

Exam Code(s) 2BN121, 2BP121, 2BEI121, 2BEE Exam(s) Second Electronic Engineering Second Electronic & Computer Engineering Second Engineering Innovation - Electronic Second Sports & Exercise Engineering

Module Code(s) EE206.ii Module(s) Microprocessor Systems Engineering II

Paper No. 1 Repeat Paper

External Examiner(s) Prof. G.W. Irwin Internal Examiner(s) Prof. G. Ó Laighin Dr. J.G. Breslin

Instructions: Answer Question 1 and any two other questions. Question 1 is compulsory and carries 30 marks. Questions 2, 3 and 4 carry 20 marks each. Candidates should note that marks may be lost if answers are not presented in a neat and legible format. Include rough- work calculations. Provide adequate information in your answers to illustrate your understanding. All programs should be well structured and include clear comments to clarify the solution method and program structure. State any assumptions made in your answers.

Duration 2 hours No. of Pages^5 Discipline(s) Electrical & Electronic Engineering Course Co-ordinator(s)

Requirements : Handout 1. HD44780 instruction set (2 pages)

  1. ADuC831 microconverter quick reference guide (2 pages)
  2. ADuC831 microconverter datasheet (pp. 2, 18-24, 55-58)

Compulsory Question [30 marks total]

(a) For each of the instructions RRC, DJNZ, JBC, MOVC and NOP, state the function of each instruction, and indicate the operational type of each instruction from the list below:

  • Arithmetic; Data; Boolean; Logical; Branch and control; None of the above [5 marks] (b) What is the least significant bit resolution for a 12-bit ADC using Vref = 2.5 V? (Include calculations in your answer.) [5 marks] (c) Calculate the amount of program memory space occupied by each instruction in the following code snippet.

CLR A MOVC A, @A+DPTR PUSH A MOV A, #020H NOP NOP [5 marks] (d) An ADuC831 uses an external crystal oscillator with a periodic frequency of 11.059 MHz. How many counts of the internal ADuC831 timer (in 16-bit mode) are required to measure a time interval of 50 ms? How is this implemented in assembly? [5 marks] (e) Write a short ADuC831 assembly language program segment to implement the operation(s) listed below. (Make sure to incorporate the appropriate EQU statements in your code.)

  • IF X1 = 2 THEN Y = Y + 4 ELSE Y = 0 [5 marks] (f) Calculate, with an example, the maximum value of interrupt latency for the ADuC831. [5 marks]

[20 marks total]

(a) Explain the function of the Hitachi HD47780 LCD device busy flag and its behaviour during the transfer of a data byte from the ADuC831 to the LCD device. [3 marks] For parts (b) to (e), you should assume that: An LCD 8-bit interface is used and the LCD has been initialised for 8-bit operation. The default LCD control signal levels are RS=0, RW=0 and EN=1. (b) Write an ADuC831 assembly code subroutine (named checkLCDBusy) which, when executed, continues to poll the LCD busy flag until the busy flag is deasserted. Define and use suitable ADuC831 program variable names. [4 marks] (c) Write an ADuC831 assembly code subroutine (named writeByteToLCD) which, when executed, transfers a single data byte to the LCD and then calls the subroutine checkLCDBusy. Assume that the data value is stored in the accumulator. [4 marks] (d) Write an ADuC831 assembly code subroutine (named writeStringToLCD) which, when executed, transfers a string of message characters to the LCD. This program should call the subroutine writeByteToLCD. [4 marks] (e) Use the ADuC831 DB directive method to define the message string “Banksy was here”. Write a program segment which uses the writeStringToLCD subroutine to output this string to the LCD. Include handling of a string delimiter character. [5 marks]

[20 marks total]

(a) Draw the flow chart for a simple key press polling sequence on a 4×4 matrix keypad connected to an ADuC831. [7 marks] (b) Outline an approach for an advanced key press polling sequence that avoids having to hard code each of the sixteen key press scenarios. (You need not write the code, just outline how it would work as opposed to the simple approach in part (a).) [4 marks] (c) For the Arduino microcontroller, write a sketch that turns on and off the onboard LED (pin

  1. in the Morse code-style SOS sequence ‘· · · — — — · · ·’, assuming that a unit is of one second duration, and Morse code is composed of the following five elements:
  • short mark, dot or 'dit' (·) — 'dot duration' is one unit long;
  • longer mark, dash or 'dah' (–) — three units long;
  • inter-element gap between the dots and dashes within a character — one unit long;
  • short gap (between letters) — three units long;
  • medium gap (between words) — seven units long. [9 marks]