Professional Documents
Culture Documents
MICROPROCESSOR LABORATORY
L T P
0 0 2
A. Study Experiments
4 To develop and run a program for finding out the largest/smallest number from a given set of
numbers.
5 To develop and run a program for arranging in ascending/descending order of a set of numbers
6 To perform multiplication/division of given numbers
7 To perform conversion of temperature from 0F to 0C and vice-versa
8 To perform computation of square root of a given number
9 To perform floating point mathematical operations (addition, subtraction, multiplication and
division)
EXPERIMENT 1
OBJECT: To study the 8085 microprocessor training kit (VMC- 8509)
THEORY:
General
The system has got 8085 as the central processing unit. The clock freq for the system is 3.07
MHz and is generated from a crystal of 6.14 MHz.
8085 has got 8 data lines and 16 address lines. The lower 8 address lines and 8 data lines are
multiplexed. Since the lower 8 address bits appear on the bus during the first clock cycle of a machine
cycle and the 8 bit data appears on the bus during the second and third clock cycle, It becomes
necessary to latch the lower 8 address bits during the first clock cycle so that the 16 bits address
remains available in subsequent cycle. This is achieved using a latch a 74-LS-373.
MEMORY: -
VMC-850X provides 2/8k bytes of RAM using 6116-6264 chips and 4k/8k bytes of EPROM for
monitor.
The various chips which can be used are 2732, 2764, 27128, 27256, 6116 and 6264. There is one
memory space provided on VMC 850CX. This one space can be defined any address slots from 3000-
FFFF depending upon the size of the memory chip to be used.
INPUT/OUTPUT DEVICES
The various I/O chips used in VMC8501 are 8279, 8255 & 8253 and VMC8502 are 8279, 8255,
8253 & 8151.The functional role of all these chips is given below: -
Function Key
Operation
RESET Reset the system.
PRECAUTIONS:
EXPERIMENT 2
OBJECT: Study of 8086 microprocessor training kit.
THEORY: VMC-8609 is a single board microprocessor training /development kit configured around
the INTELs 16 bit microprocessor 8086. The kit has been designed to operate in the max mode.
HARDWARE DESCRIPTION
CPU
8086 is a 16 bit, third generation microprocessor and is suitable for an exceptionally wide spectrum of
microprocessor applications. 8086 has got 16 bit data lines and 20 address lines.
CLOCK GENERATION
The clock generation circuit is an Intels 8284-clock generator/driver. The circuit accepts a crystal
input, which operate at fundamental frequency of 14.7456 MHz. The clock generator/driver divides the
crystal frequency by three to produce the 4.9 MHz CLK signal required by CPU. The clock
generator/driver provides two control signal outputs, which are synchronized (internally) to the 4.9
MHz CLK signals; RDY (ready) and RST (reset).
BUS CONTROLLER
The 8288 is a bus controller which decodes the status signals output by 8089,or a maximum mode
8086.The 8288 issue a bus command that identifies the bus cycle as a memory read, memory write, i/o
read, i/o write, etc. It also provides a signal that strobes the address into latches.
BUS ARBITERS
The 8289 is a bus arbiter that controls the access of a processor to multimaster system resources
(typically memory) that is shared by two or more microprocessors.
MEMORY
VMC-8609 provides 16K byte of EPROM loaded with monitor and 16K bytes of CMOS RAM .The
total on board memory can be configured as follows.
EPROM - 512 bytes of EPROM using 27C010, 1024 bytes using 27C020
& 256K bytes using 62C1024.
I/O DEVICES
8279
8279 is a general-purpose programmable keyboard and display I/O interface device Designed for use
with the 8086 microprocessor. It provides a scanned inter face to 28 channel key matrix provided in
VMC-8603 and scanned displays.
8255
8255 is programmable peripheral interface (PPI) designed to use with 8086 microprocessor. This
basically acts as a general purpose I/O component to interface peripheral equipments to the system bus.
8253
This chip is a programmable interval timer/counter and can be used for the generation of accurate time
delays under software control. Various other functions that can be implemented with this chip are
programmable rate generation.
8251
This chip is programmable communication interface and is used as a peripheral device. This device
accepts data characters from CPU in parallel form and then converts them into a continuous serial data
stream for transmission.
DISPLAY
VNC-8609 provides eight digits of seven-segment display. Four digits are for displaying the address of
any location or name or any register, whereas the rest of the four digits are meant for displaying the
contents of memory location or of a resister. All the eight digits of the display are in hexadecimal
notation.
I Interrupt.
PRECAUTIONS:
EXPERIMENT 4
OBJECT: To develop and run a program for finding out the largest / smallest number from a given set
of numbers.
RESULT: The program is executed and the result is stored in 2504H memory location.
PRECAUTION: Before executing the program make sure that it is entered properly
EXPERIMENT 5
OBJECT: To develop and run a program for arranging in ascending/descending order of a set of
numbers.
EQUIPMENT USED: 8085 microprocessor training kit, Power supply, keyboard.
EXPERIMENT 6
OBJECT: To perform Multiplication / Division of given numbers
PROGRAM: Multiplication
2000 LHLD3501
2003 XCHG
2004 LDA3503
2007 LXI H, 0000
200A MVI C, 08
200C DAD H
200D RAL
200E JNC2012
2011 DAD D
2012 DCR C
2013 JNZ 200C
2016 SHLD 3504
2019 RST 5
PROGRAM: Division
2000 LHLD 3501
2003 LDA 3503
2006 MOV B, A
2007 MVI C, 08
2009 DAD H
200A MOV A, H
200B SUB B
200C JC 2011
200F MOV H, A
2010 INR L
2011 DCR C
2012 JNZ 2009
2015 SHLD 3504
2018 RST 5
PRECAUTION: Before executing the program make sure that it is entered properly.
EXPERIMENT 6
PROGRAM: Division
PRECAUTION: Before executing the program make sure that it is entered properly.
EXPERIMENT 7
OBJECT: To perform computation of square root of a number.
PROGRAM:
PRECAUTION: Before executing the program make sure that it is entered properly.
EXPERIMENT 8
Object-To obtain interfacing of keyboard controller
Apparatus required- keyboard interface card, 8085 microprocessor kit, power supply, keyboard
PROGRAM-
RESULT-
PRECAUTIONS:-
Start
Count = 2500H
Pointer = (2501H)
Max = 0
Is
No Max <
(Pointer)
?
Yes
MAX = (Pointer)
Pointer = Pointer + 1
Count = Count - 1
Is
No
Count = 0
?
(3500H) = MAX
END
Start
Initialize address Set
byte counter
Set Accumulator = 00
Is No
Accumulator
Increment addr. pointer > next
number
Transfer datum to
Accumulator
Yes
Is byte
counter = 00
Yes
Store Result
Stop
Start
Set subtraction counter to 1
Set odd number to 1
No Is Yes
remainder
0?
Stop
Odd no. = Odd no. + 2 Stop
Start
Initialize cycle counter, comparison
counter and address pointer
Yes
Is [Acc.]
< next?
No Is comp.
counter = 0?
Yes
Is cycle
counter =
0?
Stop
EXPERIMENT 1
Addition:
2000 LXI H,2501 Load the addres s of first number in H-L pair.
2003 MOV A,M Get first number in accumulato r.
2004 INX H Get addres s of secon d number in H-L pair.
2005 ADD M Add two numbers.
2006 STA 2503H Store result at specified memory location.
2009 RST 5 To set Breakpoint
Subtraction:
2000 LXI H,2501 Load the addres s of first number in H-L pair.
2003 MOV A,M Get first number in accumulato r.
2004 INX H Get addres s of secon d number in H-L pair.
2005 SUB M Subtract two numbers.
2006 STA 2503H Store result at specified memory location.
2009 RST 5 To set Breakpoint
Addition:
2000 LXI H,2501 Load the addres s of first number in H-L pair.
2003 MOV A,M Get first number in accumulato r.
2004 INX H Get addres s of secon d number in H-L pair.
2005 ADD M Add two numbers.
2006 DAA Convert to decimal
2007 STA 2503H Store result at specified memory location.
200A RST 5 To set Breakpoint
Subtraction:
2000 LXI H,2501 Load the addres s of first number in H-L pair.
2003 MOV A,M Get first number in accumulato r.
2004 INX H Get addres s of secon d number in H-L pair.
2005 SUB M Subtract two numbers.
2006 DAA Convert to decimal
2007 STA 2503H Store result at specified memory location.
200A RST 5 To set Breakpoint
PRECAUTION: Before executing the program make sure that it is entered properly.
Start
Stop
Start
Load
Getaddress
Convert
address ofof1st2nd
Accumulatornumber
number
HEXinin
H L pair
number
H L
into
st Decimalpair number
Get 1Subtract
number
Store the two
inResult
Accumulator
number
Stop
EXPERIMENT 2
OBJECT: To perform addition and subtraction of two BCD numbers using 8085
microprocessor.
EQUIPMENT USED: 8085 microprocessor training kit, Power supply, keyboard
PROGRAM:
2000 LXI H,2501H Load the addres s of first number in H-L pair.
2003 MOV C,M Get first number in Register C .
2004 SUB A
2005 MOV B,A
2006 INX H
2007 ADD M
2008 DAA
2009 JNC NOF
200C PUSH PSW
200 MOV A,B
200 ADI 01H
200 DAA
MOV B,A
POP PSW
NOF: DCR C
JNZ 2006
MOV L,A
MOV H,B
Sample problem 1:
(2200H) = 03H
(2201H) = B2H
= 216H
(2300H) = 16H
(2301H) = 02H
Division