0% found this document useful (0 votes)
18 views9 pages

Exercise 12 (Up Down)

The document outlines an exercise for a microprocessors and microcontroller lab at Presidency University, Bengaluru, focusing on designing an assembly language program for an up/down counter using the 8255 Programmable Peripheral Interface (PPI). It provides an overview of the 8255 PPI's functionality, including its pin configuration and interfacing capabilities. Additionally, it details the steps required to execute the interfacing exercises using assembly language programming and the necessary software tools.

Uploaded by

houndclegane860
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views9 pages

Exercise 12 (Up Down)

The document outlines an exercise for a microprocessors and microcontroller lab at Presidency University, Bengaluru, focusing on designing an assembly language program for an up/down counter using the 8255 Programmable Peripheral Interface (PPI). It provides an overview of the 8255 PPI's functionality, including its pin configuration and interfacing capabilities. Additionally, it details the steps required to execute the interfacing exercises using assembly language programming and the necessary software tools.

Uploaded by

houndclegane860
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 9

PRESIDENCY UNIVERISTY, BENGALURU

School of Engineering

Microprocessors and Microcontroller Lab


CSE 254

IV Semester 2018-19
Exercise-12

Design and develop an ALP program using Logic


Controller to count (0-9) up/down counter
Interfacing Experiments
using 8255 (PPI)
Interfacing a microprocessor is to connect it with various
peripherals to perform various operations to obtain a
desired output
8255 Programmable Peripheral Interface (PPI)

• 8255 PPI is a general purpose programmable I/O


device designed to interface the CPU with its
outside world such as ADC, DAC, keyboard
etc. We can program it according to the given
condition. It can be used with almost any
microprocessor.
• The 8255 gives a CPU or digital system access to
programmable parallel I/O.
• The 8255 has 24 input/output pins. These are
divided into three 8-bit ports (A, B, C).
• Port A and port B can be used as
8-bit input/output ports.
8255 PIN Diagram
.OUTPUT 2500AD
PA EQU 0FFC0H
DOWN:MOV DX,PA
CWR EQU 0FFC6H
OUT DX,AL
CSEG SEGMENT CMP AL,0
ASSUME CS:CSEG JE EXIT
ORG 0:5000H DEC AL
MOV CX,FFFFH
START1:
BACK3:LOOP BACK3
MOV AL,80H BACK4:LOOP BACK4
MOV DX,CWR BACK5: LOOP BACK5
OUT DX,AL JMP DOWN
MOV AL,00H
EXIT:MOV AH,4CH
INT 21H
UP: MOV DX,PA CSEG ENDS
OUT DX,AL END
CMP AL,9
JE DOWN
INC AL
MOV CX,FFFFH
BACK:LOOP BACK
BACK1:LOOP BACK1
BACK2: LOOP BACK2
JMP UP
Steps to Execute Interfacing Exercises
1) C:\masm\> Edit filename.asm
2) C:\masm\> x8086 filename.asm
3) C:\masm\> LINK (Enter)
Input filename: Filename (Enter 5 times)
options: Type H (Enter)
4) Minimize Command prompt window
5) Launch Talk software
6)Goto options settings communication port (COM 2) OK
7) Goto options connect press Reset button on KIT ( KIT NAME
APPEARS ON SCREEN)
8) GOTO FILE DOWNLOAD INTEL HEX FILE  SELECT
FILENAME.HEXOPEN (*# APPEARS ON SCREEN)
9) Type G
Type 5000 (Enter)
THANK YOU

You might also like