Académique Documents
Professionnel Documents
Culture Documents
MICROPROCESSOR THEORY
&
IT'S APPLICATIONS
LECTURE -31
SUBMITTED BY:
15478;
15481;
DESCRIPTION:
->It has 3 external ports.
Port A -8 bit
Port B - 8 bit
Port C - 6 bit (can be configured to use both
Port A and Port B)
->It has 256 Byte internal RAM.If extra memory is
required seperate external memory chips are to
be used.
2
->8155 has on chip demultiplexing circuit,
therefore AD0-AD7 pins of 8085 are directly
connected to AD0-AD7 pins of 8155.
->8155 also contains separate (internal) Control
signal generator circuit, therefore the IO/M(bar),
RD(bar) and WR(bar) control signals are directly
connected to 8155.
->Reset out pin of 8085 is connected to reset pin
of 8155.
->It also includes a 14 bit timer
8085 8155
Reset out ----------> Reset
Clock out ----------> Timer IN
->It is down count timer which decrements by 2
bit
3
PIN CONFIGURATION:
4
Handshaking:
Handshaking is a I/O control method to
synchronize I/O devices with the
microprocessor.
As many I/O devices accepts or release
information at a much slower rate than the
microprocessor, this method is used to
control the microprocessor to work with a
I/O device at the I/O devices data transfer
rate.
Control register:
->It is a 8-bit which defines different functions.
->It defines the function of different ports such as
input, output or handshaking mode.
->It also defines timer command for timer to start
and stop.
->Commands for 8155 are stored in this register.
Control Word:
->A command/instruction for 8155 is also called
control word.
->This control word is written to control register
of 8155.
5
fig 1.0
->A0,A1,A2 internally varies in 8155.If A3 to A7 is
taken 1 then address of control register is F8H
->WR' and RD' will decide whether we are
accessing command register or status register.
6
->For every clock pulse timer decreases by 2.
->From the above figure modes for port C are
varied using D2 and D3.
7
8
Program:
MVI A,#02H /* D0 is set to 0 and D1 is set to 1
for port A to read input, for port B to display
output */
OUT F8 /* A0,A1,A2 is set to 0 so that
control register is selected. */
IN F9 /* A0 is set to one so that port A is
selected to read the input from Dip switch */
OUT FA /* A1 is set to 1 so that port B is
selected and output is displayed on 7 segment
display */
10