Final Exam: EL21C – Dec 2000

1.

(a)         Figure 1 shows a block diagram of the 8155 IC. Explain how this IC operates and the various functions it can perform.

[7]

 

(b)  Write a short 8085 assembly language program (mnemonics and

comments only), that will read Port 21H and 23H of the 8155 IC (on the SDK-85 kit), form a 14-bit number (Port 21H as the LSB), and then load this number into the Timer of the same 8155 IC, placing it in mode 0 and STOP mode.

[8]

 

(c)         If the Timer clock were 100 kHz, what number would you load in to the Timer to achieve a single square wave pulse every 500 ms? What Timer mode would you use ?

[3]

 

(d)         What are the maximum and minimum delays between pulses, if the Timer is in this mode ?

[2]

Figure 1:

 

 

 

 

 

 

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

 

Assume that the Interrupt Service Routine (ISR) for interrupt

RST 7.5 is stored in memory beginning at 1234H. Explain what sequence of events occurs for this ISR to be activated.                [7]

 

While the ISR above is executing, an RST 5.5 interrupt occurs. Explain, with suitable assembly code, how you would check to see if RST 5.5 is pending and, if it is pending, branch to it’s ISR at 3456H; otherwise, reset RST 7.5 and return to a main program.                [8]

 

 

 

 

3.   Figure 2 shows an address decoding scheme for selecting ports of an 8155 IC. Analyse the circuit and determine all the port addresses of the 8155. Also indicate what other logic signals must be present to read and write to the 8155.                                         [8]

 

Show how you would interface two (2) seven-segment LED digits to the 8155 ports.                                               [4]

 

Write an assembly language program (mnemonics and comments only), that will write out the message  H I  to the two digits.      [5]

[State all assumptions made.]

 

What port addresses would enable outputs 0 and 5 of the decoder?

Will memory addresses also enable these outputs?              [3]

 

Figure 2:

 

 

 

 

4

(i)  Explain how the Stack operates in a typical 8085 CPU microprocessor system, using the principle of handling Subroutines and Interrupts to illustrate your answer.                                [8]

 

 

(ii)    Explain how Port (or I/O) mapping operates on an

     8085 CPU system and then design, with explanation &

diagrams, how you would interface the AC Motor in

Figure 3 (below) so that you can control its ON/OFF operation by software via a port. (State any assumptions made and additional parts inserted/used, in your design).                        [8]

 

(iii)           Suggest a circuit to sense RPM (revolutions/min), with its

     output to an input port.                               [4]

 

             Figure 3:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5

(a)  Sketch the waveforms (bit-streams) for the following serial

transmissions using 7-bit data, even parity, one stop bit,

and 56.6K baudrate.

 

(i)  ASCII character  (54H)

(ii) ASCII character  (55H)

 

Indicate the bit time on your sketch.                  [7]

 

(b)         Analyse and comment on the program below then explain its purpose.

 

AAA: RIM 

    

     RAL 

 

     JC   AAA

 

     CALL HAF

 

     MVI  C,09

 

BBB: CALL FULL

 

     RIM

 

     RAL

 

     DCR  C

 

     JZ   RETURN

 

     MOV  A,B

 

     RAR

 

     MOV  B,A

 

     JMP  BBB

 

RETURN:   RET

[8]

 

(c)  Explain the use of the parity bit in asynchronous serial

communication. Briefly explain another method used to improve serial communication efficiency.

[5]

 

END  OF  PAPER