BASIC INTERFACING CONCEPTS

Similar documents
SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET

Computer Organization and Microprocessors SYLLABUS CHAPTER - 1 : BASIC STRUCTURE OF COMPUTERS CHAPTER - 3 : THE MEMORY SYSTEM


DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI

Microprocessor and Microcontroller question bank. 1 Distinguish between microprocessor and microcontroller.

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013)


EC 6504 MICROPROCESSOR AND MICROCONTROLLER

VALLIAMMAI ENGINEERING COLLEGE

DEPARTMENT OF ECE QUESTION BANK SUBJECT: MICROPROCESSOR AND MICROCONTROLLER UNIT-1 PART-A (2 MARKS)

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

Microprocessors and Interfacng. Question bank

QUESTION BANK CS2252 MICROPROCESSOR AND MICROCONTROLLERS

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE ENGINEERING

Lecture 1. Course Overview and The 8051 Architecture

1. What is Microprocessor? Give the power supply & clock frequency of 8085?

PART - B (Answer all five units, 5 X 10 = 50 Marks)

INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor

Diploma in Embedded Systems

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

Microprocessors and Microcontrollers. Assignment 1:

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT IV I/O INTERFACING PART A (2 Marks)

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

ENE 334 Microprocessors

Question Bank Microprocessor and Microcontroller

MICROPROCESSORS & MICRO CONTROLLER COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK

Microprocessors/Microcontrollers


UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

EC6504 MICROPROCESSOR AND MICROCONTROLLER QUESTION BANK UNIT I - THE 8086 MICROPROCESSOR PART A

Unit wise Question Bank UNIT-II

PART B UNIT II PART A

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

SOME ASSEMBLY REQUIRED

Microcontrollers. Principles and Applications. Ajit Pal +5 V 2K 8. 8 bit dip switch. P2 8 Reset switch Microcontroller AT89S52 100E +5 V. 2.

KINGS DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK. Subject Name: Microprocessors and Microcontrollers UNIT-I 8085 MICROPROCESSOR

THE 8051 MICROCONTROLLER

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

EC6504 MICROPROCESSOR AND MICROCONTROLLER

Sunday, April 25, 2010

8051 Microcontroller

4. (a) With a neat sketch explain 8237 DMA controller and its operation? (b) With the help of basic cell explain SRAM and DRAM?

8051 microcontrollers

Microcomputer Architecture and Programming

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

UNIT - II PERIPHERAL INTERFACING WITH 8085

FIFTH SEMESTER B.TECH DEGREE EXAMINATION MODEL TEST QUESTION PAPER, NOVEMBER CS 305: Microprocessor and Microcontrollers PART A

1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions.

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Micro Processor & Micro Controllers

Computer Hardware Requirements for Real-Time Applications

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

Contents 8086 Processor 8086/8088 Instructions 80386/80486 Pentium/Pentium Pro 8086 Interfacing and Timing

EC1362 Microprocessors & Microcontrollers

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

8051 Microcontrollers

Microprocessor Theory

Acknowledgments About the Author


Rewa Engineering College, Rewa. Rewa Department OF Electrical Engineering

INTRODUCTION OF MICROPROCESSOR& INTERFACING DEVICES Introduction to Microprocessor Evolutions of Microprocessor

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATION ENGINEERING QUESTION BANK

EMBEDDED Systems. Functions. MODULE- 1 C programming with data Structure Introduction to C. Array and String. Control Flow Statements In C

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

It is a program controlled semiconductor device (IC}, which fetches, decode and executes instructions.

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

MLR INSTITUTE OF TECHNOLOGY DUNDIGAL , HYDERABAD

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт.

Microcontrollers. Microcontroller

SYLLABUS. osmania university CHAPTER - 1 : REGISTER TRANSFER LANGUAGE AND MICRO OPERATION CHAPTER - 2 : BASIC COMPUTER

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text

EMBEDDED SYSTEM BASICS AND APPLICATION

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack

С and the Programming for Multitasking. Thomas W. Schultz. Purdue University West Lafayette, Indiana

1. (a) Draw the internal architecture of 8085? Explain each block. (b) What are the special functions of GPRs in 8086? And explain them?

Department of Electronics and Instrumentation Engineering Question Bank

THE 8051 MICROCONTROLLER

8051 Overview and Instruction Set

Unit I. Introduction Microcontrollers and Embedded processors Overview of the 8051 Inside the 8051 Addressing Modes

G.PULLAIAH COLLEGE OF ENGINEERING AND TECHNOLOGY

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

Four Categories Of 8085 Instructions That >>>CLICK HERE<<<

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

Chapter 1: Basics of Microprocessor [08 M]

Department of Computer Science and Engineering

Microcontroller & Interfacing

