



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
Main points of this past exam paper are: Multitasking, External Interrupt, Associated, Intrusion Warning System, Loudspeaker, Door Sensor, Analogue-To-Digital Converter, Detailed Block Diagram, Successive Approximation, Signals
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!
Exam Code(s) 2BN121, 2BP Exam(s) Second Year Electronic Engineering Second Year Electronic and Computer Engineering Module Code(s) EE206.ii Module(s) Microprocessor Systems II Paper No. 1 Repeat Paper N 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. All questions relate to implementation on the ADuC831 microcontroller Q1. a) What type of operations are RET and CJNE instructions considered to be? 3 marks (a) Arithmetic (b) Data (c) Boolean (d) Logical (e) Branch & control (f) none of the above b) Port 3 bit 1 uses ADuC831 pin number 3 marks (a) 1 (b) 17 (c) 10 (d) 22 (e) 45 (f) none of the above Indicate what other function can be implemented using this pin. c) Write short ADuC831 assembly language program segments to implement the following operations. Make sure to incorporate appropriate EQU statements in your code 12 marks 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 d) 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 e) Summarise the principle of asynchronous serial communication. Include timing diagram(s) to illustrate your answer. 6 marks f) P2.3 is an input and represents the open/closed condition of a door (Figure 1a). Opening the door sets P2.3 signal to logic high. P2.3 signal is at logic 0 when the door is closed. Assume that an ADuC831 subroutine delay is available which provides a one second delay function. Write an ADuC831 assembly language program which continuously polls P2.3 to detect if the door is open, and flashes the LED (connected to P1.5) at one second intervals as long as the door remains open. 7 marks Figure 1a
Answer any two questions from Questions 2, 3, and 4 Questions 2, 3 and 4 carry 30 marks each Q2. a) How many channels and at what resolution can the A/D converter in the ADuC831 support? 3 marks b) Write a short description of how multitasking can be achieved on the ADuC831. 4 marks c) If external interrupt 1 (IE1) and watchdog timer interrupt (WDS) occur at precisely the same time, explain which IRQ will be serviced by its associated ISR first. 2 marks d) Using a flowchart, describe a keypad polling strategy for the 4x4 keyboard of Figure 2a, which is directly interfaced to the 8051 microprocessor. 5 marks Figure 2a e) Write an ADuC831 assembly program to set port pin P3.5 when key F is pressed. Follow the strategy submitted in your answer to Q2d. 7 marks f) Draw a detailed block diagram representation of a successive approximation ADC. Describe all signals/buses and the operation of each element. 3 marks g) For the following code segments, calculate the contents of the Accumulator (A), and carry C (in part i), on execution of each instruction 6 marks i) ii)
a) Sketch a diagram of a system incorporating an ADuC831 and Hitachi HD47780 LCD. Include all pin numbers and signal names and indicate their function. 5 marks b) Sketch the LCD data write access timing diagram. Indicate the point on the timing diagram where data is transferred to the LCD. 4 marks c) 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. 4 marks For question parts d – g, assume that: An LCD 8-bit interface is used and that the LCD has been initialised. Default LCD control signal levels are: RS=0, RW=0 & EN= d) Write an ADuC831 assembly code subroutine (named chkLCDBusy ) 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 e) Write an ADuC831 assembly code subroutine (named wrDatByte2LCD ) which (when executed) transfers a single data byte to the LCD and then calls subroutine chkLCDBusy. Assume that the data value is stored in the accumulator and that the LCD device has been initialised for 8-bit operation. 4 marks f) Write an ADuC831 assembly code subroutine ( wrDatStr2LCD ) which (when executed) transfers a string of message characters to the LCD. This program should call subroutine wrDatByte2LCD. 4 marks g) Use the ADuC831 DB directive method to define the message string “Summer 2009”. Write a program segment which uses wrDatStr2LCD subroutine to output this string to the LCD. Include handling of a string delimiter character. 5 marks