MPMC LAB
MPMC LAB
NO. SUBMISSION
8086 µP KIT –Programs
1 16 Bit data addition and subtraction 3
2 16 Bit multiplication and division 7
3 Sum of an Array and matrix addition 10
4 BCD addition and Subtraction 15
5 Find largest and smallest data in an array 20
6 Ascending and descending order in an array 25
7 BCD to binary conversion and String manipulation 30
8051µC KIT –Programs
1 16 Bit addition 34
2 8 Bit subtraction 37
3 8 Bit multiplication 39
4 Find a square of a Number 41
5 8 Bit division 43
6 Decimal number into Hexa decimal number conversion 46
7 Find largest and smallest number in an array 49
8. One’s complement and two’s complement of a Number 55
Interfacing With 8086 µp KIT
1 Interface 8255 57
2 Interface 8279 59
3 Stepper Motor Interface 62
4 ADC Interface 65
5 DAC Interface 67
Interfacing With 8051µC KIT
1 Interface 8255 69
2 Interface 8279 71
3 Stepper Motor Interface 73
4 ADC Interface 77
5 DAC Interface 79
AIM:
To add and subtract two 16 bit numbers and stored at consecutive memory locations using 8086 Kit.
APPARATUS REQUIRED:
Procedure:
Thus the 16-bit addition and subtraction of two 16- bit number was successfully executed.
AIM:
To multiply two16 bit numbers and division of given 16 bit number and stored the result at
consecutive memory locations using 8086 Kit.
APPARATUS REQUIRED:
MEMORY
CONTENT
ADDRESS
DATA 1
1100 DC
1101 FE
DATA 2
1102 98
1103 BA
RESULT
1104 C3
1105 B9
1106 A0
1107 2A
MEMORY
CONTENT
ADDRESS
DIVIDEND
1100 0F
1101 00
DIVISOR
1102 02
QUOTIENT
1103 07
REMINDER
1104 01
PROCEDURE:
RESULT:
Thus the 16-bit Multiplication and division of 16- bit number was successfully executed.
AIM:
To find a sum of an array and matrix addition using 8086, stored the result at consecutive memory
locations in the memory.
APPARATUS REQUIRED:
Sum of an array:
MEMORY
CONTENT
ADDRESS
COUNT
1100 05
INPUT DATA
1101 01
1102 03
1103 02
1104 04
1105 00
OUTPUT DATA
1200 0A
1201 00
Matrix addition:
MEMORY CONTENT
ADDRESS
SUM MATRIX
1501 08
1502 06
1503 02
1504 06
1505 0A
1506 09
1507 0A
1508 08
1509 0D
PROCEDURE:
Thus the sum of an array and matrix addition was successfully executed.
AIM:
To perform BCD addition and BCD subtraction using 8086, stored at consecutive memory
locations in the memory.
APPARATUS REQUIRED:
MEMORY
CONTENT
ADDRESS
DATA 1
1100 08
1101 02
DATA 2
1102 01
1103 03
SUM
1104 09
1105 05
CARRY
1106 00
BCD SUBTRACTION:
PROCEDURE:
Thus the BCD addition and subtraction program was successfully executed.
AIM:
To find largest Data and Smallest Data in an Array using 8086, stored at consecutive memory
locations in the memory.
APPARATUS REQUIRED:
MEMORY
CONTENT
ADDRESS
COUNT
1100 05
INPUT DATA
1101 02
1102 03
1103 04
1104 0A
1105 0F
OUTPUT DATA
1200 0F
PROCEDURE:
Thus find the largest data and smallest data in an array program was successfully executed.
AIM:
To arrange the datas in Ascending and Descending order in an Array using 8086, stored at
consecutive memory locations in the memory.
APPARATUS REQUIRED:
PROCEDURE:
Thus arranged the data in the ascending order and descending order program was successfully
executed.
AIM:
To convert BCD to Binary number and String Manipulation using 8086, stored at consecutive
memory locations in the memory.
APPARATUS REQUIRED:
MEMORY
CONTENT
ADDRESS
BCD
1100 12
BINARY
1101 0C
MEMORY MEMORY
CONTENT CONTENT
ADDRESS ADDRESS
INPUT STRING OUTPUT STRING
1100 E 1200 E
1101 C 1201 C
1102 E 1202 E
PROCEDURE:
Thus conversion of BCD to Binary number and String Manipulation program was successfully
executed.
AIM:
To add two 16-bit numbers and store the result in memory using 8051 Kit
APPARATUS REQUIRED:
PROGRAM:
AIM:
To subtract two 8-bit numbers and store the result in memory using 8051 Kit
APPARATUS REQUIRED:
PROGRAM:
RESULT:
Thus the subtraction of two 8 bit numbers was performed by using 8051 microcontroller
Kit.
AIM:
To multiply two 8-bit numbers and store the result in memory using 8051 Kit
APPARATUS REQUIRED:
PROGRAM:
RESULT:
Thus the Multiplication of two 8 bit numbers was performed by using 8051 microcontroller
Kit.
AIM:
To Find Square of two 8-bit number and store the result in memory using 8051 Kit
APPARATUS REQUIRED:
PROGRAM:
SAMPLE DATA: 0A
#DATA1:0A, #DATA2:0A
RESULT: 4500 64
RESULT:
Thus the Square of two 8-bit numbers was performed by using 8051 microcontroller Kit.
AIM:
To divide two 8-bit numbers and store the result in memory using 8051 Kit
APPARATUS REQUIRED:
RESULT:
Thus the Division of two 8-bit numbers was performed by using 8051 microcontroller Kit.
AIM:
To convert Decimal number Hexa decimal number into equivalent stores the result in memory
using 8051 Kit.
APPARATUS REQUIRED:
RESULT:
Thus the conversion of decimal to hexa decimal was performed by using 8051
microcontroller Kit.
PROGRAM(Smallest)
MEMORY
CONTENT
ADDRESS
COUNT
4200 05
INPUT ARRAY
4201 01
4202 08
4203 05
4204 07
4205 0F
SMALLEST DATA
4500 01
PROCEDURE:
AIM:
To find a one’s complement and two’s complement of a number and stores the result in memory
using 8051 Kit.
APPARATUS REQUIRED:
RESULT:
Thus the one’s complement and two’s complement of a number was performed by using
8051 microcontroller Kit.
AIM:
To interface the programmable peripheral interface 8255 with 8086 microprocessor Kit.
APPARATUS REQUIRED:
Procedure:
1. Enter the program starting from 1000H
2. Set a known data using DPDT switch.
3. Execute the program.
4. After that the data set by the DPDT switch is stored in the memory location 1500H.
RESULT:
Thus the interface 8255 with 8086 was performed successfully.
APPARATUS REQUIRED:
ADDRE
LABEL MNEMONIC LABEL
SS
1000 MOV AL,00
1003 OUT C2,AL
1006 MOV AL,0CC
1009 OUT C2,AL
100C MOV AL,90
100F OUT C2,AL
1012 MOV AL,88
1015 OUT C0,AL
1018 MOV AL,0FF
101B MOV CX,0005
101F NEXT OUT C0,AL
1022 LOOP 101F NEXT
1024 HLT
ADDRE
LABEL MNEMONIC LABEL
SS
1000 START MOV SI,1200
1004 MOV CX,000F
1008 MOV AL,10
100B OUT C2,AL
100D MOV AL,00
1010 OUT C2,AL
1012 MOV AL,90
1015 OUT C2,AL
1017 NEXT MOV AL,[SI]
1019 OUT C0,AL
101B CALL 1500 DELAY
101E INC SI
101F LOOP 1017 NEXT
1021 JMP 1000 START
DELAY
ADDRE
LABEL MNEMONIC LABEL
SS
1500 DELAY MOV DX,0A0FF
1504 LOOP1 DEC DX
1505 JNZ 1504 LOOP1
1507 RET
LOOK UP TABLE:
1200 FF
1201 FF
1202 FF
1203 FF
1204 FF
1205 FF
1206 FF
1207 FF
1208 98
1209 68
120A 7C
120B C8
120C FF
120D 1C
120E 29
120F FF
RESULT:
Thus the interface 8279 with 8086 was performed successfully.
AIM:
To Interface Stepper motor with the micro processor 8086 and rotate the motor both forward and
reverse direction.
APPARATUS REQUIRED:
PROGRAM:
TABLE:
PROCEDURE:
1. Connect the Stepper motor Interface to the microprocessor kit using Bus connecter.
2. Enter the program in 8086 kit.
3. Execute the program.
4. After the execution of the program the motor was rotated both forward and reverse direction.
Stepper motor
µprocessor Interface
8086kit board
Stepper motor
RESULT:
Thus the Interface Stepper motor is connected with the microprocessor 8086 and rotate the
motor both forward and reverse direction was successfully done.
AIM:
PROGRAM:
PROCEDURE:
1. Place jumper J2 in B Position.
2. Place jumper J5 in A position.
3. Enter and execute the above program.
4. Vary the analog input (using trim pot) and give the SOC by pressing the SOC switch.
5. See the corresponding digital value in the LED display.
Jumper(J2)
Block diagram:
RESULT:
Thus the interface ADC with 8086 was performed successfully.
AIM:
Block diagram:
RESULT:
Thus the interface DAC with 8086 was performed successfully.
AIM:
To interface the programmable peripheral interface 8255 with 8051 microcontroller Kit.
APPARATUS REQUIRED:
Procedure:
1. Enter the program starting from 4100H
2. Set a known data using DPDT switch.
3. Execute the program.
4. After that the data set by the DPDT switch is stored in the memory location 4500H.
Block diagram:
RESULT:
Thus the interface 8255 with 8086 was performed successfully.
AIM:
APPARATUS REQUIRED:
BLOCK DIAGRAM:
PROCEDURE:
1. Connect the Interface 8279 to the microcontroller 8051 kit at the I/O Port using Bus connecter.
2. Enter the program in 8051 kit.
3. Execute the program.
4. After execution of the program the Letter “A” was displayed on the seven segment display of an
Interface Kit 8279.
RESULT:
Thus the interface 8279 was successfully connected with microcontroller Kit and the given
program was executed.
AIM:
To Interface Stepper motor with the microcontroller 8051 and rotate the motor both forward and
reverse direction.
APPARATUS REQUIRED:
BLOCK DIAGRAM:
1. Connect the Stepper motor Interface to the microcontroller 8051 kit at the I/O Port1 using Bus
connecter.
2. Enter the program in 8051 kit.
3. Execute the program.
4. After the execution of the program the motor was rotated both forward and reverse direction.
PROGRAM:
RESULT:
Thus the Interface Stepper motor is connected with the microcontroller 8051 and rotate the
motor both forward and reverse direction was successfully done.
AIM:
PROGRAM:
PROCEDURE:
1. Place jumper J2 in B Position.
2. Place jumper J5 in A position.
3. Enter and execute the above program.
4. Vary the analog input (using trim pot) and give the SOC by pressing the SOC switch.
5. See the corresponding digital value in the LED display.
Jumper(J2)
Block diagram:
RESULT:
Thus the interface ADC with 8051 was performed successfully.
AIM:
Block diagram:
RESULT:
Thus the interface DAC with 8086 was performed successfully.