Sie sind auf Seite 1von 7

Interfacing with I/O devices

Biswadeep Chakraborty

Roll No: 001510701086

Date of Experiment: 7/9/17

1 Turn a LED ON and OFF periodically


CONTROL WORD:

D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 0 0 0 0 0 =80H

1
1.1 Flowchart

Figure 1:

1.2 Table
The following table shows the mnemonic and the operational code used for
programming the 8085 microcontroller:

2
Address Mnemonic Op-Code Memory
A100 MVI A,80H 3E 80 2 bytes
A102 OUT F3H D3 F3 2 bytes
A104 LOOP: MVI 3E,FF 2 bytes
A,FFH
A106 OUT F0H D3 F0 2 bytes
A108 CALL DELAY CD 00 B0 3 bytes
A10B MVI A, 00H 3E 00 2 bytes
A10D OUT F0H D3 F0 2 bytes
A10F CALL DELAY CD 00 B0 3 byte
A112 JUMP LOOP C3 04 A1 3 byte
Description of DELAY subroutine
B000 MVI B,05H 06 05 2 bytes
B002 LOOP2: CALL CD BE 04 3 bytes
04BE
B005 DCR B 05 1 bytes
B006 JNZ LOOP2 C2 02 B0 3 bytes
B009 RET C9 1 bytes

2 Square Wave Generation using CRO


CONTROL WORD:

D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 0 0 0 0 0 =80H

3
2.1 Flowchart

Figure 2:

2.2 Table
The following table shows the mnemonic and the operational code used for
programming the 8085 microcontroller:

4
Address Mnemonic Op-Code Memory
A100 MVI A,80H 3E 80 2 bytes
A102 OUT F3H D3 F3 2 bytes
A104 LOOP: MVI 3E,FF 2 bytes
A,FFH
A106 OUT F0H D3 F0 2 bytes
A108 CALL DELAY CD 00 B0 3 bytes
A10B MVI A, 00H 3E 00 2 bytes
A10D OUT F0H D3 F0 2 bytes
A10F CALL DELAY CD 00 B0 3 byte
A112 JUMP LOOP C3 04 A1 3 byte
Description of DELAY subroutine
B000 MVI B,05H 06 05 2 bytes
B002 LOOP2: CALL CD BE 04 3 bytes
04BE
B005 DCR B 05 1 bytes
B006 NOP 00 1 bytes
B007 NOP 00 1 bytes
B008 NOP 00 1 bytes
B009 RET C9 1 bytes

3 Display a Number using LEDs to show the out-


put
CONTROL WORD:

D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 0 0 0 0 0 =80H

5
3.1 Flowchart

Figure 3:

3.2 Table
The following table shows the mnemonic and the operational code used for
programming the 8085 microcontroller:

6
Address Mnemonic Op-Code Memory
A100 MVI A,80H 3E 80 2 bytes
A102 OUT F3H D3 F3 2 bytes
A104 MVI A,FFH 3E,FF 2 bytes
A106 LOOP: OUT F0H D3 F0 2 bytes
A108 JUMP LOOP C3 04 A1 3 byte

3.3 Output
Four LEDs are connected with the output pins of the chip through jumper.
The first and the third LEDs were ON, while the other LEDs were OFF,i.e
the LEDs displayed the numbers 05H i.e. 0101. This is an infinite loop.

4 Conclusion
We thus programmed the 8085 microcontroller to interface with the in-
put/output controllers

Das könnte Ihnen auch gefallen