0% found this document useful (0 votes)
297 views

INTERFACING - 8255: Program

The document contains 6 sections describing programs that initialize different ports on the 8255 Programmable Peripheral Interface chip and perform various input and output operations. The programs initialize ports A, B, and C as either input or output ports in mode 0, output data to light LEDs, input data from switches and store it in memory, and use debouncing circuits. The results demonstrate that the programs successfully execute the described initialization and I/O operations on the 8255 chip ports.

Uploaded by

Pon Krithikha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
297 views

INTERFACING - 8255: Program

The document contains 6 sections describing programs that initialize different ports on the 8255 Programmable Peripheral Interface chip and perform various input and output operations. The programs initialize ports A, B, and C as either input or output ports in mode 0, output data to light LEDs, input data from switches and store it in memory, and use debouncing circuits. The results demonstrate that the programs successfully execute the described initialization and I/O operations on the 8255 chip ports.

Uploaded by

Pon Krithikha
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

INTERFACING---8255

1.AIM: To initialize port B in output mode and output the data 45 PROGRAM: ADDRESS OPCODE INSTRUCTION ORG 4100 4100 4102 4104 4106 4108 3E 80 D3 C6 3E 45 D3 C2 76 MVI A,80 OUT 0C6H MVI A,45 OUT 0C2H HLT OUTPUT DATA 45 INITIALISE B AS OUTPUT PORT COMMENT

INFERENCE: The leds are glowing as 0100 0101. RESULT: Thus a program to output data through port B has been executed.

2. PORT A AS INPUT PORT AND PORT B AS OUTPUT PORT IN MODE 0: AIM: To initialize port A as input port and port B as output port in mode 0, to input the data as set by the SPDT switches and to output the same data to port B to glow the leds. PROGRAM: ADDRESS OPCODE INSTRUCTION ORG 4100H 4100 4102 3E 90 D3 C6 MVI A,90H OUT 0C6H

4104 4106 4108

DB C0 D3 C2 76

IN 0C0H OUT 0C2H HALT

INFERENCE: When a known data is set by the SPDT switches and the program executed , the leds corresponding to the data glow. RESULT: The program to use port A as input and B as output ports in mode 0 has been executed.

3. INITIALISE PORT C AS OUTPUT PORT IN MODE 0: AIM: To initialize port C as output port in mode 0 and to output data in port C accordingly to glow leds. PROGRAM: ADDRESS 4100 4102 4104 4106 4108 OPCODE 3E 90 D3 C6 3E 80 D3 C4 76 INSTRUCTION MVI A,90 OUT 0C6H MVI A,80 OUT 0C4H HALT COMMENT INITIALISE PORT C AS OUTPUT PORT IN MODE 0 SET PC-7 BIT

INFERENCE: The leds glow according to the data output to port c. RESULT: The program to initialize port c as output port and output data to glow leds has been executed.

4. INITIALISE PORT C IN OUTPUT MODE AND EXPLAIN BIT AIM: To write a program to initialize port C as output port in mode 0 and to.. PROGRAM: ADDRESS OPCODE INSTRUCTION ORG 4100H 4100 4102 4104 4106 4108 3E 80 D3 C6 3E 01 D3 C4 3E 07 MVI A,80 OUT 0C6H MVI A,01 OUT 0C4H MVI A,07 SET PC3 BIT WITHOUT RESETTING PCO SET THE PC0 BIT PORT C AS OUTPUT PORT IN MODE 0 COMMENT

410A 410C RESULT:

D3 C6 76

OUT 0C6H HLT

RESETTING PC0 BIT

The program to initialize port c as output port in mode 0 and. Has been executed. 5 .INITIALISE PORT C AS INPUT PORT IN MODE 0 AND TO INPUT USING DEBOUNCE CIRCUITS: AIM: To initialize port C as input port in mode 0 and input data using debounce circuits. PROGRAM: ADDRESS OPCODE INSTRUCTION ORG 4100H 4100 4102 3E 99 D3 C6 MVI A,99 OUT 0C6H

4104 4106 4109

DB C4 32 00 45 76

IN 0C4H STA 4500H HLT

INFERENCE: In our circuit PC2,PC4,PC6 have been connected to debounce switches. Input the data after pressing any one debounce switch. The data will be stored in location 4500. RESULT: The program to initialize port C as input port in mode 0 and to input data using debounce circuits has been executed. 6 .INITIALISE PORT A AS INPUT PORT IN MODE 0 AND STORE THE DATA IN 4500 AIM: To initialize port A as input port in mode 0 , input data using SPDT switches & store data PROGRAM: ADDRESS OPCODE INSTRUCTION ORG 4100H 4100 4102 4104 4106 4109 3E 90 D3 C6 DB C0 32 00 45 76 MVI A,90 OUT 0C6H IN 0C0H STA 4500 HLT INITIALISE PORT A AS INPUT PORT OUT TO CONTROL PORT READ PORT A STORE IT IN 4500 COMMENT

INFERENCE: Port A is set as input. The data set by SPDT switches is stored in the accumulator and then stored in 4500. RESULT: The program to initialize port A as input port in mode 0 and the store the data in 4500 has been executed.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy