CPE 302: 8085 Microprocessor Architecture

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Which of the following is NOT a key component of the 8085 microprocessor?

  • Control Unit
  • Registers
  • Graphics Processing Unit (GPU) (correct)
  • Arithmetic Logic Unit (ALU)

What is the primary function of the Arithmetic Logic Unit (ALU) in the 8085 microprocessor?

  • To store program instructions
  • To generate timing signals
  • To perform numerical and logical operations (correct)
  • To control the flow of data between memory and I/O devices

Which register is used to store the results of arithmetic and logical operations performed by the ALU in the 8085 microprocessor?

  • Stack Pointer
  • Accumulator (correct)
  • B Register
  • C Register

How many general-purpose registers does the 8085 microprocessor include?

<p>Six (D)</p> Signup and view all the answers

Which of the following is a 16-bit register in the 8085 microprocessor?

<p>Stack Pointer (C)</p> Signup and view all the answers

Which flag is set when an arithmetic operation in the 8085 results in zero?

<p>Zero Flag (Z) (A)</p> Signup and view all the answers

What is the function of the Program Counter (PC) in the 8085 microprocessor?

<p>To store the address of the next instruction to be executed (A)</p> Signup and view all the answers

Which of the following best describes the function of the Stack Pointer (SP) in the 8085?

<p>Points to the top of the stack memory. (B)</p> Signup and view all the answers

Which of the following is true regarding the general-purpose registers in the 8085?

<p>They can be used individually or as pairs for 16-bit operations. (B)</p> Signup and view all the answers

What is the primary function of the Instruction Register (IR) in the 8085 microprocessor?

<p>To store the opcode of the fetched instruction (B)</p> Signup and view all the answers

Which of the following describes the function of the Control Unit in the 8085 microprocessor?

<p>Generates control signals to execute instructions (D)</p> Signup and view all the answers

What is the purpose of the ALE (Address Latch Enable) signal in the 8085?

<p>To indicate when the lower address/data lines carry a valid address (B)</p> Signup and view all the answers

What is the primary function of the data bus in the 8085 microprocessor?

<p>To transfer binary data between the microprocessor and external devices (B)</p> Signup and view all the answers

Match the status signals (S1, S0) to its corresponding operation: S1=0, S0=0

<p>Halt (D)</p> Signup and view all the answers

Which of the following accurately describes the address bus in the 8085?

<p>16-bit wide, primarily unidirectional (C)</p> Signup and view all the answers

In the context of the 8085 instruction set, what does the term 'opcode' refer to?

<p>The specific operation to be performed (D)</p> Signup and view all the answers

Which category does the MOV instruction belong to in the 8085 instruction set?

<p>Data Transfer (B)</p> Signup and view all the answers

Which of the following instructions affects the carry flag?

<p>ADD (A)</p> Signup and view all the answers

Which type of instruction is 'JMP' considered in the 8085 instruction set?

<p>Branching (B)</p> Signup and view all the answers

Which instruction is used to halt the processor in the 8085 microprocessor?

<p>HLT (D)</p> Signup and view all the answers

An instruction that specifies the data to be operated on directly within the instruction itself uses which addressing mode?

<p>Immediate Addressing (C)</p> Signup and view all the answers

In which addressing mode is the address of the data specified in the instruction?

<p>Direct Addressing (D)</p> Signup and view all the answers

If an instruction specifies the register that contains the data, which addressing mode is being used?

<p>Register Direct Addressing (D)</p> Signup and view all the answers

The instruction specifies the name of the register in which the address of the data is available. What addressing mode is being used?

<p>Register Indirect Addressing (B)</p> Signup and view all the answers

Which addressing mode is used when the instruction itself specifies the data to be operated on?

<p>Implied Addressing (D)</p> Signup and view all the answers

What is the purpose of an interrupt in the 8085 microprocessor?

<p>To temporarily halt normal program execution to service an urgent task (B)</p> Signup and view all the answers

In the context of interrupts, what does ISR stand for?

<p>Interrupt Service Routine (C)</p> Signup and view all the answers

During interrupt handling, what is the first step the microprocessor typically performs?

<p>An external device sends an interrupt request (C)</p> Signup and view all the answers

What is the purpose of pushing the Program Counter (PC) onto the stack during interrupt handling?

<p>To store the address of the next instruction to be executed after the interrupt is handled (A)</p> Signup and view all the answers

Which of the following is a non-maskable interrupt in the 8085?

<p>TRAP (B)</p> Signup and view all the answers

Which of the following is a hardware interrupt?

<p>TRAP (C)</p> Signup and view all the answers

What is the vector address for the TRAP interrupt in the 8085?

<p>0024H (A)</p> Signup and view all the answers

What instruction is used to enable or disable the RST5.5, RST6.5 and RST7.5 interrupts individually?

<p>SIM (D)</p> Signup and view all the answers

How do software interrupts differ from hardware interrupts in the 8085?

<p>Software interrupts are inserted into the program by the programmer. (D)</p> Signup and view all the answers

Which of the following is NOT a characteristic of software interrupts in the 8085?

<p>The concept of priority applies to them. (C)</p> Signup and view all the answers

What is Direct Memory Access (DMA)?

<p>A feature that allows hardware devices to access the system's memory directly without CPU intervention (D)</p> Signup and view all the answers

What is the primary benefit of using DMA?

<p>Reduced CPU overhead by bypassing the CPU for data transfers (B)</p> Signup and view all the answers

Which component manages data transfers between devices and memory in a DMA system?

<p>DMA Controller (C)</p> Signup and view all the answers

Which DMA transfer mode monopolizes the bus, resulting in high-speed transfer, but preventing CPU access during the transfer?

<p>Burst Mode (C)</p> Signup and view all the answers

In which DMA transfer mode does the DMA controller transfer one data unit at a time, allowing the CPU intermittent access to the bus?

<p>Cycle Stealing Mode (D)</p> Signup and view all the answers

Signup and view all the answers

Flashcards

What is the ALU?

The 8085's arithmetic and logic unit performs numerical/logical operations.

What is the Accumulator?

An 8-bit register that stores data and the results of arithmetic and logical operations.

What are Temporary Registers?

Registers used for temporary storage during operations.

What is the Program Counter (PC)?

A 16-bit register that holds the address of the next instruction to be executed.

Signup and view all the flashcards

What is the Stack Pointer (SP)?

A 16-bit register pointing to the top of the stack in memory.

Signup and view all the flashcards

What is the Instruction Register (IR)?

Stores the opcode of the fetched instruction.

Signup and view all the flashcards

What is the Instruction Decoder?

Translates the opcode in the IR into control signals.

Signup and view all the flashcards

What is the Data Bus?

An 8-bit wide bus that transfers data between components.

Signup and view all the flashcards

What is the Address Bus?

A 16-bit wide bus that transmits memory addresses.

Signup and view all the flashcards

What is the Control Bus?

Carries signals to manage operations in the microprocessor.

Signup and view all the flashcards

What is ALE?

A signal indicating when the lower address/data lines carry a valid address.

Signup and view all the flashcards

What is RD?

Signal for reading data from memory/I-O devices.

Signup and view all the flashcards

What is WR?

Signal for writing data to memory/I-O devices.

Signup and view all the flashcards

What is IO/M (I/O or memory)?

Distinguishes between I/O and memory operations.

Signup and view all the flashcards

What are Instructions in 8085?

Commands that control the 8085's operations.

Signup and view all the flashcards

What is an Opcode?

Specifies the operation to be performed by an instruction.

Signup and view all the flashcards

What is an Operand?

Data or address used in an instruction (register, memory, immediate value).

Signup and view all the flashcards

What is Addressing Mode?

Specifying where data will be operated on by an Instruction.

Signup and view all the flashcards

What is Immediate Addressing?

The data is specified directly in the instruction itself.

Signup and view all the flashcards

What is Memory Direct Addressing?

The address of the data is specified in the instruction.

Signup and view all the flashcards

What is Register Direct Addressing?

The instruction specifies the register where the data is available.

Signup and view all the flashcards

What is Register Indirect Addressing?

The instruction specifies a register pair holding the memory address.

Signup and view all the flashcards

What is Implied Addressing?

The instruction itself specifies the data; no explicit operand needed.

Signup and view all the flashcards

What is an Interrupt?

Event halting execution to service an urgent task via an Interrupt Service Routine.

Signup and view all the flashcards

What is Interrupt Request?

CPU checks for interrupts, controlled by EI (enable) or DI (disable).

Signup and view all the flashcards

What is Interrupt Acknowledgment?

