Académique Documents
Professionnel Documents
Culture Documents
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:
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)
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)