0% found this document useful (0 votes)
23 views17 pages

Sample 3186-1

Uploaded by

duke
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)
23 views17 pages

Sample 3186-1

Uploaded by

duke
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/ 17

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/350870710

8086- microprocessor and interfacing and others

Book · April 2012

CITATIONS READS
0 4,910

1 author:

Arun Kumar Rana


Galgotias College of Engineering & Technology
139 PUBLICATIONS 1,356 CITATIONS

SEE PROFILE

All content following this page was uploaded by Arun Kumar Rana on 14 April 2021.

The user has requested enhancement of the downloaded file.


8086-MICROPROCESSOR
&
INTERFACING AND OTHERS
8086-MICROPROCESSOR
&
INTERFACING AND OTHERS
for
(Electronics & Communication Engg., Electrical Engg., Computer Engg.,
Information Tech. & Instrumentation Engg.)

ARUN RANA
Assistant Professor

Department of Electronics & Communication Engineering,


Doon Valley Institute of Engineering & Technology
Karnal, Haryana

Second Edition

AN ISO 9001:2008 CERTIFIED COMPANY

VAYU EDUCATION OF INDIA


2/25, Ansari Road, Darya Ganj, New Delhi-110 002
8086-MICROPROCESSOR AND INTERFACING AND OTHERS

Copyright ©VAYU EDUCATION OF INDIA

ISBN: 978-93-80097-28-2

First Edition: 2010


Second Edition: 2013

Price: 350/-

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or
otherwise, without the prior permission of the Author and Publishers.

Printed & bound in India

Published by:
AN ISO 9001:2008 CERTIFIED COMPANY

VAYU EDUCATION OF INDIA


2/25, Ansari Road, Darya Ganj, New Delhi-110 002
Ph.: 91-11-47236600, 41564445
Fax: 91-11-41564440
E-mail: [email protected]
Web: www.veiindia.com
Dedicated to
My respectable parents, my brothers, my sister, my bhabhi ji
and
Lovely nephew, Aakash Rana
Acknowledgment

We being the teachers of Microprocessor & Interfacing communicated with the students and
found that they were facing problem regarding the complete syllabus in a single book. While teaching
we kept on prepairing covering syllabus, typical problems, experiments and solution to the University
paper which were continuously appreciated by the students. So I planned toconvert these notes in
form of a book on Microprocessor & Interfacing. If you have decide to read this book, then you
have decide to learn about one of the most exciting, challenging, and rapidly advancing field in
technology. This is the field which is known as by several names, some of them being: microprocessor
based design, microprocessor architecture, electronic & the simplest one being microprocessor. The
aim of the book is to deal with microprocessor, their interfacing, supporting chips, interfacing circuits
and devices, peripherals etc. It includes assembly language programming of Intel 8085. This book is
very useful to B.Tech/Diploma. The book is written for the first course of microprocessor, which is
in the curriculum of B.Tech, Diploma.
With the advent of the first 4 bit microprocessor 4004 from Intel Corporation in 1971, there has
been a silent revolution in the domain of digital system deigns, which has shaken many facets of the
current technological progress. In the last 28 years the world has seen an evolution of microprocessors,
whose impact on today’s technological scenario is phenomenal. This evolution was possible because
of the tremendous advance in the semiconductor process technology. The first microprocessor 4004
contained only ten thousand transistor while the component density increase more than threefold in
less than a decide time. Immediately after the introduction of the 4004, the Intel introduces the first
8-bit microprocessor 8008 in 1972: these microprocessors were, however not successful because
their inherent limitation. The first 8-bit functionally complete CPU 8085 was introduced in 1977.
The first 16 bit CPU from Intel was a result of the designer efforts to produce a more powerful
and efficient computing machine. The designer of 8086 CPU had taken note of the major limitation
of the previous generation of the 8 bit CPU. The 8086 contain set of 16-bit general purpose register,
support a 16 bit ALU, a rich instruction set and provide segmented memory addressing scheme. The
entire feature made this 16 bit processor a more efficient CPU. This book is intended as a textbook
on microprocessor and its application’ which is compulsory curse at graduate and diploma level in
many science and engineering branches of the studies, specially in Electronics, Electrical,
Instrumentation, Physics and Computer engineering discipline.
BOOK AIMS
1. To introduce the microprocessor as a programmable digital system element.
2. To provide an understanding of a microprocessor based system as a combination of hardware
and software subsystem and their interaction.
3. To illustrate some basic concept of microprocessor through the use of assembly language
programming.
4. To outline the principle of microprocessor development system.
ARUN RANA
Preface to the First Edition

I
take this opportunity to express my gratitude and thanks to respected Dr. A.K. Garg,
HOD of ECE Deptt. in MMEC, Mullana for his valuable technical suggestions and constant
encouragement, without which this book would not have come into existence.
I am specially gratefull to Mr. Prabh Deep Singh and Mr. Ravinder Singh Bisht, Assistant
prof. of Deptt. of Electronics and comm. Engineering, RPIIT, Bastada, Karnal for his time to
time, much needed valuable guidance.
I am grateful to my younger brothers Ajay Singh Rana and Tushil Rana, for inspiring me
further project.
I would like to express my sincers thanks to Mr. Sumit Rana, Mr. Balvinder Singh, Mr.
Sanjeev Dhiman, Mr. Sanjeev Bawa, Mr. Gurudev Singh, Mr. Ashish Chopra, Mr. Hitesh
Kapoor, Mr. Sandeep Jain, Mr. Prikshit, Mr. Mohit, Mr. Kapil Arora, Mr. Swati Gupta,Ms.
Getika Dua, Ms. Nidhi Uppal, Ms. Nidhi Mittal, Ms. Neha, Ms. Ritu Chabbra for constant
inspiration and encouragement.
I deeply express my heartful thanks to the publishers Vayu Education of India for publishing
this Book in such a beautiful get-up and well in time.

ARUN RANA
Contents

Preface ............................................................................................................................ (v)

1. FUNDAMENTAL OF COMPUTER ............................................................................ 1


1.1 History ................................................................................................................................ 1
1.2 What is a Microprocessor? ................................................................................................. 4
1.3 Classification of Computer .................................................................................................. 4
1.4 Embedded System .............................................................................................................. 5
1.6 The Microprocessor Operations ......................................................................................... 6
1.7 What is a Microcomputer? ................................................................................................. 6
1.8 What is the Power of a Microprocessor? ........................................................................... 7
1.9 Advantages of 8 Bit Microprocessor .................................................................................. 8
1.10 Microprocessor-Based System with Bus Architecture ..................................................... 11
1.11 Microprocessor Instruction Set and Computer Languages ............................................... 12

2. INTRODUCTIONS AND CPU ARCHITECTURE .................................................. 14


2.1 Evolution of Microprocessors ........................................................................................... 14
2.2 Technological Trends in Microprocessrs ........................................................................... 17
2.3 Intel Family Tree: Intel Family Tree is Shown in Table ..................................................... 18
2.4 CISC VS RISC ................................................................................................................. 18
2.5 Microprocessor Applications ............................................................................................. 19
2.6 8086 Block Diagram ......................................................................................................... 20
2.7 Instruction Execution ........................................................................................................ 21
2.8 Internal Registers of 8086 ................................................................................................. 22
xii 8086-MICROPROCESSOR AND INTERFACING AND OTHERS

2.9 Segment Register .............................................................................................................. 24


2.10 Index Registers ................................................................................................................. 26
2.11 PSW (Program Status Word) ........................................................................................... 27
2.12 Queue (FIFO) ................................................................................................................... 28
2.13 Pipelining ........................................................................................................................... 28
2.14 Pin Description of 8086 ..................................................................................................... 29
2.15 Memory Addressing in 8086 ............................................................................................. 35
2.16 Generating 8086 CLK and reset signals using 8284 ......................................................... 36
2.17 System Bus ....................................................................................................................... 40
2.18 Buffered System ............................................................................................................... 41
2.19 Wait States ........................................................................................................................ 43
2.20 Minimum and Maximum Operation Modes ...................................................................... 46

