P21C Class Test #2 ---
24th November 1999
Duration: 1 Hour ---
Attempt ALL questions.
1. The 8085 instruction MVI has the opcode 3Eh.
Sketch the
waveform of this opcode as it would appear on a serial pin,
using even parity, 8 data bits, and 1 stop-bit. [3]
2. The 8155 IC on the SDK-85 kit is allocated
the port #'s as
shown in Figure 1. Write an instruction sequence to:
(a) Load the Timer with a value which will produce a delay
of 100 μs then 'fire' a pulse &
repeat. [2]
(b) Start the Timer [1]
(c) Stop the Timer [1]
3. Interface the A/D in Figure 2 to the SDK-85
kit using port
space. (Sketch Figure 2 showing port & bit
allocations).
[2]
4. Write code that will read 10 values from your
A/D, storing
them in locations 2050h-2059h (use your Fig:2). [5]
5. If your average A/D value is 45h, to what
input voltage does
this correspond (use Fig:2) ? [2]
6. Figure 3 shows an address decoder for a
computer. Determine
the address ranges for the outputs indicated. [2]
7. Figure 4 shows the details of a port with 8 input & 8 output
bits. Briefly explain how the circuit operates. [5]
8. Figure 5 shows a memory IC:
(a)
How many bits does it contain ? [1]
(b) How
many are required to make a word (2 bytes) ? [1]
(c) Is
it a RAM, ROM, or EPROM IC ? [1]
9.
The
subroutine DLAY, is shown below. Determine exactly the
time this routine takes if it is entered with DE=0010h. What
registers are destroyed ? (Use Clock = 3 MHz) [3+1]
DLAY: DCX D [
6 states ]
MOV A,D [ 4 states ]
ORA E [ 4 states ]
JNZ DLAY [7/10 states]
RET [10 states ]
10. (Bonus question): What is the
name of the company that makes