Microprocessor acknowledges interrupt and saves its current state.

Signup and view all the flashcards

What is Fetch Interrupt Vector?

Microprocessor fetches the interrupt type and vector address.

Signup and view all the flashcards

What is Execute Interrupt Service Routine?

Microprocessor jumps to the vector address to run the service routine.

Signup and view all the flashcards

What is Return from Interrupt?

Return to Main Program After the RET instruction is executed.

Signup and view all the flashcards

What is Vectored Interrupt?

Automatically jumps to a predefined ISR address.

Signup and view all the flashcards

What is Non-Vectored Interrupt?

ISR address provided externally by interrupting device.

Signup and view all the flashcards

What is Maskable Interrupt?

Can be enabled or disabled by the CPU.

Signup and view all the flashcards

What is Non-Maskable Interrupt?

Interrupts that cannot be disabled and must be serviced immediately.

Signup and view all the flashcards

What are Hardware Interrupts?

Triggered by external hardware signals.

Signup and view all the flashcards

What are Software Interrupts?

Generated by specific instructions within a program.

Signup and view all the flashcards

What is Direct Memory Access (DMA)?

Feature allowing hardware devices to access memory directly, bypassing the CPU.

Signup and view all the flashcards

What is the DMA Controller?

Manages data transfers between devices and memory during DMA.

Signup and view all the flashcards

What is Burst Mode in DMA?

Transfers a block of data in one go.

Signup and view all the flashcards

What is Cycle Stealing Mode in DMA?

Transfers one data unit at a time, pausing between transfers.

Signup and view all the flashcards

What is Transparent Mode in DMA?

Transfers data only when the CPU is idle.

Signup and view all the flashcards

Study Notes

  • CPE 302 is a course at Nile University of Nigeria, taught by Sadiq Abubakar Mohammed in 2024.
  • The course is about Microprocessors, Systems, and Interfacing.
  • The course will cover the 8085 Microprocessor

8085 Architecture Overview

  • The 8085 features an 8-Bit Internal Data Bus, Accumulator, Temporary Registers, and Flags.
  • Control is managed by the Timing and Control Circuit.
  • Instructions are processed through the Instruction Register and Decoder.
  • Serial I/O is managed with SID and SOD lines.

8085 Specifications

  • The 8085 is an 8-bit processor in a 40-pin IC package, requiring +5V power.
  • It has a maximum frequency of 3MHz.
  • The data bus is 8-bit (D0-D7) and the address bus is 16-bit (A0-A15), addressing 64KB of memory.
  • Key components include the ALU, registers, control unit, and bus structure.

Arithmetic & Logic Unit (ALU)

  • The ALU performs numerical and logical operations like Addition (ADD), Subtraction (SUB), AND, OR, etc.
  • It uses data from memory and the Accumulator.
  • Results are stored in the accumulator.

Registers

  • The 8085 has six general-purpose registers, two temporary registers, one accumulator, and one flag register.
  • There are also two 16-bit registers: stack pointer and program counter.

Accumulator

  • The accumulator is an 8-bit register and part of the ALU used to store data and perform arithmetic/logical operations, also known as register A.

Flag Register

  • The ALU includes five flip-flops that are set/reset based on the data condition of the result in the accumulator and registers.
  • Flags are used by the microprocessor to test data conditions.
  • CY (Carry): D0 bit position used for Carry/borrow status.
  • P (Parity): D2 bit position used for Even parity check.
  • AC (Aux Carry): D4 bit position used for BCD carry tracking.
  • Z (Zero): D6 bit position used for Zero result check.
  • S (Sign): D7 bit position used for Sign bit.

Program Counter (PC)

  • A 16-bit register stores the address of the next instruction.
  • PC auto-increments after fetching each instruction byte.
  • Critical for sequential program execution.

Stack Pointer (SP)

  • 16-bit register points to the stack top in memory.
  • Requires manual initialization (e.g., LXI SP, FFFFH).
  • Decrements on PUSH/CALL and increments on POP/RET.

General Purpose Registers

  • B & C are often used together as the BC register pair.
  • D & E can form the DE register pair for 16-bit operations.
  • H & L are typically paired as HL and frequently serve as a memory pointer.
  • These registers can be used individually or as pairs for arithmetic, logic, and data transfer operations.

