Vous êtes sur la page 1sur 6

Department of Electronics & Communication

Course: Microprocessor and its Applications

Course Code: ECE-351

Submitted by: sahil Supehia


Roll no 30
Sec 6803
Reg. no. 10803163

Submitted to:
Mr. Bharat
Design a Calculator using 8085 microprocessor. Input should be provided
using Keyboard and output should be displayed on Display device.

(i) Arithmetic operations ( Addition, Subtraction, Multiplication, Division)


(ii) Logical operations (AND, OR, NOT, XOR)
(iii) Interfacing of Keyboard
(iv) Interfacing of Display device

BLOCK DIAGRAM:

The basic backbone of an microprocessor based calculator.

CONTROL WORD:
It is an 8-bit control register which is used to control the working of 8255. The
Intel 8255 (or i8255) Programmable Peripheral Interface chip is a peripheral chip originally
developed for the Intel 8085 microprocessor, and as such is a member of a large array of such
chips, known as the MCS-85 Family. This chip was later also used with the Intel 8086 and its
descendants.

Eight data lines (D0 - D7) are available (with an 8-bit data buffer) to read/write data into the
ports or control register under the status of the " RD" (pin 5) and WR" (pin 36), which are
active low signals for read and write operations respectively. The address lines A1 and A0
allow to successively access any one of the ports or the control register as listed below:

A1 A0 Function
0 0 port A
0 1 port B
1 0 port C
1 1 control register

For microprocessor interface IC control world reg. value is:


1 0 1 0 0 0 0 0 i.e. A0H

PORT ADDRESS:
Port A=80A0H
Port B=80A1H
Port C=80A2H
CR=80A3H

PROGRAM:
MVI A,A0........load accumulator with the control word
STA 8003........initializing microprocessor interface ic

LDA 8000..........taking first i/p value


MOV B,A..........moving accumulator value to b-reg.
STA 8001...........display on lcd

LXI H,C091………………….initializing operator


MVI A,01........add
STA C091
MVI A,02...............sub
STA C092
MVI A,03.................mul
STA C093
MVI A,04................div
STA C094
MVI A,05........and
STA C095
MVI A,06...............or
STA C096
MVI A,07.................not
STA C097
MVI A,08................xor
STA C098
MVI C,09................equal=
START:LDA 8000........ENTRING OPERATOR

OPERATOR:CMP M…………….checking the applied operator


JZ ADD
INR M

CMP M
JZ SUB
INR M

CMP M
JZ MUL
INR M

CMP M
JZ DIV
INR M

CMP M
JZ AND
INR M

CMP M
JZ OR
INR M

CMP M
JZ NOT
INR M

CMP M
JZ XOR

JMP START

ADD:STA 8001…………………addition
LDA 8000
ADD B

STA 8001
HLT

SUB :STA 8001……………………subtraction


LDA 8000
SUB B

STA 8001
HLT

MUL :STA 8001…………………multiplication


LDA 8000
MOV C,A
LOOP:ADD B
DCR C
JNZ LOOP

STA 8001
HLT

DIV :STA 8001 ……………………division


LDA 8000
MOV C,A
LOOP:SUB B
DCR C
JNZ LOOP

STA 8001
HLT

LOR :STA 8001……………………logical or


LDA 8000
ORA B

STA 8001
HLT

LXOR :STA 8001……………………logical xor


LDA 8000
XRA B

STA 8001
HLT

LAND :STA 8001……………………logical and


LDA 8000
ANA B

STA 8001
HLT

LNOT:STA 8001……………………logical not


MOV A,B
CMA

STA 8001
HLT

Vous aimerez peut-être aussi