



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
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Information about the autumn examinations 2008/2009 for the microprocessor systems ii module (ee206.ii). It includes exam codes, exam duration, instructions, and questions. The questions cover topics such as interrupt priorities, assembly language programming, and lcd interfacing.
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!
Exam Code(s) 2 BN 2 BP Exam(s) Second Electronic Engineering Examination Second Electronic and Computer Engineering Examination Module Code(s) EE206.ii Module(s) Microprocessor Systems II Paper No. 1 Repeat Paper Y External Examiner(s) Prof. G. W. Irwin Internal Examiner(s) Prof. Gearóid Ó Laighin Dr Martin Glavin Dr Fearghal Morgan Instructions: (^) 1. Answer three questions. Question 1 is compulsory and carries 40 marks. Answer any two questions from Q2-4 (30 marks each)
Question 1 is compulsory and carries 40 marks Q1) a) Within the same priority level, which of the following interrupt sources has the highest priority? which of the following interrupt sources has the lowest priority? 3 marks (a) Serial UART Interrupt (b) I2C Interrupt (c) ADC Interrupt (d) External Interrupt 0 (e) Timer Interrupt 0 (f) Power Supply Interrupt b) What type of operation are ORL and SWAP instructions? 2 marks (a) Arithmetic (b) Data (c) Boolean (d) Logical (e) Branch & control (f) none of the above c) Port 2 bit 2 uses ADuC831 pin number 1 mark (a) 1 (b) 33 (c) 10 (d) 30 (e) 45 (f) none of the above d) An ADuC831 uses an external crystal with periodic frequency of 11.059MHz. The maximum time interval possible using a 16-bit timer is nearest to the following time (include your calculations in your answer): 3 marks (a) 11msec (b) 46 msec (c) 66 msec (d) 71msec (e) 17 msec (f) none of the above e) Write short ADuC831 assembly language program segments to implement the following operations. Make sure to incorporate appropriate EQU statements in your code i) X = Y * Z ii) X = Y - Z – 3 iii) IF X < 10 then Y = Z * 2 iv) IF X1 = 2 THEN Y = Y + 4 ELSE Y = 0 12 marks f) The ADuC831 microcontroller reads port P0. If any bits of P0 are clear (‘0’) then the inverse of the port 0 value is output on port 1. Write an ADuC assembly language program segment to implement this function. 8 marks g) What is the least significant bit resolution for a 12-bit ADC using Vref = 2.5V? (include your calculations in your answer): 3 marks (a) 1.6384mV (b) 2.26mV (c) 0.61mV (d) 2.5V (e) 0.244mV h) Summarise the principle of asynchronous serial communication 5 marks i) Which of the following modes does the ADuC831 UART NOT support? 3 marks (a) 8 bit data, variable baud rate (b) 8 bit data, fixed baud rate (c) 9 bit data, variable baud rate (d) 9 bit data, fixed baud rate (e) 8 bit data, synchronous serial shift (f) all of the above
Where assembly code is submitted, include comments in the code to aid clarity. Q3) a) Calculate the number of bytes of program memory occupied by each instruction in the following code snippet 4 marks b) i) Describe the electrical connections used to interface the ADuC831 with a Hitachi HD47780 LCD. 3 marks ii) Sketch the LCD data write access timing diagram and indicate the point where data is transferred to the LCD. 3 marks c) Define the LCD control byte transfer sequence required to configure the LCD as follows: 3 marks 8 - bit operation, 2 line display, 5 x 8 dot character font, turn on display and cursor and automatically shift the cursor to the right on a data write. For question parts d – f, assume that: Default LCD control signal values are RS=0, RW=0 & EN= LCD 8-bit interface is used. The LCD has been initialised. d) Write an assembly code subroutine ( chkLCDBusy ) which checks to ensure that the LCD busy flag is deasserted. Define and use suitable ADuC program variable names. 4 marks e) Write an ADuC831 assembly code subroutine ( wrDatByte2LCD ) which transfers a single data byte to the LCD and then calls subroutine chkLCDBusy. Assume that the data value is stored in the accumulator. 4 marks f) i) Write an ADuC831 assembly code subroutine ( wrDatStr2LCD ) which transfers a message string to the LCD. This program should call subroutine wrDatByte2LCD. 4 marks ii) Use the DB directive method to define the message string as “August 2008 ”. Write a program segment which uses wrDatStr2LCD subroutine to output this string to the LCD. Include handling of a string delimiter character. 5 marks
MOV A,#40h RET
a) Using suitable examples, demonstrate direct and indirect addressing schemes. 4 marks b) Draw a detailed block diagram representation of a successive approximation ADC. Describe the operation of each section and all signals/buses. 5 marks c) Write a code snippet which configures the ADC within the ADuC 831 microcontroller to perform ADC conversions of channel 0, in continuous mode at a rate of 81.31KSPS (assuming an 11.0592MHz clock). 6 marks d) Define ADCCON1, ADCCON2, and ADCCON3 SFR bit settings to provide single sampling and conversion of the ADuC831 on-chip temperature sensor. 6 marks e) Explain the principle and mechanism of serial communication within the ADuC831 (both transmit and receive). Illustrate with timings diagrams. 9 marks