MLR INSTITUTE OF TECHNOLOGY DUNDIGAL , HYDERABAD QUESTION BANK

9. PERIPHERAL CHIPS 9a

Microcontrollers. Fig. 1 gives a comparison of a microprocessor system and a microcontroller system.

Segment 1A. Introduction to Microcomputer and Microprocessor

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

V8-uRISC 8-bit RISC Microprocessor AllianceCORE Facts Core Specifics VAutomation, Inc. Supported Devices/Resources Remaining I/O CLBs

MICROPROCESSOR Architecture, Programming and Interfacing SUNIL MATHUR. Assistant Professor Maharaja Agrasen Institute of Technology Delhi

GUJARAT TECHNOLOGICAL UNIVERSITY

8051 Microcontroller

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

Transcription:

Contents i SYLLABUS UNIT - I 8085 ARCHITECTURE Introduction to Microprocessors and Microcontrollers, 8085 Processor Architecture, Internal Operations, Instructions and Timings, Programming the 8085-Introduction to 8085 Instructions, Addressing Modes and Programming Techniques with Additional Instructions. UNIT - II BASIC INTERFACING CONCEPTS Stacks and Subroutines, Interfacing Peripherals, Basic Interfacing Concepts-Interfacing Output Displays, Interfacing Input Keyboards. Interrupts-8085 Interrupts, Programmable Interrupt Controller (8259A) Direct Memory Access (DMA) - DMA Controller (Intel 8257), Interfacing 8085 with Digital to Analog and Analog to Digital Converters. UNIT - III INTERFACING PROGRAMMABLE DEVICES Programmable Peripheral Interface (Intel 8255A), Programmable Communication Interface (Intel 8251), Programmable Interval timer (Intel 8253 and 8254), Programmable Keyboard/Display Controller (Intel 8279), Serial and Parallel Bus Standards RS-232 C, IEEE-488. UNIT - IV INTRODUCTION TO MICROCONTROLLERS Introduction to Microcontrollers, 8051 Architecture, Instruction Set, Addressing Modes and Programming Techniques, Comparison of Various Families of 8-Bit Micro Controllers, System Design Techniques Interfacing of LCD, ADC, Sensors, Stepper Motor, Keyboard and DAC using Microcontrollers Communication Standards, Serial RS-232 and USB.

ii Contents UNIT - V MICROPROCESSOR APPLICATIONS AND ADVANCED MICROPROCESSORS Microprocessor Applications and Trends in Microprocessor Technology-8-bit, 16-bit and 32-bit Microprocessors, Advanced Processor Architecture, Register Structure, Instruction Set, Addressing Modes of 8086, Features of Advanced Processors 80386, 80486, Pentium and Multi-Core Processors.

Contents iii microprocessors and interfacing FOR b.e. (o.u) Ii year ii semester (COMPUTER SCIENCE AND ENGINEERING) CONTENTS UNIT - I [8085 ARCHITECTURE]... 1.1-1.110 1.1 INTRODUCTION... 1.2 1.2 MICROPROCESSORS AND MICROCONTROLLERS... 1.2 1.2.1 Basic Terminology Used in Microprocessor and Microcontroller Literature... 1.5 1.2.2 Evolution of Microprocessor... 1.7 1.2.3 Microprocessor Capability... 1.9 1.2.4 Features of a Microprocessor... 1.10 1.2.5 Applications of Microprocessor... 1.10 1.2.6 Basic Components of a Microprocessor... 1.11 1.3 8085 MICROPROCESSOR ARCHITECTURE... 1.12 1.3.1 Registers of 8085 Microprocessor... 1.14 1.4 INTERNAL OPERATIONS IN A MICROPROCESSOR... 1.17 1.4.1 Microprocessor Initiated Operations... 1.17 1.4.2 Internal Data Operations... 1.19 1.4.3 Externally Initiated Operations... 1.20 1.5 PIN DESCRIPTION OF 8085 MICROPROCESSOR... 1.21 1.5.1 Features of 8085 Microprocessor... 1.26

