You are on page 1of 20

Index

Sl.No Name of the Experiment Page


no
1 A LED display using 82C55 PPI. 2

2 A 7 segment display using 82C55 PPI. 4

3 A Dot Matrix LED display control (scroll bottom to top and top 6
to bottom) using 82C55 PPI.
4 A Dot Matrix LED display control (scroll left to right and right 8
to left) using 82C55 PPI.
5 Display ‘A’ using Dot Matrix LED interface using 82C55 PPI. 10

6 Display ‘A’ (left to right) using Dot Matrix LED interface using 12
82C55 PPI.
7 Display ‘A’ (Top to bottom) using Dot Matrix LED interface 15
using 82C55 PPI.
8 Digital to Analog converter interface using 82C55 PPI. 18

1
Experiment No: 01
Experiment Name: A LED display using 82C55 PPI.
Objective
Glow of LEDS on the MDA-8086 kit using port B of PPI 8255.

Equipment
PC having Intel microprocessor, MDA-8086 kit.

Introduction
8255 is a programmable peripheral interface. It is compatible to Intel and other
microprocessors. It has 3 I/O ports named as port A, B, C and has 24 pins for I/O that are
programmable in group of 12 pins, has groups that operate in three distinct modes of
operation.
Interfacing of 8255A with 8086:

2
Program code:
#include"mde8086.h"
void wait(long del)
{
while(del--);
}
void main(void)
{
unsigned char led,led1,led2,led3;
outportb(PPI1_CR,0x80);
outportb(PPI1_B,0xff);
outportb(PPI1_A,0xff);
outportb(PPI1_C,0x20);

led=0xf1;
led1=0xf2;
led2=0xf4;
led3=0xf8;
do
{
outportb(PPI1_B,led2);
wait(45000);
outportb(PPI1_B,led3);
wait(45000);
outportb(PPI1_B,led);
wait(45000);
}
}
while(1);
}

Output:

3
Experiment No: 02
Experiment Name: A 7 segment display using 82C55 PPI.
Objective
To get familiar with the seven segment display and its interfacing with 8086 microprocessor
using 8255A.
Equipment
PC having Intel microprocessor, MDA-8086 kit.
Introduction
Seven segment is a display which may be either common anode or common cathode. Which is
ON either on 1 or zero but here we use the format ‘ON’ on zero.
Interfacing of 8255A with 8086:

4
Program code:
#include "mde8086.h"
int data[6]={0xc0, 0xa4,0x99, 0x42, 0xff};
void wait(long del)
{
while(del--);
}
void main(void)
{
int *datal;
outportb(PPI1_CR, 0x80);
outportb(PPI1_B, 0xf0);
outportb(PPI1_C, 0x00);
do
{
datal=data;
while(1)
{
outporb(PPI1_A, *datal);
datal++;
wait(10000);
}
}
while(1);
}
Output:

5
Experiment No: 03
Experiment Name: A Dot Matrix LED display control (scroll bottom to top and top to
bottom) using 82C55 PPI.

Objective
To get familiar with dot matrix LED’s and their connections.

Equipment
PC having Intel microprocessor, MDA-8086 kit.

Introduction
The KMD D1288C is 1.26 inch height 3mm diameter and 8 × 8 dot matrix LED displays. The
KMD D1288C are dual emitting color type of red, green chips are contained in a dot with milky
and white lens color.
Interfacing of 8255A with 8086:

6
Program code:
#include"mde8086.h"

void wait(long del)


{
while( del-- );
}
void main(void)
{
int dot,i;
outportb( PPI2_CR, 0x80 );
outportb( PPI2_A, 0xff );
outportb( PPI2_C, 0xff );

do{
dot = 0x7f;
for( i = 0; i != 8; i++ ){
outportb( PPI2_B, dot );
dot >>= 1;
dot = ( dot | 0x80 );
wait(30000);
}
}while(1);
}
Output:
Bottom to Top

7
Experiment No: 04
Experiment Name: A Dot Matrix LED display control (scroll left to right and right to
left) using 82C55 PPI.

Objective
To get familiar with dot matrix LED’s and their connections.

Equipment
PC having Intel microprocessor, MDA-8086 kit.

Introduction
The KMD D1288C is 1.26 inch height 3mm diameter and 8 × 8 dot matrix LED displays. The
KMD D1288C are dual emitting color type of red, green chips are contained in a dot with milky
and white lens color.
Interfacing of 8255A with 8086:

8
Program code:
#include "mde8086.h"
void wait(long del)
{
while( del-- );
}
void main(void)
{
int dot,i;
/* 8255 Initial */
outportb( PPI2_CR, 0x80 );
outportb( PPI2_A, 0x00 );
outportb( PPI2_B, 0x00 );
do{
dot = 0x01;
for( i = 0; i != 8; i++ ){
outportb( PPI2_C, dot );
dot <<= 1;
wait(30000);
}
}while(1);
}
Output:
(Left to Right)

9
Experiment No: 05
Experiment Name: Display ‘A’ using Dot Matrix LED interface using 82C55 PPI.
Objective
To get familiar with dot matrix LED’s and their connections.

Equipment
PC having Intel microprocessor, MDA-8086 kit.

Introduction
The KMD D1288C is 1.26 inch height 3mm diameter and 8 × 8 dot matrix LED displays. The
KMD D1288C are dual emitting color type of red, green chips are contained in a dot with milky
and white lens color.
Interfacing of 8255A with 8086:

10
Program code:
#include"mde8086.h"
/* Output Font 'A' */
int font[8] = { 0xff, 0xc0, 0xb7, 0x77, 0x77, 0xb7, 0xc0, 0xff };

void wait(long del)


