An Introduction to intel 8085 Microprocessor.

Similar documents
MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

PART B QUESTIONS AND ANSWERS UNIT I

Microprocessor & Assembly Language

TIMING DIAGRAM O 8085

MICROPROCESSOR AND MICROCOMPUTER BASICS

MACHINE ARCHITECTURE & LANGUAGE

Interrupts. 1.Maskable interrupt request can be ignored or delayed by the microprocessor and used in telephone

8051 hardware summary

(Refer Slide Time: 00:01:16 min)

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

Chapter 2 Logic Gates and Introduction to Computer Architecture

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

CHAPTER 7: The CPU and Memory

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Central Processing Unit

8085 INSTRUCTION SET

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Computer organization

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

8086 Microprocessor (cont..)

Central Processing Unit (CPU)

Z80 Microprocessors Z80 CPU. User Manual UM Copyright 2014 Zilog, Inc. All rights reserved.

Building a computer. Electronic Numerical Integrator and Computer (ENIAC)

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Programming Logic controllers

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Serial Communications

8254 PROGRAMMABLE INTERVAL TIMER

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

1. Computer System Structure and Components

Using Altera MAX Series as Microcontroller I/O Expanders

Chapter 13. PIC Family Microcontroller

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

Lecture N -1- PHYS Microcontrollers

COMPUTER ARCHITECTURE. Input/Output

8051 MICROCONTROLLER COURSE

An Overview of Stack Architecture and the PSC 1000 Microprocessor

8741A UNIVERSAL PERIPHERAL INTERFACE 8-BIT MICROCOMPUTER

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

OVERVIEW OF MICROPROCESSORS

Computer Organization. and Instruction Execution. August 22

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

CSE2102 Digital Design II - Topics CSE Digital Design II

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring ) Serial Interfacing. By Dr.

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Flash Microcontroller. Memory Organization. Memory Organization

Microcomputer Components SAB 80515/SAB 80C515 8-Bit Single-Chip Microcontroller Family

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

The Central Processing Unit:

Memory Elements. Combinational logic cannot remember

HD44780U (LCD-II) (Dot Matrix Liquid Crystal Display Controller/Driver)

Lesson-16: Real time clock DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK

a8251 Features General Description Programmable Communications Interface

Chapter 1 Computer System Overview

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

Z80 Family. CPU User Manual

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

BASIC COMPUTER ORGANIZATION AND DESIGN

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

OpenSPARC T1 Processor

Am186ER/Am188ER AMD Continues 16-bit Innovation

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Let s put together a Manual Processor

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Decimal Number (base 10) Binary Number (base 2)

8031AH 8051AH 8032AH 8052AH NMOS SINGLE-CHIP 8-BIT MICROCONTROLLERS

CPU Organisation and Operation

Timer A (0 and 1) and PWM EE3376

DP8570A DP8570A Timer Clock Peripheral (TCP)

Keil C51 Cross Compiler

Computer Systems Design and Architecture by V. Heuring and H. Jordan

HD61202U. (Dot Matrix Liquid Crystal GraphicDisplay Column Driver)

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

İSTANBUL AYDIN UNIVERSITY

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

8051 Serial Port. Crystal TXD. I/O Device RXD. Embedded Systems Peripherals

CPU Organization and Assembly Language

Eureka Technology. Understanding SD, SDIO and MMC Interface. by Eureka Technology Inc. May 26th, Copyright (C) All Rights Reserved

KS0108B 64CH SEGMENT DRIVER FOR DOT MATRIX LCD INTRODUCTION 100 QFP

Switch Fabric Implementation Using Shared Memory

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features

Module 3: Floyd, Digital Fundamental

8259A PROGRAMMABLE INTERRUPT CONTROLLER (8259A 8259A-2)

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

HT1632C 32 8 &24 16 LED Driver

LABORATORY MANUAL EE0310 MICROPROCESSOR & MICROCONTROLLER LAB

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Transcription:

An Introduction to intel 8085 Microprocessor www.mangroveinstitute.com

Intel 8085

Intel 8085 Pin Configuration 3

Signals and I/O Pins 4

Intel 8085 CPU Block Diagram 5

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.

ALE used to demultiplex address/data bus 8

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.

Frequency Control Signals There are 3 important pins in the frequency control group. X0 and X1 are the inputs from the crystal or clock generating circuit. The frequency is internally divided by 2. So, to run the microprocessor at 3 MHz, a clock running at 6 MHz should be connected to the X0 and X1 pins. CLK (OUT): An output clock pin to drive the clock of the rest of the system. We will discuss the rest of the control signals as we get to them.

A closer look at the 8085 Architecture Now, let s look at some of its features with more details.

The ALU In addition to the arithmetic & logic circuits, the ALU includes an accumulator, which is a part of every arithmetic & logic operation. Also, the ALU includes a temporary register used for holding data temporarily during the execution of the operation. This temporary register is not accessible by the programmer.

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.

Now, Let us see how the different units and bus systems stay connected: A 15 -A 10 Chip Selection Circuit 8085 A15-A8 CS ALE AD7-AD0 Latch A 7 -A 0 A 9 -A 0 1K Byte Memory Chip WR RD IO/M D 7 -D 0 RD WR

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 2000H 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. 2001H The second machine cycle is the Memory Read 3E 32