iv Contents 1.6 MICROPROCESSOR COMMUNICATION AND BUS TIMINGS... 1.26 1.6.1 Demultiplexing the Bus AD AD 7 0... 1.28 1.6.2 Generating the Control Signals... 1.30 1.7 INSTRUCTION AND DATA A FLOW... 1.31 1.7.1 Timing and Control Unit... 1.32 1.7.2 The Fetch Operation... 1.33 1.7.3 The Execute Cycle... 1.34 1.7.4 Machine Cycle and State... 1.35 1.7.5 Address and Data Transfer... 1.36 1.7.6 Instruction Formats in 8085... 1.37 1.7.6.1 Instruction Formats... 1.37 1.7.6.2 Data Representation... 1.38 1.7.6.3 Operation Code (Opcode) Format... 1.39 1.8 TIMING DIAGRAM... 1.40 1.8.1 Opcode Fetch Machine Cycle... 1.44 1.8.2 Memory Read Machine Cycle... 1.45 1.8.3 I/O Read Machine Cycle... 1.47 1.8.4 Memory Write Machine Cycle... 1.47 1.8.5 I/O Write Machine Cycle... 1.48 1.8.6 INTA A Machine Cycle... 1.49 1.8.7 Bus Idle Machine Cycle... 1.49 1.8.8 Solved Problems... 1.49 1.9 PROGRAMMING THE 8085... 1.53 1.9.1 Introduction to 8085 Instructions... 1.53 1.9.1.1 Data Transfer (Copy) Instruction... 1.54 1.9.1.2 Arithmetic Instructions... 1.59 1.9.1.3 Logical Instructions... 1.64 1.9.1.4 Branch Control Instructions... 1.70 1.9.1.5 Stack, I/O and Machine Control Instructions... 1.73

Contents v 1.10 ADDRESSING MODES OF 8085... 1.77 1.11 8085 ASSEMBLY LANGUAGE GE PROGRAMMING... 1.79 1.11.1 Flow Chart... 1.80 1.11.2 Assembly Language Program Development Tools... 1.83 1.11.3 Assembler Directives of 8085... 1.88 1.11.4 How to Write an Assembly Language Program... 1.90 1.11.5 Execution of Assembly Language Program in 8085... 1.90 1.11.6 How MPU Makes Difference between the Opcode and Data... 1.93 1.11.7 Example Programs... 1.93 1.12 PROGRAMMING TECHNIQUES WITH ADDITIONAL INSTRUCTIONS... 1.100 1.12.1 Additional Data Transfer and Arithmetic Instructions... 1.102 1.12.1.1 16-Bit Data Transfer to Register Pairs... 1.102 1.12.1.2 Data Transfer (Copy) from Memory to Microprocessor... 1.102 1.12.1.3 Data Transfer (Copy) from the Microprocessor to Memory... 1.102 1.12.1.4 Arithmetic Operations Related to 16 Bits (or) Register Pairs... 1.103 1.12.2 Arithmetic Operations Related to Memory... 1.103 1.12.3 Logical Operations... 1.103 1.12.3.1 Rotate Logical Instructions... 1.103 1.12.3.2 Compare Logical Instructions... 1.104 Short Questions and Answers... 1.105-1.108 Expected University Questions with Answers... 1.109-1.110

vi Contents UNIT - II [BASIC INTERFACING CONCEPTS]... 2.1-2.114 2.1 STACK... 2.2 2.1.1 Stack in 8085 Microprocessor... 2.3 2.1.2 PUSH and POP Operations... 2.4 2.1.3 Instructions Related to Stack... 2.5 2.2 SUBROUTINES... 2.11 2.2.1 Instructions Related to Subroutine... 2.13 2.2.1.1 Call Instructions... 2.13 2.2.1.2 Return Instructions... 2.14 2.2.1.2.1 Return (RET) Execution... 2.15 2.2.1.3 Restart Instructions... 2.15 2.3 BASIC INTERFACING CONCEPTS... 2.16 2.3.1 Interfacing Peripherals... 2.16 2.3.2 Types of Interfacing Peripherals eripherals... 2.17 2.3.3 Peripheral I/O (Input/Output) Instructions... 2.18 2.3.3.1 IN Instruction and its Timing Diagram... 2.18 2.3.3.2 OUT Instruction and its Timing Diagram... 2.23 2.3.4 Device Selection and Data Transfer... 2.26 2.3.5 Address Decoding Techniques... 2.28 2.3.6 Input Interfacing... 2.30 2.3.7 Solved Problems... 2.30 2.4 INPUT/OUTPUT (I/O) INTERFACING... 2.33 2.4.1 I/O Mapped (or) Peripheral Mapped I/O Interfacing... 2.33 2.4.1.1 Advantages and Disadvantages of I/O mapped interfacing... 2.34 2.4.2 Memory Mapped I/O Interfacing... 2.34 2.4.2.1 Advantages and Disadvantages of Memory Mapped Interfacing... 2.38 2.4.3 Comparison of Memory Mapped and I/O Mapped Interfacing... 2.39

