You are on page 1of 2

Birla Institute of Technology & Science, Pilani Work-Integrated Learning Programmes Division First Semester 2009-2010 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 : 24/10/2009 (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 used inside the examination hall. Use of any unfair means will result in severe disciplinary action.

List the pseudo codes to change the memory map of the C32 microcontroller from Special Single chip to Normal Expanded Narrow Mode by properly indicating the bit values of registers required to remap. Q.1 (b). Write instructions to elevate the priority of Timer Channel 4 as the highest one. [3 + 2 = 5] Q.2. An 8-bit number is stored in memory location MEM1 as shown below.
Q.1 (a).

D7 D6 D5 D4 D3 D2 D1 D0 Write an assembly language program to perform bit- reversal and store the new pattern in memory location MEM2 as shown below: D0
Q.3.

D1

D2

D3

D4

D5

D6

D7 [10]

Two LEDs and two switches are attached to Port T of a 9s12C32 controller as shown below. The other 4 bits of Port T are used for other unrelated tasks. Note: when the switch is pushed the input becomes 0.

3.1

Devise your logic and write pseudo codes (like READ, IF, ELSE, AND, OR etc.) that continuously reads the two inputs. After reading the value of the two switches you should turn on both LEDs if either switch is pressed or turn off both LEDs if both switches are not pressed. If you were asked to use the switch connected at PT3 as input capture which generates an interrupt, indicate the required registers that will be used for this purpose with the corresponding bit values you will have to program. [6 + 4 = 10] Page 1 of 2

3.2

EEE ZG512 (EC-2 Regular)

EEE ZG512 (EC-2 Regular)


Q.4.

First Semester 2009-2010

Page 2

What is the difference between output compare based PWM wave and the one which is generated using PWM module? Give the register details and calculations for generating a 5.5 KHz PWM output on PWM channel 2 of the C32 microcontroller with a duty cycle of 55%. [9] Design an embedded system which controls parking of cars with the following specification using MC9S12C32 microcontroller. a) The basement of a building is being used as parking area with a maximum capacity of 200 cars. b) There is a separate entry and exit point. c) At any given time only one car can enter or exit (use separate sensors). d) If the numbers of cars inside the parking are more than 200 the doors are deactivated (i.e. no further entry) and one LED should be activated to indicate FULL at the entry door. e) The parking area is monitored for rise in temperature by means of six sensors placed at different points. f) The temperature sensors give a uni-polar voltage output 0-4.5 V for temperatures from 0-50C. The system should read the temperature values from the sensors and should compute the average value. g) Four large induction fans placed in the parking room are used for cooling the parking. Based on the temperature the ac vents should be opened or closed. These fans rotate 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. h) The temperature monitoring should be done every 30 seconds. An interrupt should be raised every 30 seconds to the microcontroller to indicate the time.

Q.5.

5.1. 5.2. 5.3. 5.4.

List the various units of 9S12C32 that will be used for controlling the parking of cars. Give the complete block diagram showing all the internal modules that you are going to use. State the purpose and justify the choice of various units you have selected. Specify the register details used by each unit and the modes configured if any. [26]

*********

EEE ZG512 (EC-2 Regular)

Page 2 of 2

You might also like