Machine Cycles vs. Number of bytes in the instruction Machine cycles and instruction length, do not have a direct relationship. To illustrate, let s look at the machine cycles needed to execute the following instruction. STA 2065H This is a 3-byte instruction requiring 4 machine cycles and 13 T-states. The machine code will be stored in memory as shown to the right 2010H 2011H 2012H This instruction requires the following 4 machine cycles: A Opcode fetch to fetch the opcode (32H) from location 2010H, decode it and determine that 2 more bytes are needed (4 T-states). A Memory read to read the low order byte of the address (65H) (3 T-states). A Memory read to read the high order byte of the address (20H) (3 T-states). A memory write to write the contents of the accumulator into the memory location. 32H 65H 20H

The Memory Write Operation In a memory write operation: The 8085 places the address (2065H) on the address bus Identifies the operation as a memory write (IO/M=0, s1=0, s0=1). Places the contents of the accumulator on the data bus and asserts the signal WR. During the last T-state, the contents of the data bus are saved into the memory location.

Memory interfacing There needs to be a lot of interaction between the microprocessor and the memory for the exchange of information during program execution. Memory has its requirements on control signals and their timing. The microprocessor has its requirements as well. The interfacing operation is simply the matching of these requirements.

Memory structure & its requirements RAM Data Lines Input Buffer WR ROM Address Lines CS Address Lines CS Output Buffer RD Output Buffer Data Lines RD Date Lines The way of interfacing the above two chips to the microprocessor is the same. However, the ROM does not have a WR signal.

Interfacing Memory Accessing memory can be summarized into the following three steps: Select the chip. Identify the memory register. Enable the appropriate buffer. Translating this to microprocessor domain: The microprocessor places a 16-bit address on the address bus. Part of the address bus will select the chip and the other part will go through the address decoder to select the register. The signals IO/M and RD combined indicate that a memory read operation is in progress. The MEMR signal can be used to enable the RD line on the memory chip.

Address decoding The result of address decoding is the identification of a register for a given address. A large part of the address bus is usually connected directly to the address inputs of the memory chip. This portion is decoded internally within the chip. What concerns us is the other part that must be decoded externally to select the chip. This can be done either using logic gates or a decoder.

Putting all of the concepts together: Back to the Overall Picture A 15 -A 10 Chip Selection Circuit 8085 A15-A8 CS ALE AD7-AD0 Latch A 7 -A 0 A 9 -A 0 1K Byte Memory Chip WR RD IO/M D 7 -D 0 RD WR

Control and Status Signals. 26

Interrupt Signals 8085 µp has several interrupt signals as shown in the following table. 27

Interrupt signals An interrupt is a hardware-initiated subroutine CALL. When interrupt pin is activated, an ISR will be called, interrupting the program that is currently executing. Pin TRAP 0024 RST 5.5 Subroutine Location 002C RST 6.5 0034 RST 7.5 INTR * 003C Note: * the address of the ISR is determined by the external hardware. 28

Interrupt signals INTR input is enabled when EI instruction is executed. The status of the RST 7.5, RST 6.5 and RST 5.5 pins are determined by both EI instruction and the condition of the mask bits in the interrupt mask register. 29

Interrupt Vectors 30

A circuit that causes an RST4 instruction (E7) to be executed in response to INTR. When INTR is asserted, 8085 response with INTA pulse. During INTA pulse, 8085 expect to see an instruction applied to its data bus. 31

RESET signal Following are the two kind of RESET signals: RESET IN: an active low input signal, Program Counter (PC) will be set to 0 and thus MPU will reset. RESET OUT: an output reset signal to indicate that the µp was reset (i.e. RESET IN=0). It also used to reset external devices. 32

RESET signal 33

Direct Memory Access (DMA) DMA is an IO technique where external IO device requests the use of the MPU buses. Allows external IO devices to gain high speed access to the memory. Example of IO devices that use DMA: disk memory system. HOLD and HLDA are used for DMA. If HOLD=1, 8085 will place it address, data and control pins at their high-impedance. A DMA acknowledgement is signaled by HLDA=1. 34

MPU Communication and Bus Timing Figure 3: Moving data form memory to MPU using instruction MOV C, A (code machine 4FH = 0100 1111) 35

MPU Communication and Bus Timing The Fetch Execute Sequence : 1. The µp placed a 16 bit memory address from PC (program counter) to address bus. Figure 4: at T1 The high order address, 20H, is placed at A15 A8. the low order address, 05H, is placed at AD7 - AD0 and ALE is active high. Synchronously the IO/M is in active low condition to show it is a memory operation. 2. At T2 the active low control signal, RD, is activated so as to activate read operation; it is to indicate that the MPU is in fetch mode 36 operation.

MPU Communication and Bus Timing Figure 4: 8085 timing diagram for Opcode fetch cycle for MOV C, A. 37

MPU Communication and Bus Timing 3. T3: The active low RD signal enabled the byte instruction, 4FH, to be placed on AD7 AD0 and transferred to the MPU. While RD high, the data bus will be in high impedance mode. 4. T4: The machine code, 4FH, will then be decoded in instruction decoder. The content of accumulator (A) will then copied into C register at time state, T4. 38