Logic Devices for Interfacing, The 8085 MPU Lecture 4

Similar documents
Contents Circuits... 1

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Introduction. Serial In - Serial Out Shift Registers (SISO)

BUSES IN COMPUTER ARCHITECTURE

1. Convert the decimal number to binary, octal, and hexadecimal.

Microprocessor Design

Logic Design II (17.342) Spring Lecture Outline

CPS311 Lecture: Sequential Circuits

First Name Last Name November 10, 2009 CS-343 Exam 2

T 2 : WR = 0, AD 7 -AD 0 (μp Internal Reg.) T 3 : WR = 1,, M(AB) AD 7 -AD 0 or BDB

MODULE 3. Combinational & Sequential logic

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Registers. Unit 12 Registers and Counters. Registers (D Flip-Flop based) Register Transfers (example not out of text) Accumulator Registers

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

Chapter 4. Logic Design

Logic Design. Flip Flops, Registers and Counters

VU Mobile Powered by S NO Group

Modeling Digital Systems with Verilog

FPGA Design. Part I - Hardware Components. Thomas Lenzi

CHAPTER1: Digital Logic Circuits

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Combinational vs Sequential

6.3 Sequential Circuits (plus a few Combinational)

Analogue Versus Digital [5 M]

COMP2611: Computer Organization. Introduction to Digital Logic

82C55A CHMOS PROGRAMMABLE PERIPHERAL INTERFACE

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

Chapter. Sequential Circuits

Sequential Logic Basics

Computer Systems Architecture

IT T35 Digital system desigm y - ii /s - iii

Counter dan Register

SAULT COLLEGE OF APPLIED ARTS & TECHNOLOGY SAULT STE. MARIE, ONTARIO LOGIC & SWITCHING CIRCUITS NON-SEMESTERED TECHNICIAN PROGRAM

Final Exam review: chapter 4 and 5. Supplement 3 and 4

UNIT 1: DIGITAL LOGICAL CIRCUITS What is Digital Computer? OR Explain the block diagram of digital computers.

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

The University of Texas at Dallas Department of Computer Science CS 4141: Digital Systems Lab

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

Point System (for instructor and TA use only)

List of the CMOS 4000 series Dual tri-input NOR Gate and Inverter Quad 2-input NOR gate Dual 4-input NOR gate

CS8803: Advanced Digital Design for Embedded Hardware

Computer Organization & Architecture Lecture #5

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Handout 16. by Dr Sheikh Sharif Iqbal. Memory Interface Circuits 80x86 processors

Chapter 9 MSI Logic Circuits

Chapter 2. Digital Circuits

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

Date: Author: New: Revision: x SAULT COLLEGE OF APPLIED ARTS & TECHNOLOGY SAULT STE. MARIE, ONTARIO ELN TWO

ELEN Electronique numérique

Introduction to Microprocessor & Digital Logic

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

WINTER 15 EXAMINATION Model Answer

Sequential Logic and Clocked Circuits

Logic Design Viva Question Bank Compiled By Channveer Patil

Interfacing Analog to Digital Data Converters. A/D D/A Converter 1

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

EE Chip list. Page 1

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

PESIT Bangalore South Campus

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

Digital Electronics II 2016 Imperial College London Page 1 of 8

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

CS/ECE 250: Computer Architecture. Basics of Logic Design: ALU, Storage, Tristate. Benjamin Lee

DIGITAL ELECTRONICS MCQs

Sequential logic circuits

UNIT V 8051 Microcontroller based Systems Design

COMP12111: Fundamentals of Computer Engineering

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

TEST-3 (DIGITAL ELECTRONICS)-(EECTRONIC)

Sequential Logic. Introduction to Computer Yung-Yu Chuang

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

CprE 281: Digital Logic

4.S-[F] SU-02 June All Syllabus Science Faculty B.Sc. II Yr. Instrumentation Practice [Sem.III & IV] S.Lot

CSE 352 Laboratory Assignment 3

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

CHAPTER 4: Logic Circuits

EEC 118 Lecture #9: Sequential Logic. Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation

Counters

Fundamentals of Digital Electronics

Lecture 2: Digi Logic & Bus

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

Chapter 7 Memory and Programmable Logic

