You are on page 1of 77

PROJECT REPORT

ON

Computer Interface Trainer (MDA-Win8086)

SUBMITTED BY

SUPERVISED BY

ROLL NO: 10015406 Md. Morshedul Arefin


REG. NO: 0667 Associate Professor
SESSION: 2009-10 Computer Science and
Engineering
University Of Rajshahi

Department Of Computer Science and Engineering


University Of Rajshahi

PROJECT REPORT
ON

Computer Interface Trainer


(MDA-Win8086)
Submitted in partial fulfillment of the requirements for the award of the degree
BACHELOR OF SCIENCE
IN
COMPUTER SCIENCE & ENGINEERING
UNIVERSITY OF RAJSHAHI
Submitted by
Exam Roll : 10015406
Reg No

: 0667

Session

: 2009-10

SUPERVISED BY:
Md. Morshedul Arefin
Associate Professor
Computer Science and
Engineering
University Of Rajshahi

Certificate

This is certify the report entitled Computer Interface Trainer (MDA-win8086)


Submitted by (Roll: 10015406, 09085413, and 08245406)

Under my supervision in his own work and has been submitted elsewhere for the award of
B.Sc (Honours) degree to the best of my knowledge and belief.

Signature:
Md. Morshedul Arefin
Associate Professor
Computer Science and Engineering
University Of Rajshahi

ACKNOWLEDGEMENT

We con sid er our self ex ception all y fo rtunate that we had indulgent
g u i d e s , l e a r n e d philosophers and caring friends to successfully steer us through
one of the most interesting period of our academic career. Today when our endeavor
has reached its friction, we look back in mute gratitude to one and all without
whose help we are sure this reality would have been a dream.
This work has been possible through the direct and indirect coo p e r a t i o n o f v a r i o u s people of CSE-RU towards whom we wish to express our gratitude.
We are extremely thankful to CSE-RU faculties who provided us challenging opportunity
to work on this project.
Special thanks to Md. Morshedul Arefin (Associate Professor, Computer Science and
Engineering, University Of Rajshahi) under whom we completed this project. He provided us
with all the possible help and advice. Without his guidance this project would have not
reached its completion in such a successful manner.
W e a r e a l s o t h a n k f u l t o a l l m y f r i e n d s for their valuable suggestions.

Abstract
A micro-processor incorporates the functions of a central processing unit (CPU) on a single
integrated circuit.
The first microprocessors used a word size of only 4 bits, so that the transistors of its logic
circuits would fit onto a single part. One or more microprocessors typically serve as the
processing elements of a computer system, embedded system, or handheld device.
From the humble beginning as the drivers for calculators, the continued increase in processing
capacity has led to the dominance of microprocessors over every other form of computer; every
system from the largest mainframes to the smallest handheld computers now uses a
microprocessor at its core.
To learn the different features of microprocessor multiple kits are provided. These trainers are
manufactured using Bare Board Tested Glass Epoxy SMOBC PCBs and the ICs are mounted on
sockets.
Exhaustive Manuals with ample of sample programs are provided with the system. Each trainer
is supplied with built-in power supply.
In computer science, an interface is the point of interaction with software, or computer hardware,
or with peripheral devices such as a computer monitor or a keyboard.
Some computer interfaces such as a touchscreen can send and receive data, while others such as
a mouse, microphone or joystick can only send data.

Index
Acknowledgement
No.

Topics

Page
Chapter[1]: Introduction to MDA 8086 Training Kit

1.1

Introduction

1.2

MDA-8086 Features

Chapter[2]: System configuration


2.1

MDA-Win8086 System configuration

2.2

MDA-8086 Specification

2.3

MDA-8086 Key Functions

2.4

MDA-Win8086 Address Map

2.5

Basic Operations

2.6

Serial Monitor

2.7

How to connect MDA Win8086 to PC

Chapter[3]: About MDA-WinIDE8086


3.1

Steps to execute MDA-WinIDE8086

10

3.2

Execute

13
Chapter[4]: Trainer possible experiment list

4.1

List

14

Chapter[5]: List of completed Experiment


5.1

7-Segment Display