Temporary Registers (W & Z)

  • Two 8-bit non-programmable registers.
  • Used exclusively for internal operations like storing intermediate results during ALU operations.
  • Hidden from programmers and cannot be accessed directly.

Instruction Register (IR) & Decoder

  • The Instruction Register (8-bit) stores the opcode of the fetched instruction or first byte of multi-byte instructions.
  • The Instruction Decoder translates the opcode into control signals and activates relevant components (ALU, registers, buses).

Decoding Process

  • Opcode fetched is stored in IR and the decoder analyzes bit patterns.
  • Generates timing/control signals for execution.

Control Unit

  • Generates control signals on the data, address, and control buses to execute decoded instructions.
  • Data Bus: 8-bit wide for transferring data between the microprocessor and external devices. Its limited width means larger numbers may require multiple parts.
  • Address Bus: 16-bit wide, transmits memory addresses, lower 8 bits (A0-A7) are multiplexed with data and higher 8 bits (A8–A15) are solely addressing.
  • Control Bus: Carries specific control signals to manage operations.

Control Signals

  • ALE (Address Latch Enable) indicates when the lower address/data lines carry a valid address.
  • RD (Read signal): Active low for reading data from memory/I-O devices.
  • WR (Write signal): Active low for writing data to memory/I-O devices.
  • IO/M distinguishes between I/O (1) and memory (0) operations.
  • S1 & S0: Status signals that specify the current operation type.

Status Signals

  • S1=0, S0=0: Halt
  • S1=0, S0=1: Write
  • S1=1, S0=0: Read
  • S1=1, S0=1: Fetch

8085 Instruction Set

  • A collection of binary commands controls the 8085's operations.
  • Each instruction consists of: Opcode which specifies the operation (e.g., ADD, MOV). and Operand which is the data or address (register, memory, or immediate value).
  • Execution time for instructions is measured in machine cycles, where each cycle consists of multiple clock periods.
  • The microprocessor fetches, decodes, and executes each instruction in sequential steps and some will alter program flow by modifying program counter.

Instruction Set Functionality

  • Data Transfer which includes MOV, MVI, LDA, STA, copies data between registers/memory. Example: MOV B, C (Copy C to B).
  • Arithmetic includes ADD, SUB, INR, DCR, affects flags (CY, Z, AC). Example: ADD M (Add memory to Acc).
  • Logical includes ANA, ORA, XRA, RLC, performs bitwise operations. Example: ANI OFH (AND Acc with 0F).
  • Branching includes JMP, CALL, RET, supports Conditional (JZ, JC). Example: JNZ LOOP.
  • Machine Control includes HLT, NOP, EI, DI, manages processor states and interrupts.

Instruction Length

  • Instructions can be categorized by length (number of bytes): 1-byte, 2-byte, and 3-byte instructions.

Addressing Modes

  • Addressing Modes is the process of specifying the data to be operated on by an instruction.
  • The 8085 retrieves data from various locations using predefined data access strategies that determine where the operand (data) is located and how it is fetched.
  • Instructions can directly or indirectly reference data.
  • Operands may reside in registers, memory, or be embedded in the instruction itself.

Immediate Addressing

  • Data is specified in the instruction itself. It is part of the program instruction itself.
  • Example: MVI B, 3EH (Move the data 3EH to B register), LXI D, FFFOH (Load the data FFF0H to registers D-E), resulting in (B) = 3EH, (D)(E) = FFFOH.

Memory Direct Addressing

  • The address of the data is specified in the instruction itself.
  • Data is stored in memory and in this mode, program instructions and data can reside in different memory locations.
  • Example: LDA 240FH (Load register A with the contents of memory location 240FH).

Register Direct Addressing

  • The instruction specifies the name of the register in which data is available.
  • Example: MOV B, D moves the contents of register D to register B. INX H increments the contents of H-L register pair.

Register Indirect Addressing

  • The instruction specifies the name of the register with the address of the data
  • The actual data resides in memory, and its address is held by a register pair.
  • Example: MOV B, M moves the contents of memory location addressed by register pair H-L to register B.

Implied Addressing

  • The instruction itself specifies the data to be operated on.
  • Example: CMA is the content of accumulator (A), RRC rotates the content (A) right by one bit.

