



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
The instructions and questions for the microprocessor systems engineering ii exam held in autumn 2011-2012 for students of electrical & electronic engineering and electronic & computer engineering. The exam covers topics such as instruction functions, adc resolution, conditional branching instructions, program memory space, and timer counting. Instructions for candidates, required handouts, and the questions themselves.
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Autumn Examinations 201 1 - 2012 Exam Code(s) 2BLE, 2BP, 2BEI, 2BEE Exam(s) Second Year Electrical and Electronic Engineering Second Year Electronic and Computer Engineering Second Year Engineering Innovation - Electronic Second Year Sports and Exercise Engineering Module Code(s) EE206.ii Module(s) Microprocessor Systems Engineering II Paper No. 1 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 Question 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 pages (including cover page) Discipline(s) Electrical & Electronic Engineering Requirements : Handout HD44780 instruction set (2 pages) ADuC831 microconverter quick reference guide (2 pages) ADuC831 microconverter datasheet (pp. 2, 18- 24 , 55-58)
Question 1 (a) For each of the instructions RET, DJNZ, JBC, MOVC and NOP, state the function of the instruction, and indicate the operational type of each instruction from the following list of types: 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 V? (Include calculations in your answer.) [5 marks] (c) Explain the main differences between the LJMP, SJMP and AJMP conditional branching instructions. [5 marks] (d) Calculate the amount of program memory space occupied by each instruction in the following code snippet. [5 marks] CLR A MOVC A, @A+DPTR PUSH A MOV A, #042H NOP NOP (e) An ADuC831 uses an external crystal oscillator with a periodic frequency of 11. MHz. How many counts of the internal ADuC831 timer (in 16-bit mode) are required to measure a time interval of 10 ms? How is this implemented in assembly? [5 marks] (f) Write short ADuC831 assembly language program segments to implement each of the two conditional operations listed below. (Make sure to incorporate the appropriate EQU statements in your code.) [5 marks] IF X1 = 4 THEN Y = Y + 2 ELSE Y = 0 IF X < 3 then Y = Z * 4
Question 3 (Please refer to the HD44780 handout where appropriate for this question.) (a) Describe the function of each of the three control signals EN, RS and RW for a Hitachi HD44780 LCD device. [ 5 marks] (b) Assume that some ASCII characters are stored on an ADuC831 in its internal RAM locations 30H to 7FH. The partial assembly language program shown below will continually display these characters on an HD44780 LCD device, 16 characters at a time. Explain the function of each line of code below, and write the missing OUT function that will output the data on the bus. [15 marks] MAIN: ACALL INIT MOV COUNT, # STRT: MOV PTR, #30H NEXT: MOV A, @PTR ACALL DISP INC PTR DJNZ COUNT, TEST MOV COUNT, # ACALL REDO TEST: CJNE PTR, #80H, NEXT SJMP STRT INIT: MOV A, #38H ACALL WAIT CLR RS ACALL OUT MOV A, #0EH ACALL WAIT CLR RS ACALL OUT REDO: MOV A, #01H ACALL WAIT CLR RS ACALL OUT MOV A, #80H ACALL WAIT CLR RS ACALL OUT RET DISP: ACALL WAIT SETB RS ACALL OUT RET WAIT: CLR RS SETB RW SETB DBUS. SETB EN CLR EN JB DBUS.7, WAIT RET OUT: ...
Question 4 (a) For the Arduino microcontroller, write a sketch that turns on and off the onboard LED (pin 13) to transmit the Morse code for ‘MESSI’, i.e. ‘dash dash shortgap dot shortgap dot dot dot shortgap dot dot dot shortgap dot dot’, assuming that a unit is of one second duration, and Morse code is composed of the following five elements: