THE UNIVERSITY OF THE WEST INDIES

 

                   EXAMINATIONS   OF  DECEMBER   2006

 

Code and Name of Course: ELET2100 – MICROPROCESSORS  I

 

Date and Time:                                                             Duration: 2 hours

 

INSTRUCTIONS TO CANDIDATES:  This paper has  5  pages and  5  questions.

Answer any   THREE (3)   of   FIVE (5)   questions.

 

Question 1:

 

List the conditional Flags on the Intel 8085 CPU and explain their operation.             [5]

Show the effects on the Flags, and register contents, after the following instructions

are executed. Assume, before each instruction that all Flags are reset and register contents are:

A = 87H ; B = 34H; HL = C059H;

 

                                                (i)         XRA   A

                                                (ii)        CPI    21H

                                                (iii)       MVI    B,44H

                                                (iv)       DCX  H

                                                (v)        RAL                                                                                                   [5]

 

Write a commented Assembly Language (AL) subroutine that will count the number of

set  bits in the register pair BC and return the result in the A-register. Your subroutine

should preserve all Flags and registers.

 

Show/explain your algorithm in a pseudo-flowchart.                                                                      [10]

 

 

Question 2:

 

Explain how the 8085 CPU instruction RST n operates.                                                                 [4]

Assume that an Interrupt Service Routine (ISR) for interrupt TRAP is stored in memory beginning at 20F0H.

 Show and explain what sequence of steps must occur for this ISR to be activated.             [6]

While the ISR above is executing, a RST 7.5 interrupt occurs. Explain, with suitable assembly code,

how you would check to determine if RST 7.5 is pending and, if it is pending, service it’s ISR at location 3ABCH;

otherwise, return to the main program.            [6]

Show the contents of the Stack, the SP-register, and the A-register, after the following code is executed:

                                                LXI      SP, 20C2H

                                                MVI     A, 3EH

                                                LXI      D, 1234H

                                                LXI      B,  ABCDH

                                                PUSH   D

                                                PUSH   B

                                                STA    20C2H

                                                HLT                                                                                                                [4]

                                                                                               

Question 3:

 

Design & sketch an address decoder that will generate a unique positive pulse when

the command OUT 85H is executed by an 8085 CPU.

 

Show how you can use this pulse to turn ON/OFF your TV.                                                          [6]

 

 

Write an AL routine that will load and start the Timer, on the SDK-85 kit used in the Lab,

with a value that will produce a continuous square wave of frequency 50 Hz. Assume

the Timer Clock is driven by a 100-KHz oscillator.                                                                           [6]

 

 

Show how you would interface a 7-segment digit to Port 00H on the SDK-85 kit. Write

AL code to display the letter “H”.                                                                                                          [8]

 

 

Question 4:

 

Figure 1 shows an 8-channel, A/D converter. Sketch a timing diagram, showing all

active signals, to illustrate a Read process of Channel 3.                                                               [3]

 

Interface this A/D converter to the SDK-85 kit in your Lab using any port(s) of your choice

then write an AL subroutine which will read all channels and store them in memory

starting at location 20A0H.                                                                                                                   [12]

 

If the A/D converter has a conversion time of 10 μs, calculate an estimate of how long

it will take to read and store all channels.                                                                                            [5]

 

Figure 1:

 

Question 5:

 

Sketch the waveforms for the following serial transmissions using 8-bit data, even

parity, one stop bit, 56.6K baud.

 

            (i)  ASCII character  (54H)

            (ii) ASCII character  (55H)

 

Indicate the bit time on your sketch.                                                                                                     [8]

 

How long would it take to transmit the word “HELLO” with the serial characteristics described above ?                                                                                                                                        [2]

 

Explain the exact steps which take place if the command CALL 07F3H is executed.

Assume the command is stored, beginning in memory, at location 2010H and

SP = 3040H.                                                                                                                                [10]

 

 

Data Sheet 1 of 2

 

 

                                                                    

 

Data Sheet 2 of 2

 

8085 Instructions + timing sheet