Sie sind auf Seite 1von 2

Birla Institute of Technology & Science, Pilani Distance Learning Programmes Division Second Semester 2006-2007 Comprehensive Examination

(EC-2 Regular) Course No. Course Title Nature of Exam Weightage Duration Date of Exam Note:
1. 2. 3. 4.

: EEE ZG512 : EMBEDDED SYSTEM DESIGN : Open Book : 60% : 3 Hours : 31/03/2007 (FN)

No. of Pages =2 No. of Questions = 5

Please follow all the Instructions to Candidates given on the cover page of the answer book. All parts of a question should be answered consecutively. Each answer should start from a fresh page. Mobile phones and computers of any kind should not be brought inside the examination hall. Use of any unfair means will result in severe disciplinary action.

Q.1 (a) Q.1 (b)

While processing an interrupt for HS12 microcontroller, what will be the time taken to branch to the ISR, if the microcontroller is operating at 8 MHz? [3] Machine A is a non-pipelined machine, whereas machine B is a 4-stage pipeline machine. If the cycle time for both the machines is 12 nsec, what will be the MIPS for both machines? [3] Assume the contents of the HC12 registers as below: X = $0FFF, Y = $320E D = $0214 SP = $1FFF Write instructions for each of the following i. Copy the contents of register B into the memory location $3210 using accumulator offset indexed addressing mode ii. Adds the contents of memory location $2005 with the A register using indexed addressing with auto increment/decrement addressing mode. iii. Move a word from location $2000 to location $1000 iv. Convert the number in location $2000 into its twos complement. [8] The condition of the following pins of MC9S12C32 after reset is BKGD=1; MODB=0; MODA=0. (a) What will be the mode in which MC9S12C32 is functioning? (b) If the mode is to be changed to Normal Expanded Wide with a memory map as shown below: Registers ; $4000 to the allowed space (2K) RAM ; Just after the new allocated space for Registers EEPROM ; unchanged (i) List what registers have to be programmed? (ii) What will be the contents of the registers? (iii) What will be the resultant memory map? [2 + 4 + 2 = 8] An 8-bit number is stored in memory location MEM1 as shown below. D7 D6 D5 D4 D3 D2 D1 D0

Q.1 (c)

Q.2

Q.3

Write an assembly language program to perform bit- reversal and store the new pattern in memory location MEM2 as shown below: D0 D1 D2 D3 D4 D5 D6 D7 [10] Page 1 of 2 PTO

EEE ZG512 (EC-2 REGULAR)

SECOND SEMESTER 2006-2007

PAGE 2

Q.4

Assume that a microcontroller has five interrupt sources (a) Watchdog timer (b) Timer input capture (c) Serial peripheral interface (data transfer complete) (d) Timer output compare (e) ADC (conversion complete). What will be the order of priority that you will assign to the interrupts and why? [4] Design an embedded system for the following specification using MC9S12C32 microcontroller. The system is used for monitoring temperature in a room. There are a set of six sensors placed at different points in the room. The temperature sensors give a uni-polar voltage output 0-4 V for temperatures from 0-50C. The system should read the temperature values from the sensors and should compute the average value. There is an exhaust fan placed in the room for cooling. Based on the temperature the exhaust fan should be rotated at varying speeds. For speed control the duty cycle of a signal whose frequency is 200 KHz should be varied. If the average temperature is below 25C the duty cycle should be 25%. If the average temperature is between 25C to 35C the duty cycle should be 50%. If the average temperature is above 35C then the duty cycle should be 75%. The system should read the temperature and control the speed of the fan accordingly. The temperature monitoring should be done every 1 minute. An interrupt should be raised every 1 minute to the microcontroller to indicate the time. (a) Show the interfacing block diagram of the complete system by indicating various input and output signals. (b) List all the registers and the control words to initialize and fulfill the requirements as above. [24]

Q.5

**********