15

5.2

LCD Message Display

21

5.3

LCD- Scroll the message center to right

26

5.4

LCD- Scroll a message right to left

28

5.5

Matrix Scroll top to bottom

30

5.6

Matrix Scroll left to right

34

5.7

Matrix - Display A

36

5.8

Matrix Scroll A left to right

38

5.9

Matrix Scroll A top to bottom

41

5.10

LED display

44
Chapter[6]: What we have Implement

6.1

Matrix Scroll bottom to top

47

6.2

Matrix Scroll right to left

49

6.3

Matrix - Display R

51

6.4

Scroll 'R' from left to center

53

6.5

Scroll 'R' from center to left

57

Chapter[7]: Appendix
7.1

MDA-8086 Memory Circuit

61

7.2

MDA-8086 Connector (CON10) CIRCUIT

62

7.3

8086 Instruction Set Summary

63

7.4

MDA-8086 schematic

64

References & Conclusion

Chapter: One
Introduction to MDA 8086 Training Kit
(1.1) Introduction
MDA-8086 has high performance 64K-byte monitor program. It is designed for
easy function.
After power is on, the monitor begins to work. In addition to all the key function
the monitor has a memory checking routine.

Figure: 16Bit MDA-8086


Processor Board

Page | 1

(1.2) MDA-8086 Features


1. Program debugging function by PC.
2. Software : TURBO-C 2.0 or later, Support Startup Code
3. Program download and trace function
4. Display the register contents
5. Memory contents modification and dump function
6. Various Command function
7. Included stepper motor interface circuit
8. DOT MATRIX unit
9. LCD display unit
10. D/A and A/D converter experiment
11. Sound experiment with Speaker
12. Interrupt experiments
13. Thermistor Sensor
14. Bar LED unit
15. Keyboard experiment
16. External interface connector
17. Display the current BUS status on LED
18. +5V, +12V, -12V S.M.P.S(Free Voltage) Power.

Page | 2

Chapter: Two
System configuration
(2.1) MDA-Win8086 System configuration

FIGURE 1. MDA-Win8086 SYSTEM CONFIGURATION


Page | 3

The function of IC's at Figure 1.


CPU(Central processing unit) :
Using Intel 8086, Using 14.7456.
ROM(Read Only Memory) :
It has program to control user's key input.
LCD display, user's program.
64K Byte, it has data communication program.
Range of ROM Address is F0000H~FFFFFH.
SRAM(Static Random Access Memory) :
Input user's program & data.
Address of memory is 00000H~0FFFFH, totally 64K Byte.
DISPLAY :
Text LCD Module, 16(Characters)2(Lines)
KEYBOARD :
It is used to input machine language.
There are 16 hexadecimal keys and 8 function keys.
SPEAKER :
Sound test.
RS-232C :
Serial communication with IBM compatible PC.
DOT MATRIX LED :
To understand & test the dot matrix structure and principle of display.
It is interfaced to 8255A (PPI).
A/D CONVERTER :
ADC0804 to convert the analog signal to digital signal.
D/A CONVERTER :
DAC0800 (8-bits D/A converter) to convert the digital signal to the analog signal
To control the level meter.
STEPPING MOTOR INTERFACE :
Stepping motor driver circuit is designed.
POWER :
AC 110~220V,
DC +5V 3A, +12V 1A, -12V 0.5A SMPS.

Page | 4

(2.2) MDA-8086 Specification


CPU
Main RAM
Monitor ROM
Display Unit
I/O Port
Serial Port
System Clock
Clock Generator
Interrupt Controller
Timer Controller
Level Meter
Dot Matrix
Software

Key Board
System BUS indicator
Extended Connector
Stepper motor interface
A/D, D/A Converter
Power

Board size
Wood Case
Weight

Page | 5