ECE321 Electronics I

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

Outline. EECS150 - Digital Design Lecture 27 - Asynchronous Sequential Circuits. Cross-coupled NOR gates. Asynchronous State Transition Diagram

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design ALU and Storage Elements

DIGITAL CIRCUIT COMBINATORIAL LOGIC

ASYNCHRONOUS COUNTER CIRCUITS

CprE 281: Digital Logic

B. Sc. III Semester (Electronics) - ( ) Digital Electronics-II) BE-301 MODEL ANSWER (AS-2791)

DIGITAL FUNDAMENTALS

Digital Fundamentals: A Systems Approach

8.1 INTRODUCTION... VIII OVERVIEW... VIII-1

Digital Circuits 4: Sequential Circuits

Lesson 12. Advanced Digital Integrated Circuits Flip-Flops, Counters, Decoders, Displays

Transcription:

Logic Devices for Interfacing, The 8085 MPU Lecture 4 1

Logic Devices for Interfacing Tri-State devices Buffer Bidirectional Buffer Decoder Encoder D Flip Flop :Latch and Clocked 2

Tri-state Logic Outputs Since we can have multiple masters on a bus, we need Tristate logic for attachment to a bus so that each device can choose to drive or not drive the bus depending on whether it is the bus master for a given bus cycle Tri-state logic prevents a bus conflict where one device is driving a signal to 1 and another device is driving it to 0 at the same time - generates high current through wires (and smoke?) 3

Tri-State Logic and Buses The logical element has output enable pin to go from a floating output to drive the output from the circuit Inverters and buffers are used as bus drivers or buffers Two such drivers or buffers in opposite directions are used to make the connection bi-directional The gates also provide more drive onto the bus so that the bus signals are stronger and the bus can be longer enable in Device Bus enable out 4

Tri-State Logic The problem with connecting multiple normal outputs together on a bus is that each has to be in one logic state (0) or the other (1) - driving voltage on each bus signal high or low This represents a conflict over the state of the signal We resolve this conflict with tri-state logic A Logically enable A Electrically +5v output 0v Truth Table enable A Output 0 0 (Z) 0 1 (Z) 1 0 1 1 1 0 5

Buses Concept is to link together multiple functional units over a common data highway at a lower cost than using multiple point to point links A D E OR A Bus D E B C B C Number of Links = n * (n 1) / 2 6

Bus - Essential Part of Any Computer CPU Primary Memory Secondary Memory I/O Data Address Control 7

Tri-State Logic and Buses 8

Bus Master Slave Relationships Up till now, I have said that the address bus and the control bus are always driven by the processor, however that is NOT really true! That was only a lie of simplification! The processor is NOT the only device that may be driving the address and control busses Hopefully you are now well-prepared for me to unsimplify a bit 9

Bus Arbitration Bus arbitration is used to hand off a bus between one of several potential bus masters using signals that are a part of the bus itself A bus arbitration protocol implements some form of bus request and bus grant handshake to determine which device will be the master on the bus for the next bus cycle 10

Tri-State Bus Summary All devices have tri-state logic connections to the data bus may be driving or receiving Memory and I/O devices don t need tri-state logic on address/control bus (never drive them) Because the processor may need to yield the control/address busses, it must have tri-state logic for driving those bus signals DMAC controller must have tri-state logic for driving the control and address bus signals 11

BUFFER A buffer has only a single input and a single output with behavior that is the opposite of an NOT gate. It simply passes its input, unchanged, to its output. In a Boolean logic simulator, a buffer is mainly used to increase propagation delay. In a real-world circuit, a buffer can be used to amplify a signal if its current is too weak. 12

DECODER A decoder is a device which does the reverse operation of an encoder, undoing the encoding so that the original information can be retrieved. The same method used to encode is usually just reversed in order to decode. It is a combinational circuit that converts binary information from n input lines to a maximum of 2 n unique output lines. 13

ENCODER An encoder is a device, circuit, transducer, software program, algorithm or person that converts information from one format or code to another, for the purposes of standardization, speed, secrecy, security or compressions. 14

D FLIP FLOP: Latched and Clocked A flip-flop or latch is a circuit that has two stable states and can be used to store state information. A flip-flop is a bistable multivibrator. The circuit can be made to change state by signals applied to one or more control inputs and will have one or two outputs. The D flip-flop is widely used. It is also known as a "data" or "delay" flip-flop. The D flip-flop captures the value of the D-input at a definite portion of the clock cycle (such as the rising edge of the clock). That captured value becomes the Q output. At other times, the output Q does not change. The D flip-flop can be viewed as a memory cell, a zero-order hold, or a delay line. 15

8085 MPU 16

Intel 8085 Pin Configuration 17

Signals and I/O Pins 18

Intel 8085 CPU Block Diagram 19

The 8085 and Its Buses The 8085 is an 8-bit general purpose microprocessor that can address 64K Byte of memory. It has 40 pins and uses +5V for power. It can run at a maximum frequency of 3 MHz. The pins on the chip can be grouped into 6 groups: Address Bus. Data Bus. Control and Status Signals. Power supply and frequency. Externally Initiated Signals. Serial I/O ports.

The Address and Data Bus Systems The address bus has 8 signal lines A8 A15 which are unidirectional. The other 8 address bits are multiplexed (time shared) with the 8 data bits. So, the bits AD0 AD7 are bi-directional and serve as A0 A7 and D0 D7 at the same time. During the execution of the instruction, these lines carry the address bits during the early part, then during the late parts of the execution, they carry the 8 data bits. In order to separate the address from the data, we can use a latch to save the value before the function of the bits changes.

The Control and Status Signals There are 4 main control and status signals. These are: ALE: Address Latch Enable. This signal is a pulse that become 1 when the AD0 AD7 lines have an address on them. It becomes 0 after that. This signal can be used to enable a latch to save the address bits from the AD lines. RD: Read. Active low. WR: Write. Active low. IO/M: This signal specifies whether the operation is a memory operation (IO/M=0) or an I/O operation (IO/M=1). S1 and S0 : Status signals to specify the kind of operation being performed. Usually not used in small systems.

The Flags register There is also a flag register whose bits are affected by the arithmetic & logic operations. S-sign flag The sign flag is set if bit D7 of the accumulator is set after an arithmetic or logic operation. Z-zero flag Set if the result of the ALU operation is 0. Otherwise is reset. This flag is affected by operations on the accumulator as well as other registers. (DCR B). AC-Auxiliary Carry This flag is set when a carry is generated from bit D3 and passed to D4. This flag is used only internally for BCD operations. P-Parity flag After an ALU operation, if the result has an even # of 1s, the p-flag is set. Otherwise it is cleared. So, the flag can be used to indicate even parity. CY-carry flag This flag is set when a carry is generated from bit D7 after an unsigned operation. OV-Overflow flag This flag is set when an overflow occurs after a signed operation.

More on the 8085 machine cycles The 8085 executes several types of instructions with each requiring a different number of operations of different types. However, the operations can be grouped into a small set. The three main types are: Memory Read and Write. I/O Read and Write. Request Acknowledge. These can be further divided into various smaller operations (machine cycles).

Opcode Fetch Machine Cycle The first step of executing any instruction is the Opcode fetch cycle. In this cycle, the microprocessor brings in the instruction s Opcode from memory. To differentiate this machine cycle from the very similar memory read cycle, the control & status signals are set as follows: IO/M=0, s0 and s1 are both 1. This machine cycle has four T-states. The 8085 uses the first 3 T-states to fetch the opcode. T4 is used to decode and execute it. It is also possible for an instruction to have 6 T-states in an opcode fetch machine cycle.

Memory Read Machine Cycle The memory read machine cycle is exactly the same as the opcode fetch except: It only has 3 T-states The s0 signal is set to 0 instead.

The Memory Read Machine Cycle To understand the memory read machine cycle, let s study the execution of the following instruction: MVI A, 32 In memory, this instruction looks like: The first byte 3EH represents the opcode for loading a byte into the accumulator (MVI A), the second byte is the data to be loaded. The 8085 needs to read these two bytes from memory before it can execute the instruction. Therefore, it will need at least two machine cycles. The first machine cycle is the opcode fetch discussed earlier. The second machine cycle is the Memory Read Cycle. 2000H 2001H 3E 32