Contents vii 2.5 INTERFACING INPUT DEVICES... 2.40 2.5.1 Interfacing Matrix Keyboard with Microprocessor... 2.41 2.6 INTERFACING OUTPUT DISPLAYS (7 SEGMENT DISPLAY DEVICE).. 2.42 2.7 INTERRUPTS... 2.47 2.7.1 Interrupt and its Need... 2.47 2.7.2 Interrupt Signals of 8085 Microprocessor... 2.48 2.7.3 Classification of 8085 Interrupts... 2.49 2.7.3.1 Hardware Interrupts... 2.49 2.7.3.2 Software Interrupts... 2.51 2.7.3.3 Vectored and Non-Vectored Interrupts... 2.52 2.7.3.4 Maskable and Non-Maskable Interrupts... 2.53 2.7.4 Priority of Interrupts... 2.53 2.7.5 8085 Hardware Interrupt Structure... 2.54 2.7.6 Interrupt Process... 2.55 2.7.7 Interrupt Programming... 2.55 2.7.8 Example Problems... 2.57 2.8 PROGRAMMABLE INTERRUPT CONTROLLER (8259A)... 2.59 2.8.1 Introduction and Need for PIC... 2.59 2.8.2 Features of 8259A PIC... 2.60 2.8.3 Pin Diagram of 8259A PIC... 2.61 2.8.4 Functional Block Diagram of 8259A PIC... 2.62 2.8.5 Priority Modes of 8259A... 2.64 2.8.6 Programming of 8259A... 2.65 2.8.6.1 Initialization Command Words (ICW)... 2.67 2.8.6.2 Operation Command Words (OCWS)... 2.70 2.8.7 Interfacing 8259A with 8085 Microprocessor... 2.72 2.9 DIRECT MEMORY ACCESS (DMA) TRANSFER SCHEME... 2.73 2.9.1 Modes of DMA Transfer... 2.75 2.9.2 Advantages of DMA Transfer ransfer... 2.76

viii Contents 2.10 PROGRAMMABLE DMA CONTROLLER (INTEL 8257)... 2.76 2.10.1 Features of 8257... 2.76 2.10.2 Pin Description of 8257... 2.77 2.10.3 Functional Block Diagram of 8257... 2.79 2.10.4 Operating Modes of DMA 8257 Controller... 2.83 2.10.5 Working of DMA Controller... 2.85 2.10.6 Interfacing DMA Controller 8257 with 8085 Microprocessor... 2.86 2.10.7 DMA Operation in 8085 using 8257... 2.88 2.11 ANALOG TO DIGITAL AND DIGITAL TO ANALOG CONVERTERS... 2.89 2.11.1 Digital to Analog (D/A) Converters... 2.89 2.11.1.1 Types of Digital to Analog (D/A) Converters... 2.89 2.11.1.2 IC 1408 D/A Converter... 2.92 2.11.1.2.1 Features of IC 1408... 2.92 2.11.1.2.2 Pin Diagram of IC 1408... 2.93 2.11.1.2.3 Interfacing IC 1408 D/A Converter with the 8085... 2.93 2.11.1.3 IC 0800 D/A Converter... 2.95 2.11.1.3.1 Pin Diagram and Pin Description of IC 0800 D/A Converter... 2.95 2.11.1.3.2 Interfacing IC 0800 D/A Converter with 8085... 2.96 2.11.2 Analog to Digital Converters (A/D)... 2.97 2.11.2.1 Types of Analog to Digital (A/D) Converters... 2.97 2.11.2.2 IC 0801 A/D Converter... 2.100 2.11.2.3 IC 0808/0809 A/D Converter... 2.103 2.11.2.3.1 Pin Diagram of IC 0808/0809 A/D Converter... 2.103 2.11.2.3.2 Features of IC 0808/0809... 2.104 2.11.2.3.3 Interfacing IC 0808/0809 A/D Converter with 8085... 2.105 Short Questions and Answers... 2.107-2.111 Expected University Questions with Answers... 2.112-2.114

Contents ix UNIT - III [INTERFACING PROGRAMMABLE DEVICES]... 3.1-3.118 3.1 INTRODUCTION TO PROGRAMMABLE INTERFACE DEVICES... 3.2 3.2 PROGRAMMABLE PERIPHERAL INTERFACE (INTEL 8255A)... 3.2 3.2.1 Features of Intel 8255A... 3.3 3.2.2 Pin Diagram of 8255A... 3.3 3.2.3 Functional Block Diagram of 8255A... 3.6 3.2.4 Operation Modes of 8255A... 3.9 3.2.4.1 Bit Set/Reset (BSR) Mode... 3.10 3.2.4.2 Input/Output (I/O) Mode... 3.11 3.2.4.2.1 Mode 0 : Simple I/O Mode... 3.11 3.2.4.2.2 Mode 1 : I/O Mode with Handshake Signals... 3.13 3.2.4.2.3 Mode 2 : Bidirectional I/O Port ort... 3.17 3.2.5 Interfacing 8085 Microprocessor... 3.20 3.2.6 Example Program... 3.21 3.3 SERIAL DATA A TRANSFER/SERIAL COMMUNICATION... 3.27 3.3.1 Classification of Serial Data Transfer ransfer... 3.27 3.3.2 Transmission Formats ormats... 3.29 3.3.2.1 Synchronous Data Transmission... 3.29 3.3.2.2 Asynchronous Data Transmission... 3.29 3.3.2.3 Comparison between Synchronous and Asynchronous Data Transmission... 3.30 3.4 PROGRAMMABLE COMMUNICATION INTERFACE (INTEL 8251 AUSART)... 3.31 3.4.1 Need for 8251A USART... 3.31 3.4.2 Features of Intel 8251A... 3.31 3.4.3 Pin Diagram of Intel 8251A... 3.32

x Contents 3.4.4 Internal Architecture of 8251A... 3.35 3.4.4.1 Read/Write Control Logic... 3.36 3.4.4.2 Data Bus Buffer... 3.37 3.4.4.3 Modem Control... 3.37 3.4.4.4 Transmitter Section... 3.38 3.4.4.5 Receiver Section... 3.39 3.4.5 Programming of 8251A USART... 3.40 3.4.5.1 Mode Word... 3.40 3.4.5.2 Command Word... 3.41 3.4.5.3 Status Word... 3.42 3.4.6 Interfacing Intel 8251A with 8085 Microprocessor... 3.43 3.4.7 Example Programs... 3.44 3.5 PROGRAMMABLE INTERVAL TIMER (INTEL 8253)... 3.48 3.5.1 Features of Intel 8253... 3.48 3.5.2 Pin Diagram and Internal Architecture of 8253... 3.49 3.5.2.1 Data Bus Buffer... 3.50 3.5.2.2 Read/Write Logic... 3.50 3.5.2.3 Control Word Register egister... 3.51 3.5.2.4 Counter 0, Counter 1 and Counter 2... 3.51 3.5.3 Programming the 8253... 3.51 3.5.4 Operating Modes of 8253... 3.54 3.5.5 Example Programs... 3.58 3.6 PROGRAMMABLE INTERVAL TIMER (INTEL 8254)... 3.63 3.6.1 Features of Intel 8254... 3.64 3.6.2 Pin Diagram of Intel 8254... 3.64 3.6.3 Block Diagram of Intel 8254... 3.66 3.6.3.1 Data Bus Buffer... 3.66 3.6.3.2 Read/Write Logic... 3.66

Contents xi 3.6.3.3 Control Word Register egister... 3.67 3.6.3.4 Counters... 3.67 3.6.4 Programming the 8254... 3.67 3.6.4.1 Write Operation... 3.68 3.6.4.2 Read Operation... 3.69 3.6.5 Operating Modes of 8254... 3.70 3.6.6 Interfacing Intel 8254 with 8085 Microprocessor... 3.70 3.6.7 Example Programs... 3.72 3.7 DIFFERENCES BETWEEN IC 8253 AND IC 8254... 3.73 3.8 APPLICATIONS OF PROGRAMMABLE INTERVAL TIMERS... 3.73 3.9 PROGRAMMABLE KEYBOARD/DISPLA ARD/DISPLAY Y CONTROLLER (INTEL 8279)... 3.73 3.9.1 Features of Intel 8279... 3.74 3.9.2 Basics of Keyboard... 3.74 3.9.3 Pin Diagram of Intel 8279... 3.77 3.9.4 Block Diagram of Intel 8279... 3.79 3.9.5 Keyboard Operating Modes... 3.80 3.9.6 Programming of 8279... 3.81 3.9.7 Initializing the 8279... 3.85 3.9.8 Status Word of 8279... 3.86 3.9.9 Interfacing Intel 8279 with 8085 Microprocessor... 3.86 3.9.10 Interfacing Keyboard/Display Using 8279... 3.87 3.10 STAND ANDARDS ARDS IN INPUT/OUTPUT (I/O) INTERFACING CING... 3.92 3.10.1 Serial Data Transfer Standard-RS232C... 3.93 3.10.1.1 Pin Diagram and Signals of RS-232C... 3.94 3.10.1.2 Logic Levels of RS-232C... 3.97 3.10.1.3 Connectors... 3.97