8085 Addressing Modes Summary

  • Immediate: Data specified in the instruction (MVI B, 3E).
  • Memory Direct: The address of the data is specified directly (LDA 240F).
  • Register Direct: Uses specified register contents (MOV B, D).
  • Register Indirect: Register contains the address of the data (MOV B, M).
  • Implied: Operand is implicit in the instruction (CMA).

Interrupts

  • An interrupt is an event that temporarily halts program execution to service an urgent task via an ISR.
  • I/O device signals the processor when data is ready, which pauses the main program, inputs data from the ISR, and resumes the main program.

Interrupt Handling Steps

  • Interrupt Request: An external device/internal condition sends a signal, and the microprocessor checks if interrupts are enabled (EI or DI).
  • Interrupt Acknowledgment: The microprocessor acknowledges and saves the current state by pushing Program Counter (PC) and Flags onto the stack.
  • Fetch Interrupt Vector: The microprocessor identifies the interrupt type and fetches the vector address: (TRAP: 0024H, RST 7.5: 003CH, RST 6.5: 0034H, RST 5.5: 002CH, INTR: No fixed vector).
  • Execute Interrupt Service Routine (ISR): Jumps to the vector address and executes the ISR. Maskable interrupts are automatically disabled during ISR execution.
  • Return from Interrupt: At the end of the ISR, the RET instruction is executed and the microprocessor restores the saved state (Flags register and Program Counter (PC)), resuming normal program execution.

Types of Interrupts

  • Vectored vs. Non-Vectored Interrupts
  • Vectored jumps to predefined ISR address (e.g., RST 7.5, RST 6.5, RST 5.5).
  • Non-Vectored needs ISR address externally (e.g., INTR).
  • Maskable vs. Non-Maskable Interrupts
  • Maskable is enabled/disabled by CPU (e.g., RST 7.5, RST 6.5, RST 5.5, INTR).
  • Non-Maskable is serviced immediately and cannot be disabled (e.g., TRAP).
  • Hardware vs. Software Interrupts
  • Hardware is triggered by external signals (e.g., TRAP, RST 7.5, INTR).
  • Software is generated by specific instructions within a program (e.g., RST 0 to RST 7).

Hardware Interrupt Vector Table

  • TRAP: 0024H (Non-maskable, highest priority)
  • RST 7.5: 003CH (Maskable, high priority)
  • RST 6.5: 0034H (Maskable, medium priority)
  • RST 5.5: 002CH (Maskable, low priority)
  • INTR: No fixed vector (lowest priority, requires external hardware)
  • All maskable ones can be enabled/disabled using EI and DI instructions, while RST5.5, RST6.5, and RST7.5 can be individually enabled or disabled using SIM instruction.

Software Interrupts

  • The 8085 instruction set includes eight software interrupt instructions called Restart (RST) instructions.
  • The concept of priority does not apply to software interrupts and inserted into the program as instructions by the programmer processed when lines are read.
  • Software interrupt address locations: RST0-C7-0000H, RST1-CF-0008H, RST2-D7-0010H, RST3-DF-0018H, RST4-E7-0020H, RST5-EF-0028H, RST6-F7-0030H, RST7-FF-0038H.

Direct Memory Access (DMA)

  • DMA allows hardware devices direct access to the system's memory without CPU intervention, which enables high-speed data transfer between peripherals (e.g., disk drives, network cards) and memory.
  • DMA reduces CPU overhead by bypassing the need for the CPU to handle data transfers, freeing up the CPU and provides faster data rates for time-sensitive applications.
  • DMA Components: DMA Controller manages data transfers, Memory is the source or destination, and Peripheral Device initiates the DMA request.

DMA Operation

  • Request is when a Peripheral device sends a DMA request (DRQ) to the DMA controller
  • Acknowledgment is when a DMA controller sends a Hold Request (HOLD) to the CPU which grants control by asserting Hold Acknowledge (HLDA).
  • Data Transfer is when a DMA controller takes control of the address and data buses and transfers data directly between memory and the peripheral.
  • Completion is when a DMA controller releases the buses and notifies the CPU.

DMA Transfer Modes

  • Burst Mode transfers a block of data in one go. Although it has high speed but monopolizes the bus.
  • Cycle Stealing Mode transfers one data unit at a time, pausing between transfers (slower but allows CPU to access the bus intermittently.)
  • Transparent Mode transfers data only when the CPU is idle making it the Least intrusive but slowest.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser