Vous êtes sur la page 1sur 3

DEPARTMENT OF EEE

INDIAN INSTITUTE OF TECHNOLOGY GUWAHATI


END TERM EXAMINATION NOVEMBER 2014
EE 201: DIGITAL CIRCUITS AND MICROPROCESSORS

Max. Marks: 50 Time: 3 hours

1. An 8085 assembly language program is given below.


LHLD 2501H
XCHG
LDA 2503H
LXI H,0000H
MVI C,08H
UP: DAD H
RAL
JNC DOWN
DAD D
DOWN: DCR C
JNZ UP
SHLD 2504
HLT
Before the execution of the program, if the contents of the memory locations 2501H, 2502H and 2503H
are respectively 84H, 00H and 56H. What will be the contents of 2504H and 2506H after the execution
of the program? (Show all the intermediate results after execution of each instruction) (5 M)

2. Compute the delay of following 8085 assembly language nested subroutine. Asssume that clock fre-
quency of 8085 microprocessor is 3 MHz. (5 M)
MVI C,FFH
UP: CALL DOWN
DCR C
JNZ UP
DOWN: MVI B,01
RET

3. In Fig. 1, if Vin > 12V , turn the LED ON connected at bit 4 of port A. On the other hand, if Vin < 11V ,
turn the LED OFF. Draw the hardware block diagram showing microcomputer and the connections of
Fig. 1 to its ports. Write an 8085 assembly language program to perform above mentioned task. Note
that if the voltage at positive terminal of op. amp. is greater than that at negative terminal, then the
output of op. amp, is HIGH otherwise LOW. (5 M)

12V −

+
Vin
To Interrupt of
8085-8255 based
− microcomputer

11V +

Figure 1: Question 3

1
4. Write an assembly language program for 8085-8255 based IC tester circuit. The hardware needed to test
the NAND gate is shown in Fig. 2. The microprocessor is to be programmed to generate the various
logic conditions for the NAND inputs, monitor the NAND output, and activates the LED connected
to the bit 2 of port A if the chip is found to be faulty. Otherwise, turn ON the LED connected to the
bit 3 of port A. (5 M)

+5V +5V

R R

PA3

8 PA2
2
5
5 PA1
PA0

PB0

Figure 2: Question 4

5. Consider the following iterative algorithm used by an 8085 based microcomputer to compute the square
root of a number n. Let x is the square root of the number n. Then, x2 = n
⇒ 2x2 = n + x2
2
⇒ x2 = n+x 2
1

[n
x +x]
⇒x= 2
[ x n +xold ]
⇒ xnew = old 2
To find the square root of a given number, we provide an initial value x which is approximately equal
to the original root. The microcomputer computes xnew iteratively using above iterative formula and
compares with xold . This process is repeated until xnew = xold . The partial assembly language pro-
gram which implements this algorithm is given below. Complete the program by filling the blanks with
appropriate instructions. (5 M)
MVI A,x: Where x is the first approximation value
UP: MOV A,D
LHLD 2500H
CALL DIV; Division subroutine is given below
——————
——————
——————
MVI H,00H
MVI A,02H
CALL DIV
——————
——————
JZ DOWN
JMP UP
STA 2500H
HLT

2
Division Subroutine:

DIV: MOV C,A


MVI B, 08H
UP1:DAD H
MOV A,H
SUB C
JC AHEAD
MOV H,A
INR L
AHEAD: DCR B
JNZ UP1
SHLD 2503H
RET HLT

6. Design a circuit which interfaces memory and various peripherals to 8085 to meet the following speci-
fications:
(a) 4 KB of EPROM starting from memory location 4000H.
(b) 2 KB of RAM starting from memory location 5000H.
(c) An 8255 with Port A, Port B, Port C and control word register addresses are respectively 90H,
91H, 92H and 93H.
(d) An 8254 with Counter 0, Counter 1, Counter 2 and control register addresses are respectively A0H,
A1H, A2H and A3H.
(e) An 8251 with data register and control register addresses are respectively B0H and B1H. (5 M)

7. Write 8085 assembly language program to generate 1 kHz square wave from 8254 counter 1. (5 M)

8. Determine the effect of each of the following 8086 instructions:


(a) DIV CH (b) MOV AX,[SI] (c) MOVSB (d) MUL CX (e) ADD AX,[SI]
Assume the following data prior to execution of each of these instructions independently: [DS]=2000H,
[ES]=4000H, [CX]=0300H, [SP]=4000H, [SS]=6000H, [AX]=0091H,[20300H]=05H, [20301H]=02H, [40200H]=06H,
[40201H]=07H, [SI]=0300H, [DI]=0200H, DF=0. (5 M)

9. Develop a 8085 microcomputer based system that will measure, compute and display the root mean-
square (RMS) value of a sinusoidal signal. The completed system is required to (a) Sample a 50-Hz
sinusoidal signal 128 times. (b) Digitize the sample value through a A/D converter. (c) Input the
digitized values to the 8085 through the RST 6.5 interrupt. (d) Compute the RMS value of the
waveform. (e) Display the RMS value to operator. (10 M)

Vous aimerez peut-être aussi