3. 8086 INSTRUCTION SET AND PROGRAMMING TECHNIQUES .................... 50


3.1 Instruction Format ............................................................................................................. 50
3.2 8086 Addressing Modes .................................................................................................... 54
3.3 Instruction Set of 8086 ...................................................................................................... 59
3.4 Assembler Directives ...................................................................................................... 138
3.5 Instruction Set Summary of 8086 .................................................................................... 143
3.6 Assembly Language ....................................................................................................... 148
3.7 Macro ............................................................................................................................. 211
3.8 8086 Timing & Delay ...................................................................................................... 212
3.9 Modular Programming .................................................................................................... 214

4. MAIN MEMORY SYSTEM DESIGN .................................................................... 217


4.1 Use of Memory Devices ................................................................................................ 217
4.2 Pin Connection of Memory ............................................................................................. 218
4.3 Read Only Memory (ROM) ........................................................................................... 220
4.4 Static Ram Devices (SRAM) ......................................................................................... 226
4.6 What have we learnt? ..................................................................................................... 231
4.7 8086 CPU Read/Write Timing Diagram in Maximum Mode .......................................... 232
4.8 8086 CPU Read/Write Timing Diagram in Minimum Mode: .......................................... 234
4.9 Address Decoding Technique ......................................................................................... 236
4.10 Interfacing SRAM: ROMS/PROMS .............................................................................. 239
4.11 Interfacing and refreshing of DRAMS ........................................................................... 244
4.12 TMS 4500 (Dram Controller) ......................................................................................... 248
CONTENTS xiii

5.BASIC INPUT/OUTPUT INTERFACE, INTERRUPT AND DMA ....................... 253


5.1 Parallel and Serial I/O Port Design ................................................................................. 253
5.2 I/O Port Designing .......................................................................................................... 258
5.3 Intefacing Method ........................................................................................................... 260
5.4 PPI - Programmable Peripheral Interface (8255) .......................................................... 262
5.5 8251 Universal Synchronous Asynchronous Receiver Transmitter (USART) ............... 269
5.6 Interfacing Analog to Digital Data Converters ............................................................... 278
5.7 Interfacing Digital to Analog Converters: ....................................................................... 282
5.8 Interfacing Keyboards with 8086 .................................................................................... 285
5.9 Interfacing of 8086 with alphanumeric display................................................................ 289
5.10 High Power Devices and Interfacing with 8086 ............................................................. 295
5.11 8259(PIC) Programmable Interrupt Controller ............................................................... 298
5.12 Interrupt-Driven I/O ....................................................................................................... 305
5.13 Interrupt .......................................................................................................................... 306
5.14 Interrupt Mechanism Interrupt Vector Table .................................................................. 307
5.15 DMA Operation .............................................................................................................. 313
5.16 DMA Controller .............................................................................................................. 315
5.17 Microcomputer Video Display ........................................................................................ 330

6. INTRODUCTION OF 32-BIT MICROPROCESSOR AND FEATURES


OF 8051 MICROCONTROLLER ........................................................................... 335
6.1 80386 Features ................................................................................................................ 335
6.2 80486 Features ................................................................................................................ 336
6.3 Pentium Features ............................................................................................................ 337
6.4 8051 Features.................................................................................................................. 339
6.5 Architecture of 8051 ....................................................................................................... 340
6.6 Application of Microcontrollers ....................................................................................... 343

Glossary ........................................................................................................................ 349


Appendix....................................................................................................................... 359
Question Papers ........................................................................................................... 521
Index ............................................................................................................................. 533
Chapter
Fundamental of
1 Computer

OBJECTIVE: After completing this chapter, the reader should be able to:
• History
• Introduction of Microprocessor
• Micro Computer
• Computer Languages
• Embedded System

1.1 HISTORY
The microprocessor is the combination of solid-state technology development and the
advancing computer technologies which came together in the early 1970s. With the low
cost of a device and the flexibility of a computer, microprocessor is a product which
performs both control and processing functions.

A brief history
The microprocessor of two major technologies; digital computer and solid-state circuits.
These two technologies came together in the early 1970s, allowing engineers to produce
the microprocessor.
The digital computer is a set of digital circuit controlled by a program that makes it
do the job you want done. The program tells the digital how to move process data. It
2 8086-MICROPROCESSOR AND INTERFACING AND OTHERS

does this by using the digital computer’s calculating logic, memory circuits, and I/O
devices. The way, the digital computer’s logic circuits are put together to build the
calculating logic, memory circuits and I/O devices is called its architecture.
The microprocessor is like the digital computer because both do computations under
programming control.
During World War II, scientists developed computers for military use. The latter half
of the 1994s, digital computer was developed to do scientific and business work, Electronic
circuit technology also advanced during World War II. Radar work increased the
understanding of fast digital circuits called pulse circuits. After the war, scientists made
great progress in solid-state physics. Scientists at Bell Laboratories invented the transistor,
a solid-state device, in 1948.

Fig. 1.1: Shows the major events in the two technologies as they developed over the last
five decades from the days of World War II.

In the early 1950s, the first general-purpose digital computer appeared. Vacuum tubes
were used for active electronic components. They were used to build basic logic circuits
such as gates and flip-flops. Vacuum tubes also formed part of the machines built to
communicate with the computer – the I/O (input/output) devices. The first digital
computers were huge, because the vacuum tubes were hot and required air-conditioning.
FUNDAMENTAL OF COMPUTER 3

Vacuum tubes made the early computer expensive to run and maintain. Solid-state circuit
technology also made great strides during the 1950s. The knowledge of semiconductors
increased. The use of silicon lowered costs, because silicon is much more plentiful than
germanium, which had been the chief material for making the early semiconductors. Mass
production methods made transistors common and inexpensive.
In the late 1950s, the designers of digital computers jumped at the chance to replace
vacuum tubes with transistors.
In the early 1960s, the art of building solid-state computers was divided in two
directions. The first direction was building huge solid-state computer by IBM. IT still
required large, air-conditioned rooms and very complicated. IT could process large amounts
of data. These large data processing systems were used for commercial and scientific
application.
The big computer was still very expensive. In order to pay for it had to be run 24
hours a day, 7 days a week. Another direction of development is began building small
computers. These minicomputers were not as powerful as their larger relatives, but they
were not as expensive either. And they still performed many useful functions. By the
early 1960s, the semiconductor industry found a way to put a number of transistors on
one silicon wafer. The transistors are connected together with small metal traces. When
the transistors are connected together, they become a circuit which performs a function,
such as a gate, flip-flop, register, or adder. This new technology created basic
semiconductor building blocks. The building blocks or circuit modules made this way are
called an integrated circuit (IC).
By the mid-1960s, the technology of ICs pushed to develop low-cost manufacturing
techniques. The use of ICs let minicomputers become more and more powerful for their
size. The desk-sized minicomputers of the 1960s became as powerful as a room-sized
computer of the late 1950s. Now $10,000, drawer-sized minicomputers were as powerful
as the older $100,000.
The late 1960s and early 1970, large-scale integration (LSI) become common. Large-
scale integration was making it possible to produce more and more digital circuits in a
single IC.
By the 1980s, very large-scale integration (VLSI) gave us ICs with over 100,000
transistors. By the mid 1970s, LSI had reduced the calculator to a single circuit. After
the calculator was reducing, the next natural step was to reduce the architecture of the
computer to a single IC. The microprocessor was the resulting circuit of achievement.
The microprocessor made possible the manufacture of powerful calculators and many other
products. Microprocessor could be programmed to carry out a <1 single task> Products
like microwave ovens, telephone dialers and automatic temperature-control systems become
common place.
The early microprocessor processed digital data 4 bits (4 binary digits) at a time. These
microprocessors were slow and did not compare to minicomputers. But new generations
of microprocessors came fast. The 4 bit microprocessors grew into 8 bit microprocessors,
then into 16 bit microprocessors, and then into 32 bit microprocessors. During the early
4 8086-MICROPROCESSOR AND INTERFACING AND OTHERS

