Sie sind auf Seite 1von 3

Birla Institute of Technology & Science, Pilani Work-Integrated Learning Programmes Division Second 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 : 03/04/2010 (FN)

No. of Pages =3 No. of Questions = 4

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.

Q.1 (a). Q.1 (b). Q.1 (c). Q.1 (d). Q.1 (e). Q.1 (f).

Why do most embedded systems use memory-mapped I/O?

How does Target System differ from Final Embedded System? Is data/stack access in Princeton Architecture is easier than data/stack access in Harvard Architecture? Elucidate. Processors/Controllers implemented with some amount of on-board memory and can be interfaced to off-board memory if required. What is the reason behind this arrangement? What is the difference between .exe and a .hex file? What is the difference between normal and Sharing USB Hubs? [2 x 6 = 12]

Q.2. Write Hc12 assembly code to implement the following C conditional.

if (x-y < 3) { a = b-c; x = 0; } else { y = 0; d = e+f+g; } x and y are in consecutive locations. a, b, c, d, e, f, g are in consecutive locations [10]

Q.3. System to be designed: Spirit Level Reaction-time Tester System Requirements: Used for testing the sobriety of a person. The basic system operates like this: When a 'start' button is pressed the unit waits a random time interval (between four and eight seconds) then begins incrementing LEDs on a bar graph display so that they appear to 'rise' upwards. When the user sees the LEDs moving, he/she presses a 'stop' button as early the button is pressed, the fewer LEDs that are lit. The entire bar graph (9 LEDs) will sweep to the top in 0.4 seconds (with 50ms between LED steps).

EEE ZG512 (EC-2 Regular) Second Semester 2009-2010

Page 1 of 3

EEE ZG512 (EC-2 Regular)

Second Semester 2009-2010

Page 2

System Specifications Spirit Level meter features two pushbuttons (Start and Stop) and nine LEDs on a bar graph. When the START button is pressed, a random time delay is generated after which the bottom LED lights. After a 50ms time interval the bottom and the next-highest LED both light. After another delay, the three bottom LEDs light. The process continues until either the STOP button is pressed (in which case the LEDs stop rising or when all LEDs are lit). The program must also check the STOP button just before lighting the bottom LED to ensure the user isn't simply cheating and holding the STOP pushbutton continually. If the user tries to cheat, blink all LEDs several times and simply go back to the start (waiting once again for the START button). Generating a random number: In order to generate a random number, run one timer continually from an internal clock (do not stop it). When the START button is pressed, simply latch the value of the timer - this is essentially random. From that number, one can generate a random delay. The sobriety of a person on a scale of 1- 5 (1 maximum intoxication) has to be displayed on a seven segment display. 3.1 3.2 3.3 What are the on-chip peripherals that you will you use to implement this design and why? Show the complete design for this system. Initialize all the required on-chip peripherals of the micro-controller [18]

Q.4. A system for elevator control has to be designed

System Requirements o The elevator operates along 4 floors. o When not in use the elevator is always on the ground floor. o The elevator can be called by pressing any one of two buttons available on each floor. o One button is up and the other is down. o Whether the elevator stops at the floor or not depends on the direction in which the lift moves. For eg. if the lift is moving in upward direction and the person on say the 2nd floor presses the down button; the lift will not stop in the current journey. When the lift reaches the 3rd floor and starts moving down then the lift will stop at the 2nd floor. o At every floor there is a 7-segment display that indicates the floor in which the lift is right now. The display can be any value from 0 - 3. 0 indicates the ground floor. o Inside the lift - buttons are available for floor selection. o The floor towards which the lift is moving is also displayed within the lift. o Doors to the lift open and close automatically. o When the lift reaches any floor where it has to stop it opens automatically, and it closes when a button called Door Close is pressed. Lift does not move until the door is closed. o System runs from a standard power inlet. System Specifications o An Electro-magnetic system is used for open and close of the door. You just need to provide the on/off control. o A heavy duty servo motor is used for lift movement. You just need to provide the input to the driver circuit. o The inputs are direction (up/down) and a PWM input which control the speed at which the lift moves. The duty cycle can vary from 20% to 50%. o The frequency of the PWM signal is 10 Hz. EEE ZG512 (EC-2 Regular) Second Semester 2009-2010 Page 2 of 3

EEE ZG512 (EC-2 Regular)

Second Semester 2009-2010

Page 3

For detecting whether the lift has reached a floor, the system has a set of three sensors two coarse sensors and a fine sensor. All the sensors are contact switches (i.e) when the lift reaches the point where the sensors are placed, the contact switch gets pushed in. Output of contact switches are low when closed and high otherwise. The sensor arrangement is represented in the fig below Wall along which lift moves Coarse Sensor 1 Fine Sensor Coarse Sensor 2

o o

o o o 4.1 4.2 4.3

On the ground floor only Coarse Sensor1 and Fine Sensor will be available. On the 3rd floor only Coarse Sensor 2 and the Fine Sensor will be available. When the lift starts at the ground floor it starts at a low speed gradually accelerating to the maximum speed. It should operate at maximum speed when it reaches Coarse Sensor 1. As the lift moves up if it has to stop at floor 1, when Coarse Sensor 2 is detected at that floor the lift starts moving at a low speed until it can stop when it reaches Fine sensor. When it starts again it moves at low speeds and reaches the maximum possible speed when it reaches the Coarse Sensor2. The same is done in the reverse direction with the appropriate sensors. Speed at which the lift moves is proportional to the duty cycle. For acceleration, duty cycle has to be gradually increased from 20 % to 50 %. And for deceleration, the duty cycle reduced from 50 % to 20 %. The increase is in steps of 10 % A crystal oscillator of 13.1072 MHz is available. This can be used by the system. A 7447 chip (BCD to seven segment converter) is used for driving the 7-segment displays. 7447 takes a 4-bit BCD value and converts into the corresponding 7-segment equivalent. What are the on-chip peripherals that you will you use to implement this design and why? (Keep the justification as brief as possible. Not exceeding two lines) Show the complete design for this system. Initialize all the required on-chip peripherals of the micro-controller [20]

(Marks will be awarded based on the level of completion and optimality of the design)


EEE ZG512 (EC-2 Regular) Second Semester 2009-2010

Page 3 of 3