Nov 2011 - D1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Term End Examination - November 2011

Course : ECE304 - Microcontroller and Applications Slot: D1

Time : Three Hours Max.Marks:100

Answer ALL the Questions


(10 X 10 = 100 Marks)
Note: Programs should be written with comments.

1. (a) Mention the criteria for choosing a microcontroller. [5]

(b) List the characteristics of Embedded system. [5]

2. (a) An 8051 Microcontroller is used to implement a thermostat. The 8-bit digital value [10]
of the temperature is input to Port 1. An output signal to turn on a heater is attached
to Port 2, bit 0. If the temperature is below a constant set point TLOW, the program
is to turn on the heater. If the temperature is above a constant set point THIGH, the
program is to turn the heater off. The program also keeps an internal count of the
number of times that the furnace turns on (after it was previously off). Develop an
optimized program in terms of code size, using 8051 instruction set.

OR
2. (b) Using 8051 micro controller, write a program to get a data (x) from port P1 (Assume [10]
x < 09), perform Y = 2x2 + 5x + 7, and send the result (Y) through port P2. Assume
the clock input frequency to 8051 as 12 MHz. (The program should be written
without using Look- up table.)
3. Write an Assembly Language Program to toggle bit P1.2 continuously every 50 ms. [10]
Use Timer 0, to create the delay.
4. (a) Distinguish between RISC and CISC processor with an example. [5]

(b) Give the functionality of 8051 microcontroller, when following pins are asserted. [5]

(i) ALE (ii) EA (iii) PSEN (iv) INT0 (v) RD.

Page 1 of 3
5. Read the following program and specify the content in SP register, content in stack [10]
with memory address after execution of each instruction.
LINE
1 MOV SP, #5FH
2 SETB PSW.3
3 MOV R0,#3FH
4 MOV R1,#0E4H
5 MOV R2,#0A5H
6 MOV R3,#6AH
7 MOV R4,#7BH
8 MOV R5,#0B7H
9 PUSH 01
10 PUSH 02
11 POP 04
12 PUSH 03
13 POP 02
14 POP 03
6. (a) Write a program to send the message “GLOBAL WARMING” to serial port. [10]
Assume a switch (SW) is connected to pin P1.2.
Monitor its status and set the baud rate as follows:
SW = 0, 4800 baud rate
SW = 1, 9600 baud rate
Assume crystal frequency = 11.0592 MHz, 8-bit data, and 1 stop bit.

OR
6. (b) i) Write a program for the 8051 to receive bytes of data serially, and send them [6]
through port P1, set the baud rate at 4800, 8-bit data, and 1 stop bit.
ii) Draw the pin out of RS-232 DB9 serial connector. Mention the functionality of [4]

each pin.

Page 2 of 3
7. Assume that pin P 3.3 (INT1) is connected to a pulse generator, write a program in [10]
which the falling edge of the pulse will send a high to P1.3, which is connected to an
LED (or buzzer). In other words, the LED is turned on and off at the same rate as the
pulse is applied to the INT1 pin.
8. (a) (i) Write the 8051 instructions, to Enable timer1 interrupt and external hardware [5]
interrupt1.
(ii) Write the 8051 instructions, to make the timer1 interrupt and external hardware
interrupt 1 as highest priority Interrupts
iii) After enabling mention all the interrupts sorting from highest to lowest priority.
(b) Write an assembly language program to transfer value 41H serially (one bit at a [5]
time) via pin P2.1. Send one low bit at the start and one high bit at end of the data.
Send the byte LSB first.
9. (a) List all the steps the ARM core will automatically perform, when an exception [2]
causes a mode change?
(b) The ARM core uses RISC architecture. RISC is a design philosophy aimed at [8]
delivering simple but powerful instructions. Discuss about the four major design
rules on which the RISC philosophy is implemented.
10. Design 8051 based LCD display system with Data lines of LCD connected to Port [10]
0, control signals to Port 1. Also develop ALP for the same system to display “YES”
(Note :“38H”-LCD 2 lines 5X7 Matrix ; “0EH”-Display ON cursor ON ;
“01H”-Clear LCD “06H”-Shift cursor right)

⇔⇔⇔

Page 3 of 3

You might also like