0% found this document useful (0 votes)
4 views39 pages

Microprocessor Module3

The document discusses programming techniques for the 8085 microprocessor, including looping, counting, and indexing, which are essential for executing instructions repeatedly and managing data in memory. It also covers interfacing with devices using the 8255A programmable I/O device and the 8237 DMA controller for efficient data transfer. Additionally, the 8254 programmable interval timer is introduced for timing control, featuring three independent counters for various applications.

Uploaded by

ytecy82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views39 pages

Microprocessor Module3

The document discusses programming techniques for the 8085 microprocessor, including looping, counting, and indexing, which are essential for executing instructions repeatedly and managing data in memory. It also covers interfacing with devices using the 8255A programmable I/O device and the 8237 DMA controller for efficient data transfer. Additionally, the 8254 programmable interval timer is introduced for timing control, featuring three independent counters for various applications.

Uploaded by

ytecy82
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Module 3

8085 Microprocessor
Programming Techniques in Microprocessor 8085
program is an implementation of certain logic by
executing group of instructions.
To implement program logic we need to take help of
some common Programming Techniques in
Microprocessor 8085 such as looping, counting,
and indexing.
Looping, Counting and Indexing
Looping : In this Programming Techniques in
Microprocessor 8085, the Program is instructed to
execute certain set of instructions repeatedly to execute
a particular task number of times. For example, to add
ten numbers stored in the consecutive memory locations
we have to perform addition ten times.
Looping, Counting and Indexing
Counting : This technique allows programmer to count how
many times the instruction/set of instructions are executed.
Indexing : This Programming Techniques in Microprocessor
8085 allows programmer to point or refer the data stored in
sequential memory locations one by one. .
Looping, Counting and Indexing

Time Delay
It is a similar programming technique used to set up a
counter.
Register is loaded with a number depending on the time
delay required and then register is decremented until it
reached zero.
Stack & Subroutines
Interfacing
8255A
8255 is a programmable I/O device that acts as
interface between peripheral devices and the
microprocessor for parallel data transfer. 8255 PPI
(programmable peripheral interface) is programmed in
a way so as to have transfer of data in different
conditions according to the need of the system.
8255A
8255 is a general purpose programmable I/O device
designed to interface the CPU with its outside world such as
keyboard. We can program it according to the given
condition. It can be used with almost any microprocessor.
It consists of three 8-bit bidirectional I/O ports i.e. PORT A,
PORT B and PORT C. We can assign different ports as input
or output functions.
8255A
Depending upon the value if CS’, A1 and A0 we can select different ports in different modes.

CS’ A1 A0 Selection

0 0 0 PORT A

0 0 1 PORT B

0 1 0 PORT C

0. 1. 1. Control register

Control Register:8bit register.Function of 8255 ports are defined by writing a control word in
control register.
8237(DMA controller)
8237
This problem of slow data transfer between
input-output port and memory or between two memory
is avoided by implementing Direct Memory Access
(DMA) technique. This is faster as the
microprocessor/computer is bypassed and the control
of address bus and data bus is given to the DMA
controller.
8237
HOLD – hold signal

HLDA – hold acknowledgement

DREQ – DMA request

DACK – DMA acknowledgement


8254 programmable interval timer
8254 programmable interval timer
8254 is a device designed to solve the timing control problems in a
microprocessor. It has 3 independent counters.

It has 3 counters each with two inputs (Clock and Gate) and one output. Gate is
used to enable or disable counting. When any value of count is loaded and value
of gate is set(1), after every step value of count is decremented by 1 until it
becomes zero.Depending upon the value of CS, A1 and A0 we can determine
addresses of selected counter.

CS A1 A0 SELECETION
0 0 0 C0
0 0 1 C1
0 1 0 C2
0 1 1 Control Register
8254
Applications –

To generate accurate time delay


As an event counter

You might also like