8086
64KB(62256 x 2)
64KB(27256 x 2)
LCD (16 X 2 Line)
8255A
14.7456MHz
14.7456MHz
8254 (Clock Generator)
8259
8253
HG101A
8 X 8 (2 color)
8086 Assembler
Support C-Language example code
MDA-WinIDE8086 Integration Development
Program
16 Hexadecimal and 10 function keys
LED X 12
System BUS : 62 pins
External interface : 20 pins
Driver T.R X 4
ADC : ADC0804
DAC : DAC0800
- Input : AC 85 ~ 264V
- Output : DC +5V(2A), +12V(1A), 12V(500mA)
310 x 265
100(H) x 300(D) x 430(W)
4.5

(2.3) MDA-8086 Key Functions


MDA-Win8086 has high performance 64K-byte monitor program. It is designed for easy
function. After power is on, the monitor program begins to work. In addition to all the key
function the monitor has a memory checking routine. The following is a simple description of the
key functions.

Figure2: Simple description of the key functions.

(2.4) MDA-Win8086 Address Map


Memory map
ADDRESS

MEMORY

DESCRIPTION

00000H ~ 0FFFFH

RAM

PROGRAM & DATA MEMORY

F0000H ~
FFFFFH

ROM

MONITOR ROM

10000H ~ EFFFFH

Page | 6

USER'S RANGE

I/O address map


ADDRESS

I/O PORT

DESCRIPTION

00H ~ 07H

LCD &
KEYBOARD

LCD Display
00H : INSTRUCTION REGISTER
02H : STATUS REGISTER
04H : DATA REGISTER
KEYBOARD
01H : KEYBOARD REGISTER (Only
read)
01H : KEYBOARD FLAG (Only write)

10H ~ 17H

8259/SPEAKER

8259(Interrupt controller)
10H : COMMAND REGISTER
12H : DATA REGISTER
SPEAKER -> 11H : SPEAKER

08H ~ 0FH

8251 / 8253

8251(Using to data communication)


08H : DATA REGISTER
0AH : INSTRUCTION / STATUS
REGISTER
8253(TIMER/COUNTER)
09H : TIMER 0 REGISTER
0BH : TIMER 1 REGISTER
0DH : TIMER 2 REGISTER
0FH : CONTROL REGISTER

18H ~ 1FH

8255A-CS1/
8255A-CS2

8255A-CS1(DOT & ADC


INTERFACE)
18H : A PORT DATA REGISTER
1AH : B PORT DATA REGISTER
1CH : C PORT CONTROL REGISTER
8255-CS2(LED & STEPPING
MOTOR)
19H : A PORT DATA REGISTER
1BH : B PORT DATA REGISTER
1DH : C PORT CONTROL REGISTER
1FH : CONTROL REGISTER

20H ~ 2FH

I/O EXTEND CONNECTOR

30H ~ FFH

USER'S RANGE

Page | 7

(2.5) Basic Operations

On a power-up, following message will be displayed on a LCD.

Figure: 3

RES

Figure: 4

System Reset Key

Whenever RES is pressed, the display becomes one of this two figures.
To select the Machine Code and Serial monitor mode with P1 switch.

Machine Code

Serial monitor

Serial Monitor is the basic monitor program to do data communicate between MDA-8086
and computer.

Page | 8

(2.6) Serial Monitor


Serial monitor is the basic monitor program to do data communicate between MDAWin8086 and your computer.
To select the Machine Code and Serial monitor mode with P1 switch.

Machine Code

Serial monitor

Serial Monitor is the basic monitor program to do data communicate between MDA-8086
and computer.

(2.7) How to connect MDA Win8086 to PC

Connect the MDA-Win8086 Kit to a spare serial port on your PC.

:5

Page | 9

:6

Chapter: Three
About MDA-WinIDE8086
(3.1) Steps to execute MDA-WinIDE8086
STEP1: Click the Start button in the task bar, then click All Programs and MIDAS ENG.
Then click the "MDA_WinIDE8086" program icon, and the "MDA-WinIDE8086" window will
be displayed.

STEP2: Open a source file from the File-Open menu.

Page | 10

STEP3:
In the Files of types, select a source type from the drop-down list, as an assemble file
Select "Led.ASM" file.
Click "Open" button.

STEP4: Start assembling your target application with the "Assemble and Link" button.

STEP5: If there is no error, following window will be displayed.

Page | 11