xii Contents 3.10.1.4 Interfacing DTE and DCE Using RS-232C... 3.99 3.10.1.5 Connecting RS-232C Interface... 3.101 3.10.1.6 Characteristics of RS-232C... 3.103 3.10.2 Parallel Data Transfer Standard - IEEE-488GPIB... 3.103 3.10.2.1 Data Connections... 3.104 3.10.2.2 Handshaking Connections... 3.107 3.10.2.3 Interface Management Connections... 3.107 3.10.3 Connecting Devices... 3.108 3.10.3.1 The Listener... 3.108 3.10.3.2 The Talker... 3.108 3.10.3.3 The Controller... 3.108 3.10.4 Typical Small GPIB System... 3.109 3.10.5 Comparison between RS-232C and IEEE-488... 3.110 Short Questions and Answers... 3.111-3.115 Expected University Questions with Answers... 3.116-3.118 UNIT - IV [INTRODUCTION TO MICROCONTROLLERS]... 4.1-4.136 4.1 INTRODUCTION TO MICROCONTROLLER... 4.2 4.1.1 Comparison of Microprocessors and Microcontrollers... 4.3 4.1.2 Evolution of Microcontrollers... 4.4 4.1.3 Advantages of Microcontrollers... 4.5 4.1.4 Applications of Microcontrollers... 4.6 4.2 8051 MICROCONTROLLER... 4.7 4.2.1 Features of 8051... 4.7 4.2.2 Internal Architecture of 8051... 4.9 4.2.3 Pin Configuration of 8051... 4.10 4.2.4 Programming Model of 8051... 4.12

Contents xiii 4.2.5 The 8051 Oscillator and Clock... 4.14 4.2.5.1 CPU Timing... 4.14 4.2.6 Central Processing Unit (CPU)... 4.15 4.2.7 A and B Registers... 4.16 4.2.8 Program Status Word (PSW) Register... 4.16 4.2.9 Data Pointer (DPTR)... 4.18 4.2.10 Stack Pointer ointer... 4.18 4.2.11 Program Counter... 4.19 4.2.12 Scratch Pad Registers (R0 to R7)... 4.19 4.2.13 Special Function Registers (SFR)... 4.20 4.2.14 Internal Memory... 4.22 4.3 I/O PORT T STRUCTURES AND THEIR OPERATIONS TIONS... 4.22 4.3.1 Port ort 0 Configuration... 4.23 4.3.2 Port ort 1 Configuration... 4.24 4.3.3 Port ort 2 Configuration... 4.25 4.3.4 Port ort 3 Configuration... 4.26 4.4 MEMORY Y ORGANIZATION AND ITS EXPANSION... 4.27 4.4.1 Data Memory (Internal RAM)... 4.28 4.4.2 Program Memory (Internal ROM)... 4.29 4.4.3 External Memory... 4.30 4.4.3.1 Expanding the Program Memory... 4.30 4.4.3.2 Expanding the Data Memory... 4.31 4.5 8051 TIMERS AND COUNTERS... 4.32 4.5.1 Timer/Counter Control Logic... 4.32 4.5.2 Timer Mode (TMOD) Register... 4.34 4.5.3 Timer Control (TCON) Register... 4.35

xiv Contents 4.5.4 Timer Modes of Operation... 4.36 4.5.4.1 Timer Mode 0... 4.36 4.5.4.2 Timer Mode 1... 4.37 4.5.4.3 Timer Mode 2... 4.38 4.5.4.4 Timer Mode 3... 4.38 4.5.5 Counter Modes of Operation... 4.39 4.5.6 Programming of 8051 Timers... 4.39 4.6 INTERRUPTS OF 8051... 4.43 4.6.1 Interrupt Types of 8051... 4.44 4.6.2 Interrupt Enable Register... 4.45 4.6.3 Interrupt Priority Register... 4.47 4.7 8051 INSTRUCTION SET... 4.48 4.7.1 Data Transfer Instructions... 4.48 4.7.1.1 Internal Data Transfer Instructions.... 4.48 4.7.1.2 External Data Transfer Instruction... 4.50 4.7.1.3 Data Exchange Instructions... 4.52 4.7.2 Arithemetic Instructions... 4.52 4.7.2.1 Addition Instructions... 4.53 4.7.2.2 Subtraction Instructions... 4.55 4.7.2.3 Multiplication Instruction... 4.56 4.7.2.4 Division Instruction... 4.57 4.7.3 Byte Manipulation Instructions... 4.57 4.7.3.1 Logical Instructions... 4.57 4.7.3.2 Rotate and Swap Instructions... 4.60 4.7.4 Boolean Variable Instructions... 4.64 4.7.5 Program Execution Transfer Instructions... 4.64 4.7.5.1 Unconditional Transfer Instructions... 4.64 4.7.5.2 Conditional Transfer Instructions... 4.67

Contents xv 4.7.5.3 Compare and Jump Instruction... 4.69 4.7.5.4 Iteration Control Instruction... 4.70 4.7.5.5 Interrupt Instruction... 4.70 4.8 ADDRESSING MODES... 4.71 4.8.1 Immediate Addressing... 4.71 4.8.2 Direct Addressing... 4.71 4.8.3 Register Addressing... 4.72 4.8.4 Register Indirect Addressing... 4.73 4.8.5 Base Register Plus Index Register Indirect Addressing... 4.74 4.8.6 Summary of Addressing Modes... 4.75 4.9 PROGRAMMING TECHNIQUES WITH 8051... 4.75 4.9.1 8051 Directives... 4.75 4.9.2 Lines of Code... 4.77 4.9.3 8051 Instruction Syntax... 4.77 4.9.3.1 Label... 4.77 4.9.3.2 Instructions... 4.78 4.9.3.3 Comments... 4.78 4.9.4 Simple Programs... 4.79 4.10 COMPARISON OF VARIOUS FAMILIES OF 8-BITS MICROCONTROLLERS... 4.85 4.11 SYSTEM DESIGN TECHNIQUES... 4.85 4.11.1 Seven Segment Displays Interfacing... 4.85 4.11.2 LCD Display Interfacing... 4.90 4.12 SENSOR INTERFACING WITH 8051... 4.95 4.13 STEPPER MOTOR OR INTERFACING... 4.97 4.14 INTERFACING WITH KEYBOARD... 4.109 4.15 ADC AND DAC INTERFACING WITH 8051... 4.114 4.15.1 ADC Interfacing... 4.114 4.15.2 DAC Interfacing (R/2R Type)... 4.117

xvi Contents 4.16 INTERFACING COMMUNICATION STAND ANDARD ARD (RS-232) -232)... 4.119 4.17 UNIVERSAL SERIAL BUS (USB)... 4.121 4.17.1 Features of USB... 4.121 4.17.2 USB System... 4.122 4.17.3 USB Cable... 4.122 4.17.4 USB Host... 4.123 4.17.5 USB Device... 4.124 4.17.6 USB Hub... 4.126 4.18 SIMPLE PROGRAMS... 4.127 Short Questions and Answers... 4.131-4.134 Expected University Questions with Answers... 4.135-4.136 UNIT - V [MICROPROCESSOR APPLICATIONS AND ADVANCED MICROPROCESSORS]... 5.1-5.176 5.1 MICROPROCESSOR APPLICATIONS... 5.2 5.1.1 Temperature Control System... 5.2 5.1.2 Hex Keyboard Interface... 5.5 5.1.3 Stepper Motor Control System... 5.10 5.1.4 Traffic Light Control System... 5.15 5.1.5 D.C.C Motor Speed Control System... 5.19 5.1.6 Other Applications... 5.21 5.2 TRENDS IN MICROPROCESSOR TECHNOLOGY... 5.24 5.2.1 8-Bit Microprocessor... 5.25 5.2.1.1 Zilog Microprocessor... 5.26 5.2.1.2 Motorola 6800... 5.28 5.2.1.3 Hitachi HD64180... 5.29 5.2.2 16-Bit Microprocessors... 5.30 5.2.2.1 Intel 8086/88... 5.31 5.2.2.2 Intel 80186... 5.31 5.2.2.3 Intel 80286... 5.32 5.2.2.4 Motorola MC 68000... 5.32

Contents xvii 5.2.3 High End-High Performance Processors... 5.33 5.2.3.1 Intel 80386... 5.33 5.2.3.2 Intel 80486... 5.35 5.2.3.3 Intel Pentium Processor rocessor... 5.35 5.2.3.4 Intel Pentium Pro ro-p -Processor rocessor... 5.36 5.2.3.5 RISC Processors... 5.37 5.2.4 Single Chip Microcontrollers... 5.39 5.2.4.1 Intel MCS-51 Single Chip Family... 5.39 5.2.4.2 Motorola MC68HC11 Microcontroller Family... 5.39 5.3 INTRODUCTION TO O 8086 MICROPROCESSOR... 5.40 5.3.1 Features of 8086 Microprocessor... 5.41 5.3.2 Internal Architecture of 8086... 5.42 5.3.2.1 Bus Interface Unit... 5.42 5.3.2.2 Execution Unit... 5.44 5.3.3 Register Organization of 8086... 5.44 5.3.3.1 General Purpose Registers... 5.45 5.3.3.2 Pointer and Index Registers egisters... 5.47 5.3.3.3 Segment Registers... 5.48 5.3.3.4 Flag Registers... 5.49 5.3.4 Memory Organization of 8086... 5.52 5.3.4.1 Memory Segmentation... 5.52 5.3.4.2 Generation of Physical Address... 5.54 5.3.4.3 Advantages of Segmented Memory... 5.56 5.4 ADDRESSING MODES OF 8086... 5.57 5.4.1 Register and Immediate Addressing Modes... 5.57 5.4.1.1 Immediate Addressing... 5.57 5.4.1.2 Register Addressing... 5.58

xviii Contents 5.4.2 Memory Addressing Modes... 5.59 5.4.2.1 Direct Addressing Mode... 5.60 5.4.2.2 Indirect Addressing Mode... 5.61 5.4.2.3 Based Addressing Mode... 5.63 5.4.2.4 Indexed Addressing with Displacement... 5.65 5.4.2.5 Based Index Addressing... 5.66 5.4.3 I/O Port Addressing... 5.67 5.4.3.1 Fixed I/O Port Addressing... 5.67 5.4.3.2 Variable I/O Port Addressing... 5.67 5.4.4 Relative Addressing Mode... 5.68 5.4.4.1 String Addressing Mode... 5.68 5.4.5 Implied Addressing Mode... 5.69 5.5 INSTRUCTION SET OF 8086... 5.69 5.5.1 Data Transfer Instructions... 5.70 5.5.1.1 General Purpose Data Transfer Instructions... 5.71 5.5.1.2 Special Address Transfer Instructions... 5.75 5.5.1.3 Flag Transfer Instructions... 5.77 5.5.1.4 Input-Output Instructions... 5.78 5.5.2 Arithmetic Instructions... 5.80 5.5.2.1 Addition Instructions... 5.80 5.5.2.2 Subtraction Instructions... 5.84 5.5.2.3 Multiplication Instructions... 5.88 5.5.2.4 Division Instructions... 5.90 5.5.3 Logical Instructions... 5.93 5.5.4 Shift Instructions... 5.96 5.5.5 Rotate Instructions... 5.101 5.5.5.1 Rotate Instructions without Carry... 5.102 5.5.5.2 Rotate Instructions with Carry (RCL/RCR)... 5.105

Contents xix 5.5.6 Branch Instructions... 5.108 5.5.6.1 Unconditional Branch Instructions... 5.108 5.5.6.2 Conditional Branch Instructions... 5.110 5.5.7 Iteration Control Instructions... 5.111 5.5.7.1 Processor Control Instructions... 5.112 5.5.7.2 Flag Control Instructions... 5.112 5.5.7.3 External Synchronization Instructions... 5.113 5.5.8 Interrupt Instructions... 5.115 5.5.9 String Manipulation Instructions... 5.115 5.5.10 Instruction Formats of 8086... 5.119 5.6 THE 80386 MICROPROCESSOR... 5.124 5.6.1 Features of 80386 Microprocessor... 5.124 5.6.2 Pin Diagram of 80386 Microprocessor... 5.125 5.6.3 Internal Architecture of 80386... 5.127 5.6.4 Register Organization of 80386... 5.128 5.6.4.1 General Purpose Registers... 5.129 5.6.4.2 Segment Registers... 5.129 5.6.4.3 Instruction Pointer and Flag Registers... 5.130 5.6.4.4 Control Registers... 5.131 5.6.4.5 System Address Registers... 5.133 5.6.4.6 Debug and Test est Registers... 5.134 5.6.5 Operating Modes of 80386... 5.135 5.6.6 Memory Organization in 80386... 5.138 5.6.7 Addressing Modes of 80386... 5.139 5.7 THE 80486 MICROPROCESSOR... 5.141 5.7.1 Features of 80486... 5.141 5.7.2 Architecture of 80486... 5.142 5.7.3 Pin Diagram of 80486... 5.143

xx Contents 5.7.4 Register Organization of 80486... 5.146 5.7.4.1 Extended Flag Register... 5.147 5.7.5 Memory System of 80486... 5.148 5.8 COMPARISONS OF ADVANCED ANCED MICROPROCESSORS... 5.150 5.8.1 Comparison between 80386 and 80486 Microprocessor... 5.150 5.8.2 Comparison of 8086, 80286, 80386 and 80486 Microprocessors... 5.151 5.9 THE INTEL PENTIUM PROCESSOR... 5.152 5.9.1 Features of Pentium Processor... 5.152 5.9.2 Architecture of Pentium Processor rocessor... 5.153 5.9.3 Pin in Diagram of Pentium Processor... 5.155 5.9.4 Register Organization of Pentium Processor... 5.162 5.9.5 Branch Prediction in Pentium Processor... 5.163 5.9.6 Cache Memory in Pentium Processor... 5.164 5.9.7 Superscalar Architecture... 5.165 5.10 MULTICORE PROCESSORS... 5.166 5.10.1 Multiprocessor/Multicore systems... 5.166 5.10.2 Dual-Core Processor... 5.167 5.10.2.1 Advantages of Dual-Core Technology... 5.167 Short Questions and Answers... 5.169-5.172 Expected University Questions with Answers... 5.173-5.176 LATEST UNIVERSITY QUESTION PAPERS [April/May - 2013] [New] [Main]... QP.1 - QP.2 [December - 2012] [Supplementary]... QP.3.3 - QP.4.4