1980s, complete 8 bit microprocessor systems (microprocessors with memory and


communications ability) were developed. These microcontrollers, or single-chip
microprocessors, have become popular as the basis of controllers for keyboards, VCRs,
TVs, microwave ovens, smart telephones, and a host of other industrial and consumer
electronic devices.

1.2 WHAT IS A MICROPROCESSOR?


The microprocessor uses the same type of logic that is used in a digital computer’s central
processing unit (CPU). Because it is similar to the CPU and it is constructed with
microcircuit (IC) technology. The microprocessor has digital circuit for data handling and
computation under program control. (The microprocessor is a data processing unit) Data
processing is the microprocessor’s main function. Data processing includes both
computation and data handling. Computation is performed by logic circuits that make
up what is usually called the arithmetic logic unit (ALU). These logic circuits enable us
to use functions that cause data changes. Among these functions are Add, Subtract, AND,
OR, XOR, Compare, Increment and Decrement. The ALU cannot perform any of these
functions with out data operation on. In order to process data, the microprocessor must
have control logic which tells the microprocessor how to decode and execute the program.

Program is a set of instructions for processing the data

The control logic steps the microprocessors through the stored program steps
(instructions) in memory. It calls (fetches) them one at a time. After the instruction is
fetched, the microprocessor’s control logic decodes the instruction. Then the control logic
carries out (executes) the decoded instruction. Because the instructions are stored in
memory, you can change them when you want to.
Review: The microprocessor’s purpose is to process data. To do this, it must have logic
to process and handle data, and control logic. The processing logic moves data from place
and performs operations on the data.
Microprocessor is a multipurpose, programmable, clock-driven, register-base, electronic
device that reads binary instructions from a storage device called memory, accepts binary
data as input and processes data according to those instructions, and provides results as
output.

1.3 CLASSIFICATION OF COMPUTER


Computers can be generally classified by size and power as follows, though there is
considerable overlap:
• Personal Computer: A small, single-user computer based on a microprocessor.
In addition to the microprocessor, a personal computer has a keyboard for entering
data, a monitor for displaying information, and a storage device for saving data.
• Working Station: A powerful, single-user computer. A workstation is like a
FUNDAMENTAL OF COMPUTER 5

personal computer, but it has a more powerful microprocessor and a higher-quality


monitor.
• Minicomputer: A multi-user computer capable of supporting from ten to hundreds
of users simultaneously.
• Mainframe: A powerful multi-user computer capable of supporting many
hundreds or thousands of users simultaneously.
• Supercomputer: An extremely fast computer that can perform hundreds of
millions of instructions per second.

1.4 EMBEDDED SYSTEM


A specialized computer system that is part of a larger system or machine.
• Typically, an embedded system is housed on a single microprocessor board with
the programs stored in ROM.
• Virtually all appliances that have a digital Interface- watches, microwaves, VCRs,
cars -utilize embedded systems.
• Some embedded systems include an operating system, but many are so specialized
that the entire logic can be implemented as a single program.

Microcontroller Microprocessor

1.5 FOUR COMPONENTS OF MICROPROCESSOR


View publication stats

8086 Microprocessor and Interfacing and


Others

Publisher : Vayu Education ISBN : 9789380097282 Author : Arun Rana

Type the URL : http://www.kopykitab.com/product/3186

Get this eBook

You might also like