STEP6: If you click "Yes" button, your source program will be download from PC into the
target.

STEP7: If you click "Run" button, the program will be executed.

STEP8: LED will be shifted.

Page | 12

(3.2) Execute
Run

Click
button or select "Run" from the Run menu.
We can also type 'G' and "Enter" key on Terminal window.
The Run command in the work menu starts execution of the program. The
Program will be executed until it is stopped by pressing RESET KEY.

Trace

Click
button or select "Trace" from the Run menu.
We can also type 'T' and "Enter" key on Terminal window.
The Trace command in the work menu executes one instruction.

Page | 13

Chapter: Four
Trainer possible experiment list
(4.1) List
LED Display Experiment
FND Display Experiment
DAC Experiment
Bar LED Display Experiment
ADC Experiment
PIT&INT Experiment
8253 Interface Experiment
Sound Experiment
8255 Interface Experiment
8X8 DOT Matrix Display Experiment
8251 Interface Experiment
Text LCD Display Experiment
Keyboard Interface Experiment

Page | 14

Chapter: Five
List of completed Experiment
(5.1) 7-Segment Display
A seven-segment display (SSD), or seven-segment indicator, is a form of electronic
display device for displaying decimal numerals.
Seven-segment displays are widely used in digital clocks, electronic meters, and other
electronic devices for displaying numerical information.
Composed of seven elements.
Individually on or off, they can be combined to produce simplified representations of the
numerals.

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.

Page | 15

Interfacing of 8255A with 8086:

Page | 16

Algorithm: Digit drive pattern.


Digit drive pattern of a seven segment LED display is simply the different logic
combinations of its terminals a to h in order to display different digits and characters.
The common digit drive patterns (0 to 9) of a seven segment display are shown in the
table below.

Digit
0
1
2
3
4
5
6
7
8
9

Page | 17

a
1
0
1
1
0
1
1
1
1
1

b
1
1
1
1
1
0
0
1
1
1

c
1
1
0
1
1
1
1
1
1
1

d
1
0
1
1
0
1
1
0
1
1

e
1
0
1
0
0
0
1
0
1
0

f
1
0
0
0
1
1
1
0
1
1

g
0
0
1
1
1
1
1
0
1
1

Flow Chart: 7-segment display


Start MPU

Set x <- 0

Write: pins

<- x

Delay

Increment x by 1

X=10?

Page | 18

C Code for 7-segment LED display


#include"mde8086.h"
int data[11] = { 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x90, 0x00 };
void wait(long del)
{
while( del-- );
}
void main(void)
{
int *data1;
/* 8255 -1 Initialization */
outportb( PPI1_CR, 0x80 );
outportb( PPI1_B, 0xf0 );
outportb( PPI1_C, 0x00 );
//main loop
do {
data1 = data;
while( *data1 != 0x00 )
{
outportb( PPI1_A, *data1 );
wait(30000);
data1++;
}
}while(1);
}

Page | 19

Explanation
In common-anode 7-Segment LED, logic 0 is required to turn on a segment.
0xc0, =11000000B
0xf9,=11111001B

=00111111(inverse)
=00000110(inverse)

0xa4,=10100100B
0xb0, =10110000B
0x99,=10011001B

=01011011(inverse)
=01001111(inverse)
=01100110(inverse)

0x92,=10010010B
0x82,=10000010B
0xf8, =11111000B

=01101101(inverse)
=01111101(inverse)
=00000111(inverse)

0x80,=10000000B
0x90, =10010000B

=01111111(inverse)
=01101111(inverse)

Page | 20

(5.2) LCD Message Display


Objective
To get familiar with LCD its pin configuration, internal architecture and its interface
with PPI 8255A.

Equipment
PC having Intel microprocessor, MDA-8086 kit.

LCD
16 CHARACTERS 2 LINE MODULES

1) PHYSICAL DATA
Module size

80.0W 36.0H 9.30D mm

Min. view area

65.6W 13.8D mm

Character construction

5 7 dots

Character size

2.85W 3.8H mm

Character Pitch

3.65 mm

Dot size

0.55W 0.5H mm

Page | 21

2) Pin Connections