{
while( del-- );
}
void main(void)
{
int *data;
int common, i;

outportb( PPI2_CR, 0x80 );


outportb( PPI2_A, 0xff );
do{
data = font;
common = 0x01;
for( i = 0; i != 8; i++ ) {
outportb( PPI2_C, common );
outportb( PPI2_B, *data );
wait(120);
data++;
common = common << 1;
}
}while(1);
}
Output:

11
Experiment No: 06
Experiment Name: Display ‘A’ (Left to Right) using Dot Matrix LED interface using
82C55 PPI.

Objective
To get familiar with dot matrix LED’s and their connections.

Equipment
PC having Intel microprocessor, MDA-8086 kit.

Introduction
The KMD D1288C is 1.26 inch height 3mm diameter and 8 × 8 dot matrix LED displays. The
KMD D1288C are dual emitting color type of red, green chips are contained in a dot with milky
and white lens color.
Interfacing of 8255A with 8086:

12
Program code:

#include "mde8086.h"
/* Output Font 'A' */
int font1[8] = { 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff };

int font2[8] = { 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
int font3[8] = { 0xb7, 0xc0, 0xff, 0xff,0xff, 0xff, 0xff, 0xff };

int font4[8] = { 0x77, 0xb7, 0xc0, 0xff,0xff, 0xff, 0xff, 0xff };

int font5[8] = { 0x77, 0x77, 0xb7, 0xc0,0xff, 0xff, 0xff, 0xff };

int font6[8] = { 0xb7, 0x77, 0x77, 0xb7,0xc0, 0xff, 0xff, 0xff };

int font7[8] = { 0xc0, 0xb7, 0x77, 0x77,0xb7, 0xc0, 0xff, 0xff };

int font8[8] = { 0xff, 0xc0, 0xb7, 0x77,0x77, 0xb7, 0xc0, 0xff };

void wait(long del)


{
while( del-- );
}
void display( int *data1 )
{
int *data;
int common, i, k;
for( k = 0; k != 20; k++ ){
common = 0x01;
data = data1;
for( i = 0; i != 8; i++ ) {

outportb( PPI2_C, common );


outportb( PPI2_B, *data );
wait(120);
data++;
common = common << 1;
}
}
}

13
void main(void)
{
outportb( PPI2_CR, 0x80 );
outportb( PPI2_A, 0xff );

do{
display(font1);
display(font2);
display(font3);
display(font4);
display(font5);
display(font6);
display(font7);

display(font8);
display(font8);
display(font8);
} while(1);
}
Output: (Left to Right)

14
Experiment No: 07
Experiment Name: Display ‘A’ (Top to Bottom) using Dot Matrix LED interface using
82C55 PPI.

Objective
To get familiar with dot matrix LED’s and their connections.

Equipment
PC having Intel microprocessor, MDA-8086 kit.

Introduction
The KMD D1288C is 1.26 inch height 3mm diameter and 8 × 8 dot matrix LED displays. The
KMD D1288C are dual emitting color type of red, green chips are contained in a dot with milky
and white lens color.
Interfacing of 8255A with 8086:

15
Program code:
#include "mde8086.h"

/* Output Font 'A' */


int font1[8] = { 0xFf, 0x7f, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff };

int font2[8] = { 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff };

int font3[8] = { 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff };

int font4[8] = { 0xff, 0x0f, 0x7f, 0x7f, 0x7f, 0x7f, 0x0f, 0xff };

int font5[8] = { 0xff, 0x07, 0xbf, 0xbf, 0xbf, 0xbf, 0x07, 0xff };

int font6[8] = { 0xff, 0x03, 0xdf, 0xdf, 0xdf, 0xdf, 0x03, 0xff };

int font7[8] = { 0xff, 0x81, 0x6f, 0xef, 0xef, 0x6f, 0x81, 0xff };

int font8[8] = { 0xff, 0xc0, 0xb7, 0x77, 0x77, 0xb7, 0xc0, 0xff };

void wait(long del)


{
while( del-- );
}

void display( int *data1 )


{
int *data;
int common, i, k;
for( k = 0; k != 20; k++ ){
common = 0x01;
data = data1;
for( i = 0; i != 8; i++ ) {
outportb( PPI2_C, common );
outportb( PPI2_B, *data );
wait(120);
data++;
common = common << 1;
}
}
}

16
void main(void)
{

outportb( PPI2_CR, 0x80 );


outportb( PPI2_A, 0xff );

do{
display(font1);
display(font2);
display(font3);
display(font4);
display(font5);
display(font6);
display(font7);

display(font8);
display(font8);
display(font8);
}while(1);
}

Output: (Top to Bottom)

17
Experiment No: 08
Experiment Name: Digital to Analog converter interface using 82C55 PPI.
Objective
Glow of Digital to Analog signal on the MDA-8086 kit using port B of PPI 8255.

Equipment
PC having Intel microprocessor, MDA-8086 kit.

Introduction
The DAC0800 is a monolithic 8-Bit high-speed current output digital to analog converter
(DAC) featuring typical setting times of 100ns. When used as a multiplying DAC monotonic
performance over a 40 to 1 reference current range is possible. The DAC0800 also features
high compliance complementary current outputs to allow differential output voltage of 20 Vpp
with simple resistor loads.
Interfacing of 8255A with 8086:

18
19
Program code:
#include "mde8086.h"

void wait( int del )


{
while( del -- );
}
void main( void )
{
unsigned char da;
outportb( PPI1_CR, 0x80 );
outportb( PPI1_A, 0xff );
outportb( PPI1_B, 0xf0 );
da = 0;
do {
outportb( PPI1_C, da ); /* Output DA */
wait( 10000 );
da++;
if( da >= 0x64 ) da = 0;
} while(1);
}

Output:

20

You might also like