0% found this document useful (0 votes)
33 views2 pages

Microcontroller and Embedded Systems

MCE_ques

Uploaded by

Indranil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Microcontroller and Embedded Systems

MCE_ques

Uploaded by

Indranil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

INDIAN INSTITUTE OF TECHNOLOGY, KHARAGPUR

Date: _ _ _ _ _ FN/AN, Time: 3 Hrs, Full marks: .Q, Deptt. E & ECE
No. of Students 113, End-Spring Semester Examination
EC31006: Microcontroller and Embedded Systems
Figures in the right hand margin indicate marks
S. No. Mark

1 (a) Assume that five BCD numbers, 71, 11, 65, 59 and 37 are stored in RAM locations (4+4)
starting at 40H. Write a program in 8051ALP to find the sum of all the numbers.
Store the result in register RS of bank 2.

(b) Using 8051 ALP, write a delay subroutine that takes help of two nested loops to
generate a variable amount of delay. Then, write a main program that calls this delay
routine to generate the maximum amount of delay. In the main program use
registers R4 and R6 of bank 0 to store the parameter values to be passed to the delay
subroutine through stack. Also, estimate the amount of time delay assuming the
clock frequency to be 11.0592MHz.

2 Answer the following questions related to the timer section of8051. (4+4)
(i) To use the timer section of 8051 for event counting, what values should be ssigned
to the corresponding CIT and GATE bits in the TMOD register?
(ii) What is the mode 0 operation of 8051 timer?
(iii) Is it true that the timers in 8051 use 1/12 of the crystal frequency regardless of the
machine cycle time?
(iv) Indicate the rollover value (in hex and in decimal) of the timer for each of mode
0, I and 2.

A switch, SW, is connected to pin P 1.2. Write an 8051 C program to monitor SW and
generate a 500Hz square wave ifSW=O and 750Hz square wave ifSW=I. Use Timer
0 in mode I for square wave generation.

3 Answer in brief the following questions with respect to the serial data communication (4+4)
through 8051:
(i) What do you mean by data framing and what is its significance?
(ii) How can you set the baud rate while communicating serially using the 8051?
(iii) Why do you use the chips MAX 232 or MAX233 while physically connecting
8051 to RS232C serial interface?
(iv) Give a code segment to double the baud rate for data transfer through 8051 serial
interface.
Write an 8051C program to send two messages "Normal Speed" and "High Speed" to
the serial port. Assuming that SW is connected to pin P2.0, monitor its status to set
the baud rate as follows:
SW=O, baud rate=28800 Hz
Sw=1, baud rate=56K.
Assume a crystal frequency of 11.0592MHz.

(PTO)
4 Answer the following questions with respect to the Interrupt section of 8051. (4+4)
i. List the 8051 interrupts with ttie vector locations they correspond to.
ii. Suppose that after reset you execute the instruction MOV IP,#04H. What will
happen now if INTO, INT1 and TFO are activated simultaneously. Assume that the
interrupts are edge-triggered.
iii. How can you test the Timer 1 interrupt service routine in 8051 without the timer
actually rolling over?
iv. What is the difference between the RET and RETI instructions in 8051?
Show how you can use the serial port of 8051 to expand 1/0 port availability by two
parallel I/O ports using 74LS166 and 74LS164 shift registers. Which mode would you
program the serial port in?

5 Answer the following questions related to keyboard/display interfacing. (4+1


+1)
i. Show the interfacing of a 4x4 matrix keyboard to 8051 through the port lines
PI and P2. Then, give a flow chart to illustrate how a key press is detected.
ii. What do you mean by key debouncing and how do you do it (i) in s/w (ii) in
h/w?
iii. Bring out the commonality between interfacing of matrix keyboard and
interfacing of multiplexed seven segment display.

6 (i) Mention different data types available in ARM. How does a Little Endian (1+3
type of storage differ from a Big End ian type of storage? +2)
(ii) Suppose the number Ox12345678 is stored at memory location 1000 in Big
Endian format. If the processor now assumes the data to be in Little Endian
format, what will it get if it reads (i) a byte, (ii) a half-word, (iii) a word from
the location 1000?
(iii) What do you mean by memory data alignment and why is it necessary?

7 (i) List at least three features that have made ARM one of the most popular (3+3
processors in the embedded system market. For each of the features, mention +2)
which version of ARM processor it was first adopted in.
(ii) What is the function of the ARM processor in each of the following
modes?
(a) User mode (b) Supervisor mode (c) FIQ mode (d) IRQ mode
(e) Abort mode (f) Undefmode.
(iii) What do you mean by bank out registers in ARM? For each of the
operating modes in ARM, list the registers banked out.

8 Give the characteristics of soft real-time, firm real-time and hard real-time (3+5)
systems and give two examples from each class.

Assume that you have to schedule a set of tasks T={Tl, T2, ... , Tn} having
periods p={pl, p2, ... ,pn} using Table-driven scheduling. What do you mean
by the 'major cycle' of this task set? Also, prove that the major cycle is equal
to LCM( {p 1, p2, ... ,pn}) even when the tasks have arbitrary phases.

You might also like