You are on page 1of 1

Birla Institute of Technology & Science, Pilani Distance Learning Programmes Division First Semester 2008-2009 Comprehensive Examination

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

: EEE ZG512 : EMBEDDED SYSTEM DESIGN : Open Book : 60% : 3 Hours : 27/09/2008 (FN)

No. of Pages =1 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 used inside the examination hall.

Q.1

Write initialization and the interrupt service routines to configure Timer Channel 2 in input capture mode. When a falling edge is detected the counter will count the number of falling edges and then the value should be displayed to one of the ports. [8] Give the register details for generating a 3 KHz PWM output on channel 3 of the C32 microcontroller. Show what will be the contents of the duty register for variable duty cycle of 35% and 65%. [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 Narrow 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] Write a program to find the factorial of a number stored in location NUM. Store the result from the location FACT. (Choose any number between 1-12). The algorithm should be recursive in nature. [10] Design an embedded system for the following specification using MC9S12C32 microcontroller. The system is used for monitoring and controller temperature inside in a room. There are a set of four 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 are four ac vents placed in the room for cooling. Based on the temperature the ac vents should be opened or closed. A fan is also provided as an optional cooling device in cases when a person does not want the ac vents to be on. The fan rotates at two varying speeds. For speed control the duty cycle of a signal whose frequency is 20 KHz should be varied. If the average temperature is below 35C the duty cycle should be 20%. If the average temperature is above 35C the duty cycle should be 55%. The system should read the temperature and control the speed of the fans 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 word to initialize and fulfill the requirements as above. [26]

Q.2

Q.3

Q.4

Q.5.

You might also like