



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
An exam paper for the microprocessor system ii module of the electronic engineering course at a university. The exam covers the aduc831 microcontroller and includes multiple choice questions (mcq), assembly language programming, and serial communication principles. The exam lasts for 2 hours and includes instructions, requirements, and a list of materials. Questions cover topics such as interrupt priorities, assembly language programming, jmp vs call instructions, lcd interface, and adc operation.
Typology: Exams
1 / 5
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 System II
Paper No. 1 Repeat Paper N
External Examiner(s) Prof. Peter Cheung Internal Examiner(s) Prof. Gearóid O’Laighin *Dr Fearghal Morgan Instructions: Question 1 is compulsory and carries 40 marks. Answer any two questions from questions 2, 3 and 4 (30 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 to obtain full marks for questions All programs should be well structured and include clear comments to clarify solution method and program structure Duration 2 hours No. of Pages 5 (incl cover) Department(s) Electronic Engineering Course Co-ordinator(s) Dr Fearghal Morgan
Requirements : MCQ Handout ADuC831 Microconverter data sheet (ADuC831.pdf) pages 2,18-24,55- ADuC831 Microconverter Quick Reference Guide (2 pages) HD44780 instruction set (2 pages) Statistical Tables Graph Paper Log Graph Paper Other Material
Question 1 is compulsory and carries 40 marks. All questions relate to implementation on the ADuC831 microcontroller
a) Within the same priority level, which of the following interrupt sources has the highest 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) Write an ADuC831 assembly language program segment to implement the following operation. Incorporate appropriate EQU statements in your code for variable names. IF X1 = 2 THEN Y := Y + 4 ELSE Y := 0 5 marks
c) Explain the differences between the JMP and CALL instructions 3 marks
d) 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
e) What is the least significant bit resolution for a 12-bit ADC using Vref = 2.5V? 3 marks (a) 1.6384mV (b) 2.26mV (c) 0.61mV (d) 2.5V (e) 0.244mV
f) Summarise the principle of asynchronous serial communication 5 marks
g) A serial interface supports 8-bit data, start bit and stop bit at 9600 baud. How many characters per second transfer can this serial link support? 3 marks (a) 9600 (b) 10 (c) 960 (d) 12 (e) 4096
h) An assembly language program configures the ADuC831 timer 0 to generate an interrupt every 25ms. The timer 0 ISR execute a subroutine timeUpdate at one second intervals. Illustrate (in diagram format) the structure of a modular ADuC831 assembly language program which performs this function. Briefly describe each element and prepare a high level flow chart for each element. 10 marks
Q3) All questions relate to implementation on the ADuC831 microcontroller
a) Calculate the amount of memory occupied by 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. 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 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 “Microprocessor Systems II”. 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,#020h NOP NOP
a) Draw a detailed block diagram representation of a successive approximation ADC. Describe the operation of each section and all signals/buses. 5 marks
b) Write a code snippet which configures the ADC within the ADuC microcontroller, to perform ADC conversions of channel 0, in continuous mode at a rate of 81.31KSPS (assuming an 11.0592MHz clock). 6 marks
c) Define ADCCON1, ADCCON2, and ADCCON3 SFR bit settings to provide single sampling and conversion of the ADuC831 on-chip temperature sensor. 6 marks
d) Define SCON SFR bit settings to configure the serial port for transmit only 4 marks
e) Define T3CON SFR bit settings to provide 9600 baud support using ADuC831 timer 3. 3 marks
f) Write ADuC831 assembly code to transmit a single byte, stored in the accumulator, on the serial port. Include comments explaining the code used. 6 marks