EXPERIMENT 3 : LOGIC OPERATIONS and DELAY

OBJECT:

The object of this experiment is to introduce instructions related with logic operations and delays.

REFERENCE:

Gaonkar, R.S., Microprocessor Architecture, Programming and Applications with the

8085/8080A.

Sections : 6.3, 6.4, 6.5, 7.1, 7.4, 7.5, 8.1, 8.2, 8.3, 8.4.

Appendix F 8085/8080A Instruction Set

1 PRELIMINARY WORK :

a) Write a delay program (not a subroutine) which takes approximately 0.5 sec (Clock frequency is 3,072 MHz).

b) Write an assembly language program that shifts the 1 in the bit pattern '00000001' to left continuously with a delay of 0,5 sec and show at the LEDs, while the input from the dipswitch is 00H. If one or more bit in the dipswitches is 1, your program should find the position of that bit and stop at one bit before this position and make the corresponding bit ON for 0,5 sec and OFF for 0,5 sec. Use the delay program written in part a.

Two examples are illustrated below:

i) If the content of the dipswitch is 00H it goes on to shifting operation:
See animation

ii) If the D4 is 1, shifting operation stops at D3 bit and makes D3 of the LEDs blinking (ON for 0,5 sec and OFF for 0,5sec) If both D6 and D4 is 1, shifting operation stops at D5 bit or D3 bit according to the position of the shifting operation and the first occurrence of 1, and makes corresponding bit (D5 or D3) blinking. If the found 1 is set to 0, continue shifting operation until finding the next bit that is 1.
See animation (refresh the page if you cannot see any animations on this image)

Do this procedure continuously.

(Birden fazla 1 olmasi durumunda; kaydirilan bitin mevcut durumuna gore ilk karsilasilan 1den bir öncesinde yanip sönmesi saglanacak ve bu bitin 0 konumuna alinmasi halinde kaydirma islemi bir sonraki 1 olan biti buluncaya kadar devam edecektir. Yapilan bu islemler sürekli olmalidir )

Hint: ANDing input with the bit pattern is a suitable way to find the position of bit that is 1.

2. EXPERIMENTAL WORK :

Execute the program written in preliminary work.