0% found this document useful (0 votes)
13 views31 pages

COMA

The document provides a comprehensive overview of the 8085 microprocessor, detailing its programming model, instruction set, and architecture. It covers key concepts such as registers, memory interfacing, interrupt structures, and assembly language programming. Additionally, it explains various microoperations, timing diagrams, and the differences between microprocessors and microcontrollers.

Uploaded by

Divu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views31 pages

COMA

The document provides a comprehensive overview of the 8085 microprocessor, detailing its programming model, instruction set, and architecture. It covers key concepts such as registers, memory interfacing, interrupt structures, and assembly language programming. Additionally, it explains various microoperations, timing diagrams, and the differences between microprocessors and microcontrollers.

Uploaded by

Divu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

COMA QB BY TRAZY-

1. Programming Model of 8085

The programming model of the 8085 microprocessor consists of registers, flags, and the
memory organisation. The main registers include:

● Accumulator (A): 8-bit register used for arithmetic and logic operations.
● General Purpose Registers (B, C, D, E, H, L): 6 registers, each 8 bits, used for
temporary storage.
● Program Counter (PC): 16-bit register that holds the address of the next instruction to
be executed.
● Stack Pointer (SP): 16-bit register that points to the top of the stack in memory.
● Instruction Register (IR): Holds the current instruction being executed.
● Flags Register: Contains 5 status flags (Sign, Zero, Auxiliary Carry, Parity, Carry) that
indicate the status of the accumulator after operations.

2. CMP M, RAL, and CMA Instructions

● CMP M: Compares the content of the accumulator with the content of memory
(pointed by HL pair). It affects the flags based on the result.
● RAL (Rotate Accumulator Left): Rotates the bits of the accumulator to the left. The
MSB moves to the carry flag and the LSB comes from the carry flag.
● CMA (Complement Accumulator): Complements (inverts) all the bits of the
accumulator.

3. 0.5 Second Delay Using 16-bit Register Pair

To generate a delay of 0.5 seconds with a clock frequency of 6 MHz (which gives a cycle
time of 1/6 MHz = 166.67 ns) and an internal clock frequency of 3 MHz (which gives a cycle
time of 1/3 MHz = 333.33 ns):

1. The total number of cycles in 0.5 seconds = 0.5s / 333.33ns = 1500 cycles.
2. Load a 16-bit register pair with the value corresponding to 1500 cycles and use a
loop to decrement it until it reaches zero.
4. Logical and Circular Shift Microoperations

● Logical Shift: Moves bits to the left or right, filling the vacant bit positions with zeros.
Example: Logical left shift of 1010 results in 0100.
● Circular Shift: Moves bits around in a circular fashion. Example: Circular left shift of
1010 results in 0101.

5. Interrupt Structure of 8085

The 8085 microprocessor has a structured way of handling interrupts:

● Maskable Interrupts: Can be enabled or disabled by the programmer.


● Non-Maskable Interrupts: Cannot be disabled.
● Vectored Interrupts: The address of the interrupt service routine is predefined.
● Non-Vectored Interrupts: The address is provided by the interrupting device.

6. Interfacing 4KB EPROM to 8085

To interface a 4KB EPROM starting at address A000H:

● The address range will be from A000H to AFFFH (4KB).


● The 8085 can address up to 64KB of memory, so it can accommodate this EPROM
without issues.

7. Definitions

1. Machine Language: The lowest-level programming language consisting of binary


code that the microprocessor can directly execute.
2. Assembly Language: A low-level programming language that uses symbolic names
and is easier to read than machine language.
3. Assembler: A tool that converts assembly language code into machine code.
4. Subroutines: A set of instructions that perform a specific task and can be called from
other parts of the program.

8. 8085 Assembly Language Program to Convert Binary


to ASCII

assembly
Verify

Open In Editor

Edit

Copy code

1; Assume binary number is in A


2MVI B, 0x30 ; Load ASCII '0' into B
3ANI 0x0F ; Mask upper nibble
4ADD B ; Convert to ASCII

9. Instruction Cycle Stages

● Fetch Stage: The instruction is fetched from memory using the Program Counter.
● Decode Stage: The fetched instruction is decoded to determine the operation.
● Execution Stage: The operation is executed, which could involve reading/writing to
registers or memory.

10. Architecture of 8085 Microprocessor

The architecture includes:

● ALU (Arithmetic Logic Unit)


● Registers (Accumulator, General Purpose)
● Control Unit
● Buses (Data, Address, Control)

11. Difference Between Microprocessor and


Microcontroller

● Microprocessor: Mainly a CPU with no built-in peripherals; used in PCs.


● Microcontroller: A compact integrated circuit with a CPU, memory, and peripherals;
used in
More
Sure! Let’s continue with the remaining points in your list.
12. Interrupt Types: Vectored, Non-Vectored, Maskable,
and Non-Maskable

● Vectored Interrupts: The address of the interrupt service routine is predetermined.


Example: INTR interrupt in 8085.
● Non-Vectored Interrupts: The CPU must read the interrupting device to determine the
address of the service routine. Example: RST interrupts.
● Maskable Interrupts: Can be disabled or ignored by the CPU. Example: INTR
interrupt.
● Non-Maskable Interrupts: Cannot be disabled and are used for high-priority tasks.
Example: TRAP interrupt.

13. Explanation of Given Instructions

1. MVI (Move Immediate): Loads an immediate value into a register. Example: MVI A,
05H loads the accumulator with the value 05H.
2. CMP (Compare): Compares the accumulator with another register or memory.
Example: CMP B compares the content of A with B.
3. XRA (Exclusive OR Accumulator): Performs a bitwise XOR operation between the
accumulator and another register or memory. Example: XRA C XORs A with C.
4. SUB (Subtract): Subtracts the content of a register or memory from the accumulator.
Example: SUB D subtracts D from A.
5. STA (Store Accumulator): Stores the content of the accumulator into a specified
memory address. Example: STA 2000H stores A into memory location 2000H.

14. Addressing Modes: Direct and Indirect

● Direct Addressing Mode: The address of the operand is given explicitly in the
instruction. Example: LDA 2000H loads the accumulator with the content at memory
address 2000H.
● Indirect Addressing Mode: The address of the operand is specified indirectly through
a register pair. Example: MOV A, M where HL points to the memory location.

15. Classification of Memory in 8085

● Primary Memory:
● RAM: Read and Write memory used for temporary storage.
● ROM: Read-only memory used for permanent storage of programs and data.
● Secondary Memory: External storage devices like hard drives, USB drives, etc.
● Cache Memory: High-speed memory used to store frequently accessed data.
16. Circular Shift and Arithmetic Shift Microoperations

● Circular Shift:
● Circular Left Shift: Bits are shifted left, and the MSB is wrapped around to the
LSB position.
● Example: 1010 → 0101
● Circular Right Shift: Bits are shifted right, and the LSB is wrapped around to
the MSB position.
● Example: 1010 → 0101
● Arithmetic Shift:
● Arithmetic Left Shift: Similar to logical left shift, but it preserves the sign bit for
signed numbers.
● Example: 1101 (−3) → 1010 (−6)
● Arithmetic Right Shift: Preserves the sign bit while shifting right.
● Example: 1100 (−4) → 1110 (−2)

17. Timing Diagram of Instruction MOV B, C

The timing diagram for the MOV B, C instruction involves several clock cycles where the
control signals are activated to read the content of register C and write it to register B. The
diagram would typically show:

● T1: Fetch the opcode.


● T2: Decode the instruction.
● T3: Read from register C.
● T4: Write to register B.

18. Common Bus System Using Multiplexers

A common bus system can be designed using multiplexers to select between different data
sources (registers) to send data onto a single bus line. The bus can carry data from multiple
sources, and the multiplexer selects which source to send based on control signals.

19. Pin Diagram of 8085 and Explanation of READY and


RESET IN Pins
● READY: This pin is used to indicate that the external device is ready to send or
receive data. If not ready, the microprocessor will wait until the signal is high.
● RESET IN: This pin is used to reset the microprocessor. When activated, it resets the
program counter to 0000H and clears the registers.

20. Pin Diagram of 8085 and Explanation of 5 Pins

1. Vcc: Power supply pin (+5V).


2. GND: Ground pin.
3. ALE (Address Latch Enable): Indicates that the address bus contains a valid address
More
Certainly! Let’s continue with the remaining points in your list.

20. Pin Diagram of 8085 and Explanation of 5 Pins


(continued)

4. M1: This pin indicates that the microprocessor is in the first machine cycle of an
instruction. It is used to identify the fetch cycle.
5. INTA (Interrupt Acknowledge): This pin is used to acknowledge an interrupt request.
When an interrupt is acknowledged, the microprocessor will execute the
corresponding interrupt service routine.

21. Flag Register in Detail

The flag register in the 8085 microprocessor consists of 5 flags that indicate the status of the
accumulator after an arithmetic or logical operation. The flags are:

● Sign Flag (S): Set if the result is negative (MSB = 1).


● Zero Flag (Z): Set if the result is zero.
● Auxiliary Carry Flag (AC): Set if there is a carry from the lower nibble to the upper
nibble during addition.
● Parity Flag (P): Set if the number of 1s in the result is even.
● Carry Flag (CY): Set if there is a carry out from the most significant bit during addition
or a borrow during subtraction.

22. MAR and MAD with Memory Diagram


● MAR (Memory Address Register): This register holds the address of the memory
location that the CPU wants to access. It is used to fetch data from or write data to
the specified memory address.
● MDR (Memory Data Register): This register holds the data that is being transferred to
or from the memory.

Memory Diagram

Verify

Open In Editor

Edit

Copy code

1+-----------------+
2| Memory |
3| |
4| Address Bus |
5| |
6| Data Bus |
7+-----------------+
8 |
9 |
10 +---+---+
11 | MAR |
12 +---------+
13 |
14 |
15 +---+---+
16 | MDR |
17 +---------+

In this diagram, the MAR holds the address of the memory location to be accessed, and the
MDR holds the data being read from or written to that address.

Summary of Key Concepts

1. Programming Model: Understanding the registers and flags is crucial for effective
programming.
2. Instructions: Familiarity with instructions like MVI, CMP, and others is essential for
assembly language programming.
3. Addressing Modes: Knowing direct and indirect addressing helps in efficient memory
access.
4. Interrupts: Understanding the types of interrupts aids in designing responsive
systems.
5. Memory Architecture: Knowledge of MAR and MDR is important for understanding
how data is accessed in memory.

If you have any specific questions or need further details on any of the topics, feel free to
ask!

23. Draw and explain timing diagram for MVI B, 05H.


24. What is the instruction and how it will be fetch and executed?
25. Explain the stack and subroutine with role of PUSH and POP instructions.
26. Classify Interrupts and explain it with example.
27. Explain RIM and SIM instruction in detail
28. Draw memory interfacing of EPROM of 2Kbyte and RAM of 4Kbyte with 8085 using
the decoder.
29. Which instruction is used to control interrupt. Give its types and explain any one with
diagram.
30. What is the use of register in 8085? How register is different from memory?
31. Elaborate cache memory.
32. Describe following instruction in detail with example: I. LXI instruction II. LHLD III.
STAX IV. CMA V. RRC
33. Draw and explain de-multiplexed address data bus.
34. Write a program to divide two 8-bit data given as per memory location, Input: 7015H
– 50H 7016H – 05H Store output at 5016H memory location.
35. Define Machine cycle. List its types and draw Timing diagram for IO read Instruction.
36. Describe what is an Interrupt? Explain each priority wise Interrupt types. Also
describe EI and DI instruction?
37. Interface two memories RAM and EPROM having size of 8kbyte each. Find its
starting address and Ending address.
38. Draw and explain any three blocks of architecture of 8085.
39. Classi&ication of Microprocessor based on size, application and speed. 40.Explain
languages for communication between microprocessor to other peripheral and vice-
versa.
Here’s a detailed response to your questions from 23 to 40:

23. Timing Diagram for MVI B, 05H

The MVI B, 05H instruction is an immediate data transfer instruction that moves the value
05H into register B. The timing diagram for this instruction involves several clock cycles:

1. T1: Fetch the opcode from memory.


● The address of the instruction is placed on the address bus.
● The opcode for MVI B, 05H is fetched.
2. T2: Fetch the immediate data.
● The next byte (05H) is fetched from memory.
3. T3: Execute the instruction.
● The CPU transfers the fetched data (05H) into register B.

The timing diagram would look like:

Verify

Open In Editor

Edit

Copy code

1T1: |---|---|---|---|---|---|---|---|---|---|
2 Address Bus --> Opcode Fetch
3 Data Bus <--- Opcode (MVI B, 05H)
4
5T2: |---|---|---|---|---|---|---|---|---|---|
6 Address Bus --> Immediate Data Fetch
7 Data Bus <--- 05H
8
9T3: |---|---|---|---|---|---|---|---|---|---|

10 Execute Instruction

24. Instruction Fetch and Execution

An instruction is a binary-coded operation that the microprocessor can execute. The fetch
and execute cycle involves:

1. Fetch:
● The Program Counter (PC) points to the address of the instruction.
● The instruction is read from memory and loaded into the Instruction Register
(IR).
● The PC is incremented to point to the next instruction.
2. Execute:
● The control unit decodes the instruction.
● The necessary operations are performed, which may involve arithmetic
operations, data transfer, or control operations.

25. Stack and Subroutine with PUSH and POP

● Stack: A Last In First Out (LIFO) data structure used for storing temporary data. It
grows downwards in memory.
● Subroutine: A set of instructions that can be called from the main program. It allows
code reuse and modular programming.

PUSH: Saves the content of a register onto the stack and decrements the stack pointer (SP).
POP: Retrieves the content from the stack into a register and increments the stack pointer.

26. Classify Interrupts

Interrupts can be classified as:

1. Maskable Interrupts: Can be enabled or disabled by the programmer (e.g., INTR).


2. Non-Maskable Interrupts: Cannot be disabled (e.g., TRAP).
3. Vectored Interrupts: The address of the service routine is predetermined (e.g.,
RST7.5).
4. Non-Vectored Interrupts: The CPU must determine the address (e.g., RST).

27. RIM and SIM Instructions

● RIM (Read Interrupt Mask): Used to read the status of the interrupt system. It
retrieves the status of maskable and non-maskable interrupts.
● SIM (Set Interrupt Mask): Used to control the interrupt system. It sets the mask for
interrupts and the status of the interrupt system.

28. Memory Interfacing of EPROM and RAM with 8085

For interfacing a 2KB EPROM and a 4KB RAM, we can use a decoder to select the memory:

● EPROM: Address range 0000H to 07FFH (2KB).


● RAM: Address range 0800H to 17FFH (4KB).
Verify

Open In Editor

Edit

Copy code

1+--------+---------+---------+
2| Address| EPROM | RAM |
3+--------+---------+---------+
4| 0000H | 2KB | |
5| 0800H | | 4KB |

6+--------+---------+---------+

29. Instruction to Control Interrupt

The instruction used to control interrupts is SIM (Set Interrupt Mask) and RIM (Read
Interrupt Mask).

SIM:

● Used to enable or disable maskable interrupts.


● Example: Setting the mask for INTR and controlling the status of the interrupt
system.

30. Use of Register in 8085

Registers in the 8085 microprocessor are used for temporary storage of data and
instructions. They are faster than memory and allow for quick data manipulation. Registers
differ from memory in:

● Speed: Registers are faster to access.


● Size: Registers are smaller in size compared to memory.
● Function: Registers are used for immediate data processing, while memory is used
for larger
More
Certainly! Continuing with your questions from 31 to 40:
31. Elaborate Cache Memory

Cache memory is a small-sized type of volatile computer memory that provides high-speed
data access to the CPU and stores frequently used computer programs, applications, and
data. It acts as a buffer between the CPU and the main memory (RAM).

Key Features of Cache Memory:

● Speed: Cache memory is faster than main memory, enabling quicker data retrieval.
● Levels: Cache memory is usually divided into levels:
● L1 Cache: Located on the CPU chip, very fast but small (typically 32KB to
256KB).
● L2 Cache: Can be on the CPU or on a separate chip, larger than L1 (typically
256KB to several MB).
● L3 Cache: Shared between cores, larger but slower than L1 and L2.
● Types:
● Instruction Cache: Stores instructions for the CPU.
● Data Cache: Stores data that the CPU frequently accesses.

