EE Dept, IIT Bombay
EE 712 Embedded Systems Design
Spring 2010 / Mid-semester Examination
Saturday, 20.Feb.2009, 1730 -- 1930
Note: Answer all the FOUR questions. Marks: 5 + 5 + 10 +10 = 30.

Q.1 A) Briefly compare the merits and demerits of single-ended and differential
signal interconnections.
B) How should an unused CMOS input be connected and why?
C) Briefly compare the uses of the I/O pins with open drain, internal passive
pull-up, and tri-state outputs.
D) Give the circuit for interfacing a key, with hardware debouncing, to a CMOS
input. The input should be low when the switch is closed. Assume that bounce
can last up to 5 ms. Taking a 10 µF capacitor, find the appropriate value of
[1+1+1+2 = 5 marks]
Q.2 A) An array of 8 LED's is to be interfaced to output pins which can source as
well as sink current. Show the circuit for scanned interfacing, with first priority
to minimize the number of pins and the second priority to minimize the number
of resistors. Select the appropriate value of the current limiting resistors,
assuming an average current of 5 mA for a properly lit LED.
B) Redraw the circuit for the above LED interfacing, assuming all the outputs to
be open drain type. While the first priority remains minimizing the number of
output pins, the second priority is to minimize the external transistors.
C) Briefly describe the key advantages and challenges in RISC architecture.
[2+2+1 = 5 marks]
Q.3 Explain the following with illustrative examples for the ARM architecture:
A) What is the advantage of using PC relative addressing for loading a constant
in a register from a literal pool? Illustrate by an assembly language example. (No
pseudo instructions are to be used).
B) How are calls and returns managed in an ARM based system? Explain with
the example of a main routine calling a subroutine, which then calls another
subroutine. Show how the return addresses can be saved in a stack using load
and store instructions. (Assume that we want to use a pre-decrement, post-
increment kind of stack).
C) Describe the sequence of events which take place after an FIQ interrupt
occurs. How does the interrupt handler return control to the program which was
running when the interrupt occurred? What are the facilities available in FIQ
mode which are not there in the ordinary interrupt mode?
D) Suppose an ARM based system is running in the “Thumb” state when an
interrupt occurs. The interrupt service routine uses the ARM instruction set.
Explain how the change over occurs between the two instruction sets as we enter
the interrupt service routine and when we return from it.
[2+3+2+3 = 10 marks]

[R5. Rn : (Rd=Rn+Rm*Rs) Long Multiply: SMULL (signed mult). OR or XOR) BIC (Bit Clear. (c) calculate a value which depends on these two parameters.PAPER ENDS ---------------- . (b) or (c) to be the external inputs. A test can return only a yes or no answer. discard result) CMN (Add to set flags. Associated with either answer is an action and a next state Give only the state diagram and the associated data structure. No program needs to be written. UMLAL (unsigned multiply accumulate). SUB. The state diagram should use tests and actions.} OP2: OP2 through shifter MOV (move). [10 Marks] REFERENCE DATA ARM Data Processing Instructions: Instr{Cond. MRS{Con} SR. the user can take any of the following actions: (a) define parameter 1. Subtr with carry) TST (AND to set flags. ADC. Rm. If the user asks for a calculation without defining both parameters. SUBC RSB (Reverse Subtract). EOR: (AND. Rm. load R2 from address=updated R5 -------------------. an error message is issued.# 8] : Load R2 from address R5+8 STR R2. Load-Store Instructions: LDR. asking for a calculation prints the results and makes both parameters undefined. SR : (Status reg to reg). SMLAL (signed multiply accumulate). ORR. MVN (move not). #-1]! : R5=R5-1.Rd=Rn AND NOT OP2 ADD. If both parameters were defined. AND. discard result) CMP (Subtract to set flags. Examples: LDR R2. (b) define parameter 2. discard result) Multiply: 32bit MUL{Con}{S} Rd.Q. [R5. Defining a parameter again before asking for a calculation overwrites the previous value of the parameter with the new one. UMULL (unsigned mult). [R5] # 8 : Store R2 at address R5. Rs. STR with and without pointer update LDM. discard result) TEQ(EOR to set flags. then R5=R5+8 LDR R2. Construct a state diagram for this application. RSC (Rev. where status reg SR is either CPSR or SPSR. STM (Load Store Multiple). {Rn.4 In an application.}{S} Rd. The parameters can be defined in any order. Status Register Access: MRS{Con} Rd. which conform to the following restrictions: Each state is associated with a unique test. Rs : (Rd=Rm*Rs) MLA{Con}{S} Rd. Rd : (reg to status reg). assuming user actions (a).