Upload
ranahamid007
View
454
Download
69
Embed Size (px)
DESCRIPTION
It can interface the Trainer with LED, LCD, A/D and D/A, Sound, DOT matrix, and display unit. The interfaced devices are controlled by programming
Citation preview
Project Title
Computer Interface Trainer (MDA-Win8086)
Presented By:Roll: 10015406
What is computer interface?
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.
Introduction to MDA – 8086 Training Kit MDA-8086 is designed for easy function.
After power is on, the monitor begins to work.
The monitor has a memory checking routine.
Figure: 16Bit MDA-8086 Processor Board
FIGURE : MDA-Win8086 SYSTEM CONFIGURATION
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
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.
MDA-8086 SpecificationCPU 8086
Main RAM 64KB(62256 x 2)
Monitor ROM 64KB(27256 x 2)
Display Unit LCD (16 X 2 Line)I/O Port 8255A
Serial Port RS-232C (8251A)
System Clock 14.7456MHz
Clock Generator 8254 (Clock Generator)
Interrupt Controller 8259Timer Controller 8253
Level Meter HG101ADot Matrix 8 X 8 (2 color)
Software-8086 Assembler
- MDA-WinIDE8086 Compiler
Key Board 16 Hexadecimal and 10 function keys
System BUS indicator LED X 12
Extended Connector System BUS : 62 pins External interface : 20 pins
Stepper motor interface Driver T.R X 4A/D, D/A Converter ADC : ADC0804
DAC : DAC0800
Power - Input : AC 85 ~ 264V - Output : DC +5V(2A), +12V(1A), -12V(500mA)
Board size 310 x 265㎜Wood Case 100(H) x 300(D) x 430(W)㎜
Weight 4.5㎏
MDA-8086 Key Functions
Figure: simple description of the key functions.
MDA-Win8086 SYSTEM CONFIGURATION
① 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 signalTo 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.
MDA-Win8086 ADDRESS MAP
Memory map
ADDRESS MEMORY
DESCRIPTION
00000H ~ 0FFFFH
RAM PROGRAM & DATA MEMORY
F0000H ~ FFFFFH
ROM MONITOR ROM
10000H ~ EFFFFH
USER'S RANGE
I/O address mapADDRESS I/O PORT DESCRIPTION00H ~ 07H LCD &
KEYBOARDLCD Display00H : INSTRUCTION REGISTER02H : STATUS REGISTER04H : DATA REGISTERKEYBOARD01H : KEYBOARD REGISTER (Only read)01H : KEYBOARD FLAG (Only write)
10H ~ 17H 8259/SPEAKER 8259(Interrupt controller)10H : COMMAND REGISTER12H : DATA REGISTERSPEAKER -> 11H : SPEAKER
ADDRESS I/O PORT DESCRIPTION08H ~ 0FH 8251 / 8253 8251(Using to data
communication)08H : DATA REGISTER0AH : INSTRUCTION / STATUS REGISTER8253(TIMER/COUNTER)09H : TIMER 0 REGISTER0BH : TIMER 1 REGISTER0DH : TIMER 2 REGISTER0FH : CONTROL REGISTER
ADDRESS I/O PORT DESCRIPTION18H ~ 1FH 8255A-CS1/
8255A-CS28255A-CS1(DOT & ADC INTERFACE)18H : A PORT DATA REGISTER1AH : B PORT DATA REGISTER1CH : C PORT CONTROL REGISTER8255-CS2(LED & STEPPING MOTOR)19H : A PORT DATA REGISTER1BH : B PORT DATA REGISTER1DH : C PORT CONTROL REGISTER1FH : CONTROL REGISTER
ADDRESS I/O PORT DESCRIPTION20H ~ 2FH I/O EXTEND CONNECTOR
30H ~ FFH USER'S RANGE
BASIC OPERATION On a power-up, following message will be
displayed on a LCD.
System Reset Key Whenever RES is pressed, the display
becomes one of this two figures.
RES
To select the Machine Code and Serial monitor mode with P1 switch.
Serial Monitor is the basic monitor program to do data communicate between MDA-8086 and computer.
Machine Code Serial monitor
How to connect MDA‐Win8086 to PC
: :
About MDA-WinIDE8086
Assembling and Compiling the source
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.
Trainer possible experiment 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
List of completed Experiment
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.
√ (1) 7-Segment Display
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 a b c d e f g0 1 1 1 1 1 1 01 0 1 1 0 0 0 02 1 1 0 1 1 0 13 1 1 1 1 0 0 14 0 1 1 0 0 1 15 1 0 1 1 0 1 16 1 0 1 1 1 1 17 1 1 1 0 0 0 08 1 1 1 1 1 1 19 1 1 1 1 0 1 1
Flow Chart: 7-segment display
Set x <- 0
Write: pins <- x
Delay
Increment x by 1
Start MPU
X=10?
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);}
Explanation In common-anode 7-Segment LED, logic 0 is
required to turn on a segment.
0xc0, =11000000B =00111111(inverse)
0xf9,=11111001B =00000110(inverse)
Digit a b c d e f g0 1 1 1 1 1 1 01 0 1 1 0 0 0 0
0xa4,=10100100B =01011011(inverse)
0xb0, =10110000B =01001111(inverse)
0x99,=10011001B =01100110(inverse)
0x92,=10010010B =01101101(inverse)
0x82,=10000010B =01111101(inverse)
0xf8, =11111000B =00000111(inverse)
0x80,=10000000B =01111111(inverse)
0x90, =10010000B =01101111(inverse)
0x00 =00B
√ (2) LCD Message Display List of completed Experiment
#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);}
√ (3) LCD- Scroll the message center to rightList of completed Experiment
#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);}
List of completed Experiment
√ (4). LCD – Scroll a message right to left √ (5). Matrix –Scroll top to bottom. √ (6). Matrix –Scroll left to right. √ (7). Matrix - Display ‘A’. √ (8). Matrix – Scroll ‘A’ left to right. √ (9). Matrix – Scroll ‘A’ top to bottom. √ (10). LED display
What we have done?
√ (1). Matrix –Scroll bottom to top.√ (2). Matrix –Scroll right to left.√ (3). Matrix - Display ‘R’√ (4). Scroll 'R' from left to center√ (5). Scroll 'R' from center to left
Thank you