Working: When the CPU needs to access data, it first checks the cache. If the data is found
(cache hit), it is used directly. If not (cache miss), it fetches the data from the main memory
and stores it in the cache for future access.

32. Describe Following Instructions in Detail with


Examples

1. LXI Instruction:
● Operation: Load register pair with immediate data.
● Example: LXI H, 1234H loads the HL register pair with the address 1234H.
● Effect: H = 12H, L = 34H.
2. LHLD:
● Operation: Load H and L registers from memory.
● Example: LHLD 2000H loads the content of memory locations 2000H and
2001H into L and H respectively.
● Effect: L = [2000H], H = [2001H].
3. STAX:
● Operation: Store accumulator content into memory pointed by register pair.
● Example: STAX B stores the content of the accumulator into the memory
location pointed by the BC register pair.
● Effect: Memory[BC] = A.
4. CMA (Complement Accumulator):
● Operation: Complements the content of the accumulator.
● Example: If A = 5AH, after CMA, A = A5H (bitwise NOT).
● Effect: Flips all bits in the accumulator.
5. RRC (Rotate Accumulator Right):
● Operation: Rotates the bits of the accumulator right.
● Example: If A = 1010 1100, after RRC, A = 0101 0110.
● Effect: The LSB is moved to the MSB position.

33. Draw and Explain De-multiplexed Address Data Bus

De-multiplexing is the process of separating the address and data lines that are multiplexed
together. In the 8085 microprocessor, the address/data bus (AD0-AD7) is multiplexed,
meaning that the same lines are used for both address and data.

De-multiplexing Process:

● Use a latch (like 74LS373) to separate the address and data.


● During the first part of the cycle, the address is placed on the bus.
● During the second part, the data is placed on the bus.

Diagram:

Verify

Open In Editor

Edit

Copy code

1 +-----------------+
2 | 8085 Micro |
3 | Processor |
4 +-----------------+
5 | |
6 | |
7 +----+ +----+
8 | AD0-AD7 |
9 +----+ +----+
10 | |
11 +----+-------+----+
12 | De-multiplexer |
13 +-----------------+
14 | |

15 Address Data

The de-multiplexer separates the address and data lines, allowing the processor to
effectively communicate with memory.

34. Program to Divide Two 8-bit Data

Here is an example program in assembly language to divide two 8-bit numbers stored in
memory locations 7015H and 7016H, storing the result at 5016H.

assembly

Verify

Open In Editor

Edit

Copy code

1; Divide two 8-bit numbers stored at 7015H (numerator) and 7016H (denominator)
2; Store the quotient at 5016H
3
4ORG 7015H ; Origin address for data
5DB 50H ; Numerator
6DB 05H ; Denominator
7

8ORG 5016H ;

More
Certainly! Continuing with the program for dividing two 8-bit data and the remaining
questions:

34. Program to Divide Two 8-bit Data (continued)


assembly

Verify

Open In Editor

Edit

Copy code

1; Divide two 8-bit numbers stored at 7015H (numerator) and 7016H (denominator)
2; Store the quotient at 5016H
3
4ORG 7015H ; Origin address for data
5DB 50H ; Numerator (50H)
6DB 05H ; Denominator (05H)
7
8ORG 5016H ; Output address for quotient
9DB 00H ; Initializing output address
10
11; Start of the program
12START:
13 MVI A, M ; Load numerator (50H) into accumulator
14 INX H ; Point HL to the denominator (next memory location)
15 MOV B, M ; Move denominator (05H) into register B
16 CPI 00H ; Compare with zero to check for division by zero
17 JZ DIV_BY_ZERO ; If zero, jump to division by zero handler
18
19 ; Initialize quotient and remainder
20 MVI C, 00H ; Clear C (quotient)
21
22DIV_LOOP:
23 CMP B ; Compare A (numerator) with B (denominator)
24 JC END_DIV ; If A < B, jump to end of division
25 SUB B ; A = A - B (subtract denominator from numerator)
26 INX D ; Increment quotient (C)
27 JMP DIV_LOOP ; Repeat the loop
28
29END_DIV:
30 ; Store the quotient in memory
31 SHLD 5016H ; Store quotient at 5016H
32
33DIV_BY_ZERO:
34 ; Handle division by zero (optional)
35 MVI A, 00H ; Set accumulator to zero or some error code
36 SHLD 5016H ; Store error code at 5016H
37 HLT ; Halt the program

35. Define Machine Cycle

A machine cycle is the basic operational unit of a microprocessor. It consists of a series of


states that a microprocessor goes through to execute an instruction. The machine cycle can
be divided into several types:

1. Fetch Cycle: Retrieves the instruction from memory.


2. Execute Cycle: Carries out the instruction.
3. Memory Read Cycle: Reads data from memory.
4. Memory Write Cycle: Writes data to memory.
5. I/O Read Cycle: Reads data from an I/O device.
6. I/O Write Cycle: Writes data to an I/O device.

Timing Diagram for I/O Read Instruction:

Verify

Open In Editor

Edit

Copy code

1T1: |---|---|---|---|---|---|---|---|---|
2 Address Bus --> I/O Address Fetch
3 Data Bus <--- I/O Data
4
5T2: |---|---|---|---|---|---|---|---|---|
6 Address Bus --> I/O Read Operation

7 Data Bus <--- Data from I/O

36. Describe What is an Interrupt

An interrupt is a signal to the processor emitted by hardware or software indicating an event


that needs immediate attention. It allows the CPU to stop its current execution and execute a
predefined routine to handle the event.
Types of Interrupts (Priority-wise):

1. Non-Maskable Interrupt (NMI): Highest priority, cannot be ignored (e.g., hardware


failure).
2. Maskable Interrupts: Can be enabled or disabled (e.g., INTR).
3. Software Interrupts: Generated by programs (e.g., RST instructions).

EI and DI Instructions:

● EI (Enable Interrupts): Enables maskable interrupts.


● DI (Disable Interrupts): Disables maskable interrupts, ensuring that no interrupt is
acknowledged during critical operations.

37. Interface Two Memories RAM and EPROM

To interface two memories, RAM and EPROM, both with a size of 8KB, we can allocate
address ranges as follows:

● EPROM:
● Starting Address: 0000H
● Ending Address: 1FFFH (8KB)
● RAM:
● Starting Address: 2000H
● Ending Address: 3FFFH (8KB)

Verify

Open In Editor

Edit

Copy code

1+-------------------+
2| Address Range |
3+-------------------+
4| 0000H - 1FFFH | EPROM (8KB)
5| 2000H - 3FFFH | RAM (8KB)

6+-------------------
38. Draw and Explain Any Three Blocks of Architecture of
8085 (continued)

1. ALU (Arithmetic Logic Unit):


● Function: The ALU performs all arithmetic (addition, subtraction, etc.) and
logical (AND, OR, NOT) operations. It takes inputs from the accumulator and
other registers and outputs the result back to the accumulator or a register.
● Example: When an ADD instruction is executed, the ALU adds the contents of
the accumulator and another register and stores the result in the accumulator.
2. Registers:
● Function: The 8085 has several registers, including:
● General Purpose Registers: A, B, C, D, E, H, L (used for data
manipulation).
● Special Purpose Registers: Program Counter (PC), Stack Pointer
(SP), and Instruction Register (IR).
● Example: The accumulator (A) is used to store intermediate results during
computations.
3. Control Unit:
● Function: The Control Unit (CU) directs the operation of the processor. It
fetches instructions from memory, decodes them, and generates control
signals to execute the instructions.
● Example: When an instruction is fetched, the CU interprets the opcode and
determines which components of the CPU need to be activated.

Diagram of 8085 Architecture:

Verify

Open In Editor

Edit

Copy code

1+-------------------+
2| 8085 |
3| |
4| +-----+ +-------+ |
5| | ALU | | Control| |
6| | | | Unit | |
7| +-----+ +-------+ |
8| |
9| +-----+ +-------+ |
10| | Regs| | I/O | |
11| | | | Control | |
12| +-----+ +-------+ |
13| |

14+-------------------+

39. Classification of Microprocessors Based on Size,


Application, and Speed

1. Based on Size:
● Small Scale Integration (SSI): Contains a few transistors (e.g., early
microprocessors).
● Medium Scale Integration (MSI): Contains hundreds of transistors (e.g.,
8085).
● Large Scale Integration (LSI): Contains thousands of transistors (e.g., 8086,
8088).
● Very Large Scale Integration (VLSI): Contains millions of transistors (e.g.,
modern microprocessors).
2. Based on Application:
● General Purpose Microprocessors: Used in personal computers and
workstations (e.g., Intel Core series).
● Embedded Microprocessors: Designed for specific applications (e.g.,
microcontrollers in appliances).
● Digital Signal Processors (DSP): Optimized for processing signals (e.g., audio
and video processing).
3. Based on Speed:
● Low-Speed Microprocessors: Operate at lower clock frequencies (e.g., 4-8
MHz).
● Medium-Speed Microprocessors: Operate in the range of 10-100 MHz.
● High-Speed Microprocessors: Operate above 100 MHz (e.g., GHz range in
modern CPUs).

40. Explain Languages for Communication Between


Microprocessor and Other Peripheral Devices

Communication between a microprocessor and peripheral devices can be achieved using


various languages and protocols:
1. Assembly Language:
● Low-level programming language that is closely related to machine code.
● Provides direct control over hardware and is used for writing device drivers
and firmware.
2. High-Level Languages:
● Languages such as C, C++, and Python can be used to write programs that
communicate with hardware through libraries and APIs.
● These languages abstract the hardware details, making it easier to develop
applications.
3. Communication Protocols:
● I2C (Inter-Integrated Circuit): A multi-master, multi-slave, packet-switched,
single-ended, serial communication bus.
● SPI (Serial Peripheral Interface): A synchronous serial communication
interface used for short-distance communication.
● UART (Universal Asynchronous Receiver-Transmitter): A hardware
communication protocol used for asynchronous serial communication.
4. Device Drivers:
● Software that allows the operating system to communicate with hardware
devices.
● Written in high-level languages and provides an interface for the OS to
interact with peripherals.
5. Bus Protocols:
● Standards for communication between the microprocessor and peripherals,
such as PCI (Peripheral Component Interconnect) and USB (Universal Serial
Bus).

41. Explain the Need to De-multiplex the Bus AD7-AD0

The AD7-AD0 bus in the 8085 microprocessor is a multiplexed bus, meaning it carries both
address and data information. During the operation of the microprocessor, the bus is used to
transmit addresses during the first half of a machine cycle and data during the second half.

Need for De-multiplexing:

● Separation of Functions: De-multiplexing separates the address and data signals,


allowing the microprocessor to communicate effectively with memory and I/O
devices.
● Efficiency: It reduces the number of physical connections required between the
microprocessor and memory, making the design more compact and efficient.
● Simplified Design: Using a latch (like 74LS373) to hold the address during the data
phase makes the design simpler and more reliable.
42. Short Questions

a. Define:

● Bit: The smallest unit of data in computing, represented as either 0 or 1.


● Nibble: A group of 4 bits (e.g., 1010).
● Byte: A group of 8 bits (e.g., 01101000).
● Word: The standard data size that a processor can handle at once (e.g., 16 bits for a
16-bit processor).
● Instruction: A binary coded operation that the CPU can execute.

b. What is meant by an 8-bit processor? An 8-bit processor is a microprocessor that


processes data in 8-bit chunks. It can handle 8 bits of data at a time, with an address bus
that can typically access 2^8 (256) different memory locations directly.

c. What is Mnemonics? Mnemonics are symbolic names used in assembly language to


represent machine-level instructions. They are easier to remember and write compared to
binary opcodes (e.g., MOV, ADD, SUB).

d. Define:

● Assembly Language: A low-level programming language that uses mnemonics and is


closely related to machine language.
● Machine Language: The lowest-level programming language, consisting of binary
code that the CPU can directly execute.
● High-Level Language: A programming language that is more abstract and easier for
humans to read and write (e.g., C, Python).

e. What is an Assembler? An assembler is a tool that converts assembly language code into
machine language code. It translates mnemonics into their corresponding binary opcodes.

f. What is a Compiler? A compiler is a program that translates high-level programming


languages into machine language or intermediate code. It processes the entire source code
before execution.

g. What information is given by the address line? The address line provides the location of
data in memory that the CPU wants to access. It specifies which memory location to read
from or write to.
h. Data bus is always bidirectional: True The data bus is bidirectional because it allows data
to flow in both directions: from the CPU to memory (write) and from memory to the CPU
(read).

i. Microcontroller is faster than Microprocessor; justify the statement: Microcontrollers are


designed for specific tasks and often include integrated peripherals, which can lead to faster
execution of tasks compared to microprocessors, which may require external components
for similar tasks.

j. Why do we need a clock in a microprocessor? A clock is needed to synchronize the


operations of the microprocessor. It provides timing signals that control the sequence of
operations and ensure that data is processed in a coordinated manner.

k. What are the advantages of assembly language compared to high-level language?

● Efficiency: Assembly language allows for fine-tuned control over hardware, resulting
in faster and more efficient code.
● Direct Hardware Access: It provides direct access to hardware and memory
addresses.
● Less Overhead: Assembly language typically has less overhead compared to
high-level languages, leading to smaller executable sizes.

l. Write full name of:

● RAM: Random Access Memory


● ROM: Read-Only Memory
● ALU: Arithmetic Logic Unit
● SSI: Small Scale Integration
● MSI: Medium Scale Integration
● VLSI: Very Large Scale Integration
● ASCII: American Standard Code for Information Interchange

m. What is a bus? A bus is a communication system that transfers data between


components inside a computer or between computers. It consists of a set of physical
connections (wires) that carry signals.

42. Short Questions (continued)


n. What do you mean by peripherals? Peripherals are external devices connected to a
computer or microprocessor that provide input, output, or storage capabilities. Examples
include keyboards, mice, printers, external hard drives, and displays. They enhance the
functionality of the main system but are not part of the core architecture.

o. How much memory can be accessed by the 8085 microprocessor? The 8085
microprocessor can access up to 64 KB of memory. This is because it has a 16-bit address
bus, allowing it to address (2^{16}) or 65,536 memory locations (from 0000H to FFFFH).

p. ALU stands for: Arithmetic Logic Unit. It is the component of the CPU that performs
arithmetic and logical operations.

q. What is the purpose of the Control Unit of a Microprocessor? The Control Unit (CU)
orchestrates the operations of the microprocessor. It fetches instructions from memory,
decodes them, and generates control signals to direct the operation of the ALU, registers,
and other components. The CU ensures that all parts of the microprocessor work together to
execute instructions in the correct sequence.

r. Justify: “Microprocessor is a programmable device”: A microprocessor is considered a


programmable device because it can execute a variety of instructions based on the software
(program) loaded into its memory. Users can write and modify programs to perform different
tasks, making the microprocessor versatile and adaptable to various applications.

s. Justify: “The direction of the address bus is unidirectional”: The address bus is
unidirectional because it only carries address information from the CPU to memory or
peripheral devices. The CPU sends out addresses to specify which memory location or I/O
device it wants to access, but it does not receive address information back through the
address bus.

t. What is the difference between a 4-bit microprocessor and an 8-bit microprocessor?

● Data Handling: A 4-bit microprocessor can process 4 bits of data at a time, while an
8-bit microprocessor can handle 8 bits at once.
● Addressing Capability: The 4-bit microprocessor typically has a smaller addressable
memory space compared to an 8-bit microprocessor, which can address more
memory locations due to its wider data bus.
● Performance: Generally, an 8-bit microprocessor can perform more complex
operations and handle larger data sets than a 4-bit microprocessor.

u. What is the difference between assembly language and machine language?

● Assembly Language: A low-level programming language that uses mnemonics and


symbolic names for instructions and data, making it easier for humans to read and
write.
● Machine Language: The lowest-level programming language, consisting of binary
code that the CPU can directly execute. It is not human-readable and consists of
sequences of 0s and 1s.

v. What is the use of Registers in a microprocessor? Registers are small, fast storage
locations within the CPU used to hold data temporarily during processing. They are used for:

● Storing operands for arithmetic and logical operations.


● Holding the results of computations.
● Keeping track of the instruction being executed (Instruction Register).
● Addressing memory locations (e.g., Program Counter, Stack Pointer).

w. What stands for CISC and RISC?

● CISC: Complex Instruction Set Computer. It is a type of microprocessor architecture


that has a large set of instructions, allowing for more complex operations to be
executed with fewer lines of assembly code.
● RISC: Reduced Instruction Set Computer. It is a type of microprocessor architecture
that has a smaller set of simpler instructions, which can be executed more quickly
and efficiently.

x. What is Op-code? Op-code (Operation Code) is a part of the machine language


instruction that specifies the operation to be performed by the CPU. It tells the processor
what action to take, such as ADD, SUB, LOAD, or STORE.

y. What is Operand? An operand is a part of an instruction that specifies the data to be


operated on or the address of the data. It can be a constant value, a memory address, or a
register.

z. What is the difference between a general-purpose microprocessor and a special-purpose


microprocessor?
● General-Purpose Microprocessor: Designed to perform a wide range of tasks and
can run various types of applications (e.g., Intel Core, AMD Ryzen).
● Special-Purpose Microprocessor: Designed for specific tasks or applications, often
optimized for a particular function (e.g., microcontrollers in embedded systems, DSPs
for signal processing).

aa. Write any one three-byte instruction of 8085: An example of a three-byte instruction in
More
Certainly! Continuing with the answers from the previous section:

42. Short Questions (continued)

aa. Write any one three-byte instruction of 8085: An example of a three-byte instruction in
the 8085 microprocessor is:

● LXI H, 1234H: This instruction loads the 16-bit immediate data (1234H) into the HL
register pair. The instruction itself occupies three bytes: one byte for the opcode (LXI)
and two bytes for the immediate data (1234H).

ab. Can we interface 64 MB memory with 8085? (Y/N): N: The 8085 microprocessor cannot
interface with 64 MB of memory because it has a 16-bit address bus, allowing it to access
only 64 KB (2^16 = 65,536 bytes) of memory.

ac. ________ pin indicates that another device is requesting the use of the address and data
bus of 8085: The pin is called INTA (Interrupt Acknowledge). However, the pin that indicates
that another device is requesting the use of the bus is typically referred to as ALE (Address
Latch Enable) or HOLD in the context of bus control.

ad. What is the high-speed memory between the main memory and the CPU called?: The
high-speed memory between the main memory and the CPU is called Cache Memory. It
stores frequently accessed data and instructions to speed up processing.

ae. Flash Memory is non-volatile memory? (Y/N) Justify your answer: Y: Flash memory is
non-volatile, meaning it retains stored data even when the power is turned off. This
characteristic makes it suitable for storage devices like USB drives and SSDs.
af. In 8085, which of the following instructions is used to check if interrupts are pending or
not?: The instruction used to check if interrupts are pending in the 8085 microprocessor is
RIM (Read Interrupt Mask). It retrieves the status of the interrupt system.

ag. What stands for RISC and CISC?:

● RISC: Reduced Instruction Set Computer


● CISC: Complex Instruction Set Computer

ah. For the 8085 microprocessor, if register B has 65H and the accumulator has 97H, what
will be the content of the accumulator after executing the instruction SUB B?:

● The SUB B instruction subtracts the value in register B from the accumulator.
● Accumulator = 97H (151 in decimal)
● Register B = 65H (101 in decimal)
● Result = 97H - 65H = 32H (50 in decimal)
● Therefore, the content of the accumulator after executing SUB B will be 32H.

ai. ASCII code stands for: American Standard Code for Information Interchange. It is a
character encoding standard used for representing text in computers and other devices.

aj. Define: Opcode and Operand:

● Opcode: The part of a machine language instruction that specifies the operation to be
performed by the CPU (e.g., ADD, SUB, MOV).
● Operand: The part of a machine language instruction that specifies the data to be
operated on or the address of the data. It can be a constant value, a register, or a
memory address.

ak. Explain the usage of the STAX instruction: The STAX instruction in the 8085
microprocessor is used to store the contents of the accumulator into memory. It stores the
value in the accumulator into the memory location pointed to by the HL register pair. There
are two variations:

● STAX H: Stores the accumulator's contents at the memory address in the HL register
pair.
● STAX D: Stores the accumulator's contents at the memory address in the DE register
pair.
al. How many transistors are used in the 8085 microprocessor?: The 8085 microprocessor
uses approximately 6,000 transistors.

am. What is MIMD and SIMD?:

● MIMD: Multiple Instruction, Multiple Data. This architecture allows multiple


processors to execute different instructions on different data simultaneously, which is
often used in parallel processing systems.
● SIMD: Single Instruction, Multiple Data. This architecture allows a single instruction
to operate on multiple data points simultaneously, commonly used in vector
processors and graphics processing.

an. Flag register is of _______ bit: The flag register in the 8085 microprocessor is 8 bits. It
contains status flags that indicate the outcome of arithmetic and logical operations, including
the Zero flag, Carry flag, Sign flag, Parity flag, and Auxiliary Carry flag.

If you have any more questions or need further explanations on any topic, feel free to ask!
More
Certainly! Here are additional explanations and answers related to the topics covered in your
previous questions, as well as some new information that might be useful:

Additional Explanations and Information

43. What is the function of the Status Flags in the Flag


Register?

The status flags in the flag register of the 8085 microprocessor indicate the status of the
processor after arithmetic and logical operations. Here are the main flags and their functions:

● Zero Flag (Z): Set if the result of an operation is zero; otherwise, it is reset.
● Sign Flag (S): Set if the result of an operation is negative (i.e., the most significant bit
is 1); otherwise, it is reset.
● Carry Flag (C): Set if there is a carry out from the most significant bit during an
addition or a borrow during subtraction; otherwise, it is reset.
● Parity Flag (P): Set if the number of 1s in the result is even; otherwise, it is reset.
● Auxiliary Carry Flag (AC): Used in BCD (Binary-Coded Decimal) operations; set if
there is a carry from the lower nibble (4 bits) to the upper nibble.
44. What is the purpose of the Program Counter (PC)?

The Program Counter (PC) is a special register in the CPU that holds the address of the next
instruction to be executed. After fetching an instruction, the PC is incremented to point to the
following instruction in memory, ensuring the CPU executes instructions sequentially unless
a branch or jump instruction alters the flow.

45. What is the difference between ROM and RAM?

● ROM (Read-Only Memory):


● Non-volatile memory that retains its contents even when the power is turned
off.
● Used to store firmware or software that does not change frequently, such as
the BIOS in computers.
● Cannot be easily modified or written to during normal operation.
● RAM (Random Access Memory):
● Volatile memory that loses its contents when the power is turned off.
● Used as the main memory for temporary storage of data and instructions that
are actively being used or processed by the CPU.
● Can be read from and written to quickly.

46. What is the significance of the Stack in the 8085


microprocessor?

The stack is a special area of memory used for temporary storage of data. It operates in a
Last In, First Out (LIFO) manner. The stack is used for:

● Storing return addresses when a subroutine is called.


● Saving the state of registers during interrupts.
● Managing local variables and function parameters.

47. What is the function of the Instruction Register (IR)?

The Instruction Register (IR) holds the current instruction that is being executed. After the
instruction is fetched from memory, it is placed in the IR, where it is decoded to determine
the operation to be performed.
48. Explain the concept of Interrupts.

Interrupts are signals that temporarily halt the CPU's current operations to allow it to respond
to a specific event or condition. There are two main types of interrupts:

● Hardware Interrupts: Generated by hardware devices (e.g., keyboard, mouse) to


signal that they require attention from the CPU.
● Software Interrupts: Generated by programs (e.g., system calls) to request services
from the operating system.

49. What is DMA (Direct Memory Access)?

DMA is a feature that allows certain hardware subsystems to access main system memory
independently of the CPU. It enables high-speed data transfers between peripherals and
memory without burdening the CPU, improving overall system performance.

50. What is the difference between a microprocessor and


a microcontroller?

● Microprocessor:
● Primarily designed for general-purpose computing tasks.
● Requires external components (memory, I/O interfaces) to function.
● Typically has a higher processing power and speed.
● Microcontroller:
● Designed for specific control-oriented applications (e.g., embedded systems).
● Integrates CPU, memory (RAM/ROM), and peripheral interfaces on a single
chip.
● More energy-efficient and suitable for low-power applications.

51. What is the significance of the Clock Speed in a


microprocessor?

Clock speed, measured in Hertz (Hz), indicates how many cycles per second a
microprocessor can execute. Higher clock speeds generally mean a faster processor,
allowing it to perform more instructions in a given time frame. However, other factors, such
as architecture and efficiency, also significantly influence overall performance.
52. What is a Bus Cycle?

A bus cycle refers to the time taken to complete a data transfer operation on the bus. It
includes the time for address setup, data transfer, and acknowledgment. The bus cycle time
can affect the overall performance of the system.

53. Explain the role of the Arithmetic Logic Unit (ALU).

1. Arithmetic Operations:
○ The ALU performs basic arithmetic operations such as addition, subtraction,
multiplication, and division.
○ It also handles increment and decrement operations, which are essential for
looping and counting processes in programs.
○ Example: When executing the instruction ADD B, the ALU adds the contents
of register B to the accumulator and stores the result in the accumulator.
2. Logical Operations:
○ The ALU performs logical operations such as AND, OR, XOR, and NOT.
○ These operations are used for bit manipulation, decision-making, and control
flow in programs.
○ Example: The instruction AND B performs a bitwise AND operation between
the contents of register B and the accumulator, storing the result in the
accumulator.
3. Bit Manipulation:
○ The ALU handles bit manipulation operations such as shifting (left and right)
and rotating bits.
○ These operations are crucial for tasks like data encoding, encryption, and
optimizing arithmetic calculations.
○ Example: The instruction RLC (Rotate Left through Carry) rotates the bits in
the accumulator to the left, with the carry bit being included in the rotation.
4. Status Flags:
○ The ALU updates status flags based on the results of arithmetic and logical
operations. These flags indicate conditions such as zero, carry, sign, parity,
and auxiliary carry.
○ The status flags are used by the processor to make decisions and control the
flow of execution in programs.
○ Example: After an addition operation, the zero flag is set if the result is zero,
and the carry flag is set if there is a carry out of the most significant bit.
5. Intermediate Results:
○ The ALU temporarily holds intermediate results during complex calculations
and logical operations.
○ These intermediate results are used in subsequent operations to achieve the
final outcome.
○ Example: In a multi-step calculation, the ALU stores intermediate sums or
products before combining them to produce the final result.

The ALU is essential for the functioning of a microprocessor, as it performs the core
computations required for executing instructions and processing data. Its ability to handle
both arithmetic and logical operations makes it a versatile and powerful component in any
computing system.

PIN DIAGRAM-

You might also like