You are on page 1of 15

Microprocessor |-1-

EXPERIMENT 1
AIM:
Familiarization with 8086 trainer kit

APPARATUS:
ESA 8086 Trainer kit

THEORY:
In the minimal working of configuration of a microprocessor, we consider a memory, keyboard,
display system and I/O ports along with the CPU. In general all these devices are called
peripheral devices.
ESA 86/88 3 is an advanced general purpose microcomputer system that can be operated
either with 8086 or 8088 CPU and provides the user a powerful and complete tool for
programming and applications development. They have 16 bit wide data bus.

SYSTEM CAPABILITIES:
1.
2.
3.
4.
5.
6.
7.

Assemble 8086/8088 instruction mnemonics using ESA symbolic assembler.


HEX bytes from memory into 8086/88 CPU instruction.
Execute the system program at full speed or debug the program through single step.
Modify processor registers.
Write or read data to or from I/O ports in bytes or word format.
Compatible with a host PC usually through RS 233 or RS 485 interface.
Upload user program to host computer system and save them as HEX files on the
system.
8. 8 bit digital to analog converter.
9. Program popular EPROMs 2716 through 27512 using EPROM programme software.

SPECIFICATIONS:
CPU: 8086/88 running at 8 MHz in maximum mode.
Memory: 67EDEC 32 pin sockets provide the following memory configuration.
Coprocessor: 8087
RAM: 256 KB using 628128
512 KB using 628512
EPROM: 128 KB using 27512
256 KB using 27010

ANSHUMAN, 111405

Microprocessor |-2-

Expansion memory: 2 slots


Peripherals: Controller and interfacing options.
SCN 2681: Dual Universal asynchronous transmitter/ receiver supporting standard baud rate up
to 38400 selected through on board DIP switch.
8253-5: Programmable Interval Timer providing 3 independent timing channels to the user.
8259A: Programmable Interrupt Controller (PIC) provides interrupt vector for 7 independent
sources.
8288: Bus Controller used to generate control signals.
8042: Universal Peripheral Interface for PC keyboard interfacing.

INTERRUPTS:
1. External:
a. NMI: Non Maskable Interrupt
b. INTR: Controlled by on board 8259A PIC
2. Internal:
a. Single Step Interrupt
b. INT instruction interrupt

INTERFACING OPTIONS:

Parallel printer interface


On board 8 channel 12 bit A to D converter
On board 8 bit D to A converter
ES6 EPROM programmable interface

POWER SUPPLIES:

5V at 1.5A (max)
12V at 250mA (max) for ADC

DIMENSIONS:
(L) 365mm (B) 1275mm (H) 55mm approx.

SCOPE OF SUPPLY:

ESA 86/88 3 trainer


User manual with schematics
Driver software (CD) for windows
RS232 cable
MSC-86 assembly language reference card

ANSHUMAN, 111405

Microprocessor |-3-

EXPERIMENT - 2
AIM:
To perform following arithmetic operations:
i) A= B+C ii) A=B*C iii) A=(B+C-D)*3 iv) ABC+D *C

APPARATUS:
ESA 86 3 trainer kit, Power Supply

PROGRAM:
i) A=B+C
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2006
0000:2008

MOV
MOV
ADD
INT

AX, 0013
BX, 0014
AX,BX
03

OUTPUT:
AX = 001B
SI = 0000
IP = 2008

BX = 000F
DI = 0000

CX = 0000
DS = 0000

DX = 0000
SS = 0000

SP = 0000
ES = 0000

BP = 0000
CS = 0000

SP = 0000
ES = 0000

BP = 0000
CS = 0000

ii) A=B*C
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2006
0000:2008

MOV
MOV
MUL
INT

AX, 0013
BX, 0014
BX
03

OUTPUT:
AX = 00B6
SI = 0000
IP = 2008

BX = 000F
DI = 0000

CX = 0000
DS = 0000

ANSHUMAN, 111405

DX = 0000
SS = 0000

Microprocessor |-4-

iii) A=(B+C-D)*3
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2006
0000:2008
0000:200B
0000:200E
0000:2010

MOV AX, 0013


MOV BX, 0014
ADD AX,BX
MOV BX, 0002
SUB AX,BX
MUL 3
INT 03

OUTPUT:
AX = 004B
SI = 0000
IP = 2010

BX = 0002
DI = 0000

CX = 0000
DS = 0000

DX = 0000
SS = 0000

SP = 0000
ES = 0000

BP = 0000
CS = 0000

SP = 0000
ES = 0000

BP = 0000
CS = 0000

iv) ) ABC+D *C
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2006
0000:2008
0000:200B
0000:200D
0000:2010
0000:2013
0000:2015
0000:2018
0000:201A
0000:201B

MOV
MOV
MUL
MOV
MUL
MOV
ADD
NOT
MOV
MUL
NOT
INT

AX, 0002
BX, 0003
BX
BX,0006
BX
BX, 0004
AX, BX
AX
BX, 0002
BX
AX
03

OUTPUT:
AX = 0051
SI = 0000
IP = 201B

BX = 0002
DI = 0000

CX = 0000
DS = 0000

ANSHUMAN, 111405

DX = 0000
SS = 0000

Microprocessor |-5-

EXPERIMENT - 3
AIM:
Write a program to find the average of two numbers.

APPARATUS:
ESA 86 3 trainer kit, Power Supply

PROGRAM:
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2006
0000:2008
0000:200B
0000:200D

MOV
MOV
ADD
MOV
DIV
INT

AX,0010
DX,0016
AX, BX
CX, 02
CX
03

OUTPUT:
AX = 000D
SI = 0000
IP = 200D

BX = 0016
DI = 0000

CX = 0000
DS = 0000

ANSHUMAN, 111405

DX = 0000
SS = 0000

SP = 0000
ES = 0000

BP = 0000
CS = 0000

Microprocessor |-6-

EXPERIMENT 4
AIM:
Write a program to find the factorial of a given number

APPARATUS:
Power Supply, ESA 86 3 trainer kit

PROGRAM:
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2005
0000:2008
0000:200A
0000:200C
0000:200D
0000:200F
0000:2011
0000:2013

MOV AX, 0000


MOV DS, AX
MOV SI, 2100
MOV AX, [SI]
MOV BX, AX
L1: DEC BX
JZ 2013
MUL BX
JMP L1
INT 03
ORG 2100
DW 0005

0000:2100

OUTPUT:
AX = 0078
SI = 2100
IP = 2013

BX = 0000
DI = 0000

CX = 0000
DS = 0000

ANSHUMAN, 111405

DX = 0000
SS = 0000

SP = 0100
ES = 0000

BP = 0000
CS = 0000

Microprocessor |-7-

EXPERIMENT 5
AIM:
Write a program to arrange numbers in (a) ascending order and (b) descending order.

APPARATUS:
ESA 86 3 trainer kit, Power Supply

PROGRAM:
4(a) Program to arrange numbers in ascending order:
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2005
0000:2007
0000:2009
0000:200C
0000:200F
0000:2011
0000:2012
0000:2014
0000:2016
0000:2018
0000:201A
0000:201C
0000:201E
0000:2020
0000:2022
0000:2024
0000:2025
0000:2027
0000:202B
0000:202D
0000:202F
0000:2031
0000:2033

MOV AX,0000
MOV DS,AX
MOV BL,05
MOV CL,BL
MOV SI,2100
MOV DI,3100
MOV AL,[SI]
INC SI
DEC CL
JZ 2022
CMP AL,[SI]
JNA 2011
MOV AH,AL
MOV AL,[SI]
MOV [SI],AH
JMP 2011
MOV [DI],AL
INC DI
MOV SI,DI
SUB SI,1000
DEC BL
JZ 2033
MOV CL,BL
JMP 200F
INT 03
ORG 2100
DB 05 0A 0F 1F 04

0000:2100

ANSHUMAN, 111405

Microprocessor |-8-

OUTPUT:
0000:3100

04 05 0A 0F 1F

4(b) Program to arrange numbers in descending order:


ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2005
0000:2007
0000:2009
0000:200C
0000:200F
0000:2011
0000:2012
0000:2014
0000:2016
0000:2018
0000:201A
0000:201C
0000:201E
0000:2020
0000:2022
0000:2024
0000:2025
0000:2027
0000:202B
0000:202D
0000:202F
0000:2031
0000:2033

MOV AX,0000
MOV DS,AX
MOV BL,05
MOV CL,BL
MOV SI,2100
MOV DI,3100
MOV AL,[SI]
INC SI
DEC CL
JZ 2022
CMP AL,[SI]
JNB 2011
MOV AH,AL
MOV AL,[SI]
MOV [SI],AH
JMP 2011
MOV [DI],AL
INC DI
MOV SI,DI
SUB SI,1000
DEC BL
JZ 2033
MOV CL,BL
JMP 200F
INT 03
ORG 2100
DB 05 0A 0F 1F 04

0000:2100

OUTPUT:
0000:3100

1F 0F 0A 05 04

ANSHUMAN, 111405

Microprocessor |-9-

EXPERIMENT - 6
AIM:
Write a program to generate Triangular waveform.

APPARATUS:
Power Supply, ESA 86/88-3, 8086 kit, CRO

PROGRAM:
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2005
0000:2006
0000:2009
0000:200C
0000:200F
0000:2010
0000:2012
0000:2015
0000:2017
0000:201A
0000:201D
0000:201E
0000:2020
0000:2023
0000:2025
0000:2027
0000:2028
0000:2029
0000:202A
0000:202B

MOV DX, 0FFD6


MOV AL, 80
OUT DX, AL
AGN: MOV CX, 0FF
MOV AX, 0000
UP: MOV DX, 0FFD0
OUT DX, AL
INC AL
CALL 2027
LOOP UP
MOV CX, 0FF
DN: MOV DX, 0FFD0
OUT DX, AL
DEC AL
CALL 2027
LOOP DN
JMP AGN
NOP
NOP
NOP
RET
INT 03

OUTPUT:

ANSHUMAN, 111405

M i c r o p r o c e s s o r | - 10 -

EXPERIMENT - 7
AIM:
Write a program to generate Square waveform.

APPARATUS:
Power Supply, ESA 86/88-3, 8086 kit, CRO

PROGRAM:
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2005
0000:2006
0000:2009
0000:200C
0000:200F
0000:2010
0000:2013
0000:2015
0000:2018
0000:201B
0000:201C
0000:201F
0000:2021
0000:2023
0000:2024
0000:2025
0000:2026
0000:2027

MOV DX, 0FFD6


MOV AL, 80
OUT DX, AL
AGN: MOV CX, 0FF
MOV AX, 0000
UP: MOV DX, 0FFD0
OUT DX, AL
CALL 2023
LOOP UP
MOV CX, 0FF
DN: MOV DX, 0FFD0
OUT DX, AL
CALL 2023
LOOP DN
JMP AGN
NOP
NOP
NOP
RET
INT 03

OUTPUT:

ANSHUMAN, 111405

M i c r o p r o c e s s o r | - 11 -

EXPERIMENT - 8
AIM:
Write a program to interface a stepper motor with 8086. Also write a program to change its
speed and rotate it in clockwise and anti-clockwise directions.

APPARATUS:
Power Supply, ESA 86 - 3 trainer kit, Stepper Motor

PROGRAM:
7(a) Program to rotate Stepper Motor in Clockwise direction:
With speed of 7 RPM:
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2005
0000:2006
0000:2009
0000:200B
0000:200C
0000:200F
0000:2011
0000:2013
0000:2016
0000:2018
0000:2019

MOV DX, 0FFE6


MOV AL, 80
OUT DX,AL
MOV DX, 0FFE0
MOV AL, 88
OUT DX, AL
CALL 2013
ROR AL, 1
JMP 200B
MOV CX, 4000
RPT: LOOP RPT
RET
INT 03

OUTPUT:
Stepper motor rotates in CLOCKWISE direction with a speed of 7 RPM.

ANSHUMAN, 111405

M i c r o p r o c e s s o r | - 12 -

With speed of 14 RPM:


ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2005
0000:2006
0000:2009
0000:200B
0000:200C
0000:200F
0000:2011
0000:2013
0000:2016
0000:2018
0000:2019

MOV DX, 0FFE6


MOV AL, 80
OUT DX,AL
MOV DX, 0FFE0
MOV AL, 88
OUT DX, AL
CALL 2013
ROR AL, 1
JMP 200B
MOV CX, 2000
RPT: LOOP RPT
RET
INT 03

OUTPUT:
Stepper motor rotates in CLOCKWISE direction with a speed of 14 RPM.

7(b) Program to rotate Stepper Motor in Anti-clockwise direction:


With speed of 7 RPM:
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2005
0000:2006
0000:2009
0000:200B
0000:200C
0000:200F
0000:2011
0000:2013
0000:2016
0000:2018
0000:2019

MOV DX, 0FFE6


MOV AL, 80
OUT DX,AL
MOV DX, 0FFE0
MOV AL, 88
OUT DX, AL
CALL 2013
ROL AL, 1
JMP 200B
MOV CX, 4000
RPT: LOOP RPT
RET
INT 03

ANSHUMAN, 111405

M i c r o p r o c e s s o r | - 13 -

OUTPUT:
Stepper motor rotates in ANTI-CLOCKWISE direction with a speed of 7 RPM.

With speed of 14 RPM:


ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2005
0000:2006
0000:2009
0000:200B
0000:200C
0000:200F
0000:2011
0000:2013
0000:2016
0000:2018
0000:2019

MOV DX, 0FFE6


MOV AL, 80
OUT DX,AL
MOV DX, 0FFE0
MOV AL, 88
OUT DX, AL
CALL 2013
ROL AL, 1
JMP 200B
MOV CX, 2000
RPT: LOOP RPT
RET
INT 03

OUTPUT:
Stepper motor rotates in ANTI-CLOCKWISE direction with a speed of 14 RPM.

ANSHUMAN, 111405

M i c r o p r o c e s s o r | - 14 -

EXPERIMENT 9
AIM:
Write a program to glow LED using relays.

APPARATUS:
Power Supply, ESA 86 - 3 trainer kit, LED, 16 relays.

PROGRAM:
ADDRESS

MNEMONICS

0000:2000
0000:2003
0000:2006
0000:2007
0000:200A
0000:200D
0000:200E
0000:2011
0000:2012
0000:2014
0000:2016
0000:2019
0000:201A
0000:201B
0000:201E
0000:201F
0000:2021
0000:2023
0000:2025
0000:2027
0000:2029
0000:202C
0000:202D
0000:202E
0000:2031
0000:2032
0000:2034
0000:2036
0000:2038
0000:203A
0000:203D
0000:203E
0000:2041

MOV AX, 80
MOV DX, 0FFE6
OUT DX, AX
START: MOV AX, 0000
MOV DX, 0FFE0
OUT DX, AX
MOV DX, 0FFE2
OUT DX, AX
INC AL
MOV BL, 08
LOOP1: MOV DX, 0FFE0
OUT DX, AX
PUSH AX
CALL 203D
POP AX
MOV CL, 01
ROL CL, AL
DEC BL
JNE 2016
MOV BL, 08
LOOP2: MOV DX, 0FFE2
OUT DX, AX
PUSH AX
CALL 203D
POP AX
MOV CL, 01
ROL AL, CL
DEC BL
JNE 2029
JMP 2007
DELAY: PUSH CX
MOV CX, 0FFFF
SAME: LOOP 2041

ANSHUMAN, 111405

M i c r o p r o c e s s o r | - 15 0000:2043
0000:2044
0000:2045

POP CX
RET
INT 03

OUTPUT:
LEDs corresponding to each relay glows in a serial pattern.

ANSHUMAN, 111405

You might also like