+ All Categories
Home > Documents > Microprocessors i i

Microprocessors i i

Date post: 05-Apr-2018
Category:
Upload: stalin-krishnamuthy
View: 216 times
Download: 0 times
Share this document with a friend

of 14

Transcript
  • 7/31/2019 Microprocessors i i

    1/14

    5.2 Microprocessors II:

    8085

    Dr. Tarek A. TutunjiMechatronics Engineering Department

    Philadelphia University, Jordan

  • 7/31/2019 Microprocessors i i

    2/14

    Microprocessors II: 8085

    In the previous sequence, a generalintroduction to microprocessors wasgiven

    In this sequence, the 8085microprocessor will be described and

    will be used to illustratemicroprocessors functionality,architecture, and programming

  • 7/31/2019 Microprocessors i i

    3/14

    8085

    The 8085 Microprocessor is an 8-bit general purposemicroprocessor, capable of addressing 64K of memory 8-bit data bus

    16-bit address bus

    The device has 40 pins, operates at frequency between 1

    to 5MHz and requires +5V supply 8085 is an Intel microprocessor

    First built in 1976

    Simple architecture and therefore suitable to illustratemicroprocessor functionality

  • 7/31/2019 Microprocessors i i

    4/14

    8085 Architecture

    MPU needs to Identify peripheral or memory location with address Transfer binary information (data and instructions) Provide timing and control signals

    8085 Buses

    Address Bus: a group of 16 lines identified as A0 toA15. The address bus flows in one direction fromMPU to peripherals (or memory)

    The 8085 has 16-address lines and therefore canaddress up to 216= 65,536 (64K)

    Data Bus: a group of 8 lines used for data transfer.The bus is bidirectional data flows in bothdirections between MPU and peripherals (or memory)

    Control Bus: lines that carry synchronization signalsto provide timing and control

  • 7/31/2019 Microprocessors i i

    5/14

    8085 Architecture

    Address bus16 signal lines (pins)A15 A8 one-direction, higher addressAD7 AD0 lower address, dual purpose

    Data bus8 signal lines (pins)

    AD7 AD0 bi-directionalDual purpose: Multiplexed used for Data or address

    Control and Status signalsRD and WR Read/Write control signals. Active lowIO/M Status signal to differentiate between

    Input/output 1 and memory 0operations

    ALE Address Latch EnablePositive pulse at beginning of operation

    S0 and S1 status signals

  • 7/31/2019 Microprocessors i i

    6/14

    8085 ArchitecturePower supply and frequency signalsVcc (+5V) and Vss (ground)X1 and X2 crystal (or RC circuit) to supply input

    clock, Frequency 6MHz to 10 MHzCLK (out) output clock that can be used for

    external devices

    External initiated signalsINTR (input) Interrupt RequestINTA (output) Acknowledge INTRRST 7.5, 6.5, 5.5 (inputs) Restart vectored InterruptsTRAP (input) Nonmaskable interruptHOLD (input) DMA requestHLDA (output) Acknowledge HOLDREADY (input) Delay uprocessor RD/WRRESET IN (input) When signal goes low: PC set to 0,

    MPU is resetRESET OUT Signal used to reset other devices

    Serial I/O PortsSerial transmission: SID (input) and SOD (output)

  • 7/31/2019 Microprocessors i i

    7/14

    8085 Internal Registers

    Registers are used in microprocessors to store information.The 8085 has the following registers:

    Accumulator8-bit register that is part of the ALU. Also identified as register A

    General Registers

    Six general purpose 8-bit registers B, C, D, E, H and LCan be combined as 16-bit register pairs BC, DE, HL

    Program Counter (PC) and Stack Pointer (SP)16-bit registers

    PC points to the memory address from which the next byte is fetchedSP points to a memory location in the stack

    Flags: S, Z, P, CY and AC

    S: sign flag is set to 1 when bit D7 of the result =1 Z: zero flag is set to 1 when the result is zero P: parity flag is set to 1 when the result has an even number of 1s CY: carry flag is set to 1 when the arithmetic operation results in carry AC: auxiliary carry is set to 1 when carry is generated by D3

  • 7/31/2019 Microprocessors i i

    8/14

    8085 Internal Registers

  • 7/31/2019 Microprocessors i i

    9/14

    8085 Instruction Set

    74 operation codes that result in 246 instructions

    Copy (Data Transfer) Instructions

    Mnemonics Example Operation

    MVI R, 8-bit MVI B, 4FH move 8-bit data in registerMOV Rd,Rs MOV B,A copy data from Rs to RdOUT 8-bit OUT 01H output data from A to deviceIN 8-bit IN 05H input data from device to A

    LDA 16-bit LDA 2050H load A with data in memorySTA 16-bit STA 2080H store data in A to memory

  • 7/31/2019 Microprocessors i i

    10/14

    8085 Instruction Set

    Arithmetic Instructions

    Mnemonics Example Operation

    ADD R ADD C add register content to A

    ADI 8-bit ADI 48H add 8-bit data to A

    SUB R SUB B subtract register content from A

    SUI 8-bit SUI F1H subtract 8-bit data from A

    INR R INR C add 1 to registerDCR R DCR D subtract 1 from register

  • 7/31/2019 Microprocessors i i

    11/14

    8085 Instruction Set

    Logic Instructions

    Mnemonics Example Operation

    ANA R ANA C AND register content with A

    ANI 8-bit ANI 23H AND 8-bit data with AORA R ORA C OR register content with AORI 8-bit ORI 2EH OR 8-bit data with AXRA R XRA E XOR register content with AXRI 8-bit XRA A7H XOR 8-bit data with A

    CMP R CMP B Compare register content with ACPI 8-bit CPI F6H Compare 8-bit data with A

  • 7/31/2019 Microprocessors i i

    12/14

    8085 Instruction Set

    Branch Instructions

    Mnemonic Example Operation

    JMP 16-bit JMP 2030H go to 16-bit address

    JZ 16-bit JZ 2020H go to 16-bit address if Z =1JNZ 16-bit JNZ 2070H go to 16-bit address if Z = 0CALL CALL 2010H Jump to subroutine at addressRET RET Returns from subroutine

    Other Instructions

    HLT HLT stop program

  • 7/31/2019 Microprocessors i i

    13/14

    Example

    Write assembly code to load two hexadecimal numbers 42H and 38H in registers A andB. Add the numbers and display the sum at output port 1

    In Assembly language1) MVI A,42H move 42H to register A2) MVI B,38H move 38H to register B2) ADD B add register B to A and store in A3) OUT 01H display accumulator content to port 014) HLT stop program

    Assume the program starts at memory address 1000. Then the programmer would inputthe following Machine (Hex) code

    Memory Address Mnemonic Hex Code Binary

    1000 MVI A,42H 3E 0011 11101001 42 0100 00101002 MVI B,38H 06 0000 01101003 38 0011 10001004 ADD B 80 1000 00001005 OUT 01H D3 1101 00111006 01 0000 00011007 HLT 76 0111 1110

  • 7/31/2019 Microprocessors i i

    14/14

    Summary

    8085 is a 40-pin, 8-bit microprocessormade by Intel

    There are three main buses inmicroprocessors: address bus, data bus,

    and control bus 8085 has several internal registers

    including accumulator, six generalregisters, PC, SP, and flags

    8085 instruction set is provided whichincludes: copy, arithmetic, logic, andbranch operations


Recommended