INSTRUCTIONS

Page | 22

LCD INTERFACE
The interface of LCD with PPI 8255A is shown in the figure.

Page | 23

Flow Chart: LCD message displays

Page | 24

C Code for LCD message display


#define _LCD
#include
"mde8086.h"
void string( char *str )
{
while( *str )
{
LCD_putch( *str );
str ++;
wait( 10000 );
/* Delay One character */
}
}
void main( void )
{
LCD_init; /* LCD Initial */
string( "Serial monitor !" );
LCD_LN21;
string( "MDA-Win8086 Kit!" );
do {
LCD_DISPOFF;
wait( 20000 );
LCD_DISPON;
wait( 20000 );
} while(1);
}

Page | 25

(5.3) LCD- Scroll the message center to right


Flow Chart

Page | 26

C Code
#define _LCD
#include
"mde8086.h
void main( void )
{
int i;
LCD_init;
do {
LCD_ALLCLR;
LCD_puts( "Serial monitor !" );
LCD_LN21;
LCD_puts( "MDA-Win8086 Kit!" );
for( i = 0; i < 16; i ++ )
{
wait( 15000 );
LCD_RShift;
/* Right shift */
}
} while(1);
}

Page | 27

(5.4). LCD- Scroll a message right to left


Flow Chart

Page | 28

C Code
#define _LCD
#include "mde8086.h"
/* To the LCD Output String ( Delay One Character ) */
void string( char *str )
{
while( *str ) {
LCD_putch( *str );
str ++;
wait( 10000 );
}
}
void main( void )
{
LCD_init;
LCD_Iout( 0x07 )
/* Entry mode define*/
do
{
LCD_Iout( 0x90 ) /* Character Output Position */
string( "MDA-Win8086 Training Kit" );
} while(1);
}

Page | 29

DOT MATRIX LED


(5.5). Matrix Scroll top to bottom
Objective
To get familiar with dot matrix LEDs 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.

Internal Circuit Diagram

Page | 30

DOT-MATRIX LED interface

Page | 31

Flow Chart

Page | 32

C Code
#include

"mde8086.h"

void wait(long del)


{
while( del-- );
}
void main(void)
{
int dot,i;
/* 8255 Initialization */
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);
}

Page | 33

(5.6). Matrix Scroll left to right


Flow Chart

Page | 34

C 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);
}

Page | 35

(5.7). Matrix - Display A


Flow Chart

Page | 36

C 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);
}

Page | 37

(5.8). Matrix Scroll A left to right


Flow Chart

Page | 38

C 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;

Page | 39

for( i = 0; i != 8; i++ ) {
outportb( PPI2_C, common );
outportb( PPI2_B, *data );
wait(120);
data++;
common = common << 1;
}
}
}
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);
}

Page | 40

(5.9). Matrix Scroll A top to bottom


Flow Chart

Page | 41

C 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 );

Page | 42

outportb( PPI2_B, *data );


wait(120);
data++;
common = common << 1;

}
}
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);
}

Page | 43

8255A INTERFACE (LED)


(5.10). LED display
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

Page | 44

Flow Chart

Page | 45

C Code
#include

"mde8086.h"

void wait( long del )


{
while( del-- );
}
void main( void )
{
unsigned char led;
outportb( PPI1_CR, 0x80 );
outportb( PPI1_B, 0xff );
outportb( PPI1_A, 0xff );
outportb( PPI1_C, 0X20 );
led = 0xf1;
do {
outportb( PPI1_B, led );
led = led << 1;
if( led & 0x10 )
led = 0xf1;
wait( 10000 );
} while( 1);
}

Page | 46

Chapter: Six
What we have Implement
(6.1). Matrix Scroll bottom to top
Flow Chart

Page | 47

C Code
#include

"mde8086.h"

void wait(long del)


{
while( del-- );
}

void main(void)
{
int dot,i;
/* 8255 Initialization */
outportb( PPI2_CR, 0x80 );
outportb( PPI2_A, 0xff );
outportb( PPI2_C, 0xff );
do{
dot = 0xfe;
for( i = 0; i != 8; i++ )
{
outportb( PPI2_B, dot );
dot <<= 1;
dot = ( dot | 0x01 );
wait(30000);
}

}
}while(1);

Page | 48

(6.2). Matrix Scroll right to left


Flow Chart

Page | 49

C 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 = 0x80;
for( i = 0; i != 8; i++ )
{
outportb( PPI2_C, dot );
dot >>= 1;
wait(30000);
}
}while(1);
}

Page | 50

(6.3). Matrix - Display R


Flow Chart

Page | 51

C Code
#include

"mde8086.h"

/* Output Font 'R' */


int font[8] = { 0xff, 0x80, 0x77, 0x77,
0x73, 0xb5, 0xce, 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);
}

Page | 52

(6.4). Scroll 'R' from left to center


Flow Chart

Page | 53

C Code
#include

"mde8086.h"

/* Output Font 'R' */


int

font1[8] = { 0xff, 0xff, 0xff, 0xff,


0xff, 0xff, 0xff, 0xff };

int

font2[8] = { 0xce, 0xff, 0xff, 0xff,


0xff, 0xff, 0xff, 0xff };

int

font3[8] = { 0xb5, 0xce, 0xff, 0xff,


0xff, 0xff, 0xff, 0xff };

int

font4[8] = { 0x73, 0xb5, 0xce, 0xff,


0xff, 0xff, 0xff, 0xff };

int

font5[8] = { 0x77, 0x73, 0xb5, 0xce,


0xff, 0xff, 0xff, 0xff };

int

font6[8] = { 0x77, 0x77, 0x73, 0xb5,


0xce, 0xff, 0xff, 0xff };

int

font7[8] = { 0x80, 0x77, 0x77, 0x73,

Page | 54

0xb5, 0xce, 0xff, 0xff };

int

font8[8] = { 0xff, 0x80, 0x77, 0x77,


0x73, 0xb5, 0xce, 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;

Page | 55

}
}
}

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);
}

Page | 56

(5). Scroll 'R' from center to left


Flow Chart

Page | 57

C Code
#include

"mde8086.h"

/* Output Font 'R' */


int

font8[8] = { 0xff, 0xff, 0xff, 0xff,


0xff, 0xff, 0xff, 0xff };

int

font7[8] = { 0xce, 0xff, 0xff, 0xff,


0xff, 0xff, 0xff, 0xff };

int

font6[8] = { 0xb5, 0xce, 0xff, 0xff,


0xff, 0xff, 0xff, 0xff };

int

font5[8] = { 0x73, 0xb5, 0xce, 0xff,


0xff, 0xff, 0xff, 0xff };

int

font4[8] = { 0x77, 0x73, 0xb5, 0xce,


0xff, 0xff, 0xff, 0xff };

int

font3[8] = { 0x77, 0x77, 0x73, 0xb5,


0xce, 0xff, 0xff, 0xff };

int

font2[8] = { 0x80, 0x77, 0x77, 0x73,

Page | 58

0xb5, 0xce, 0xff, 0xff };

int

font1[8] = { 0xff, 0x80, 0x77, 0x77,


0x73, 0xb5, 0xce, 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;

Page | 59

}
}
}

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);
}

Page | 60

Chapter: Seven
Appendix
(7.1) MDA-8086 Memory Circuit

Page | 61

(7.2) MDA-8086 Connector (CON10) CIRCUIT

3. 8086 Pin configuration.

Page | 62

(7.3) 8086 Instruction Set Summary


8086 REGISTER MODEL

Page | 63

(7.4) MDA-8086 schematic

Page | 64

Page | 65

Page | 66

Page | 67

Page | 68

Page | 69

References
Microprocessor Architecture, Programming, and Application with the 8085
-Ramesh Gaonkar
Microprocessor and Interfacing
-D.V Hall
Microcomputer Systems: 8086/8088 Family
-Y. Liu and G.A Gibson
The 8088 and 8086 Microprocessors: Programming, Interfacing, Software, Hardware, and
Applications
- Walter A. Triebel

www.wikipedia.org
www.google.com
www.midaseng.com

Page | 70

You might also like