Class 10 | Introduction to Microprocessor and its components | DDM Notes

UNIT

FIVE

INTRODUCTION TO MICROPROCESSOR AND ITS COMPONENT

Definition of Microprocessor
A microprocessor is a programmable electronic device that serves as the central processing unit (CPU) of a computer system or other digital electronic device. It integrates the functions of a computer’s central processing unit (CPU), memory management unit (MMU), and input/output (I/O) interfaces onto a single integrated circuit (IC) chip.

General terms

  • Bit: a binary digit, 0 or 1.
  • Byte: A group of 8-bits.
  • Nibble: a group of 4 bits.
  • Word: A group of bite used for special purpose, foe e.g. a 4-bit computer may have word of 4-bits.
  • Instruction: A command in binary that is recognized and executed by a computer to accomplish a task.
  • Program: A set of instruction in a sequential order to accomplish a given task.
  • Machine language: Binary medium of communication.
  • Low level language: A medium of communication that is machine dependent or specific to the computer. The machine and assembly language are low level language. Programs written in those languages are not transferable.
  • High level language: it is independent to the given computer. Programs are written in English like words that can be executed on a machine using a translator.
  • Compiler: A program that translates the high level language into low level/machine language. A compile reads source code, translates it into the machine language, called object code.
  • Interpreter: it translates English like statement of high level language into machine language of computer. It translates one line at a time from the source code to object code.
  • Process: A series of actions or steps taken to achieve an end result.
  • Processor: A machine that completes process.
  • IC: multi-function circuits are combined in a single chip.

Microprocessor

Arithmetic and logic unit (ALU), control unit (CU), and register integrate into a single chip using LSI and VLSI technique, then the resulting processor is known as microprocessor unit (MU) or simply Microprocessor.

  • It is multipurpose, programmable, close-drive, register -based electronic device that reads binary instruction from a storage device, accept binary as input and processor data according to those instruction and provides rules and output.
  • Each MP communicates and operates in the binary number 0 and 1, called bits.
  • Each MP has fixed sets of instructions in the form of binary pattern called a machine language.
  • Generally, one or more microprocessor services typically as a CPU.

Application of Microprocessor

The applications of microprocessors are not bound. They can be used virtually anywhere and in any field. However, the applications are sorted as follows:

Test Instruments: Microprocessors are widely used in devices such as single generators, oscilloscopes, counters, digital multi-meters, X-ray analyzers, blood group analyzers, baby incubator, frequency synthesizers, data acquisition systems, spectrum analyzers etc. For example, fluke 6010A synthesized signal generator uses 4004 microprocessor.

Communication:  Communication today requires tens of thousands of circuits to be managed. Data should be received, checked for errors and further analysis should also be performed. The speed at which the microprocessor can take decisions and computer errors is truly substantial.

Computer: The microprocessor is a central processing unit of the microcomputers. It can perform arithmetic and logic functions as well as control function. The control unit of microprocessor sends signals to input, output units, memory, ALU and arrange the sequence of their controlling operation.

Industries: The microprocessor is widely used in data monitoring systems, smart cameras from quality control, automatic weighing, batching systems, assembly machine control, basic characteristics of microprocessor that characterizes them are:

  • Instruction set: total no of instructions that a microprocessor can handle.
  • Bandwidth: the total no of bits processed in a single system. E.g.: 32 bit (x86), 64 bit (x64).
  • Clock speed: No of instructions that processor can execute per second. Unit of clock speed is MIPS (Millions of Instructions per second).

Basic Block Diagram of a computer

A basic block diagram of a computer typically includes several key components that illustrate the flow of data and operations within the system. Here’s a simplified version:

Input Unit: These devices allow users to input data into the computer. Examples include keyboards, mice, touch screens, and microphones.

Output Devices: These devices display or output processed data to the user. Common output devices include monitors, printers, speakers, and headphones.

Memory: This includes Random Access Memory (RAM) and other types of volatile and non-volatile memory. RAM temporarily stores data and instructions that the CPU needs to access quickly, while other types of memory like hard disk drives (HDD) and solid-state drives (SSD) provide long-term storage.

 Central Processing unit (CPU): A CPU (Central Processing Unit) outlines its internal structure and how it interacts with other components. Here’s a simplified representation:

  1. Control Unit (CU): This component manages the execution of instructions by decoding them and controlling the flow of data within the CPU and between other components.
  2. Arithmetic Logic Unit (ALU): Responsible for performing arithmetic and logical operations, such as addition, subtraction, AND, OR, etc.
  3. Registers: These are small, high-speed storage locations within the CPU used to store temporary data, intermediate results, and memory addresses. Examples include the program counter (PC), instruction register (IR), and general-purpose registers.

8085 Bus Structure and Internal Architecture

8085 microprocessor system bus structure consists of address bus, data bus and control bus. The data transfer between different units take place through this system bus. The data processed by the process is send to memory or output unit through the system bus. The 8085 microprocessor consists of different units.

Microprocessor (MP)

  1. i) ALU:
  • Performs arithmetic and logical operations on data.
  • Handles tasks like addition, subtraction, AND, OR, XOR, etc.
  1. ii) Control Unit (CU):
  • Manages the execution of instructions.
  • Controls the flow of data between different parts of the CPU and between the CPU and other parts of the system.

 iii) Register unit:

  • Consists of various registers.
  • Used for temporary storage of data during execution of program and are accessible to user with the help of instruction.

Memory

  • Storage binary information such as instruction and data, and provide this information to MP when required.
  • To execute programs, the MP reads data and instructions from memory and performs the computing operations.
  • ROM is used to storage the program and data which need not to be modified.
  • RAM is used to store the program and data that can be rewrite and modified frequency as per the requirement.

 System bus

  • The system bus is a communication path between MP and peripherals.
  • It is used to carry data, address and control singles.
  • It consists:
  • Data bus: Carries data
  • Address bus: carries address
  • Control bus: carries control signals

I/O bus

  • Input unit is used to instruction or data to the MP externally.
  • Output unit is used to carry out the information from the MP unit.

BUS Organization

  1. Address Bus
  • It is a unidirectional bus (single ended), consists of 16, 20, 24, 32, 64 parallel lines.
  • MPU sends address of memory or I/O to operate.
  • Number of bits in address bus determines maximum memory size that a MP can address.
  • of memory location =2^ no of bits of address bus
  • For 16 bit=2^16=65536
  1. Data Bus
  • It is bidirectional bus, consists of 8, 16 or 32 parallel line.
  • Used to carry data to and from the memory and peripheral devices.
  • The bits in a data bus determine the speed and maximum data flow of a processor at given constant clock speed.
  • Many devices are connected to the data bus but only one operates at a time.
  • Devices connected to the data bus through Tri-State Buffer can be disabled if not in uses.
  • g.: 8-bit data bus, 16-bit data is to carries, should be done in two cycle.
  1. Control Bus
  • Consist of 4 to 10 parallel line.
  • Use to control the access to and the use of data and address bus.
  • Transmit both command and timing singles.
  • Command specifies the operation to be done.
  • Timing indicates the validity of data and every component of the system.
  • Control bus is connected to each and component of the system.
  • g.: memory read/ write, I/O read/ write, Bus request, Bus grant etc.

Stored Program Concept and Von Neumann Machine

The stored program concept and the Von Neumann machine are fundamental principles in the architecture of modern computers.  Here’s a breakdown:

1) Stored Program Concept: The stored program concept refers to the idea that both data and instructions (programs) can be stored in the same memory and treated the same way. This concept revolutionized computing by allowing programs to be easily modified, executed, and stored alongside data. It was first proposed by John von Neumann in the 1940s.

2) Von Neumann Machine: A Von Neumann machine, also known as the Von Neumann architecture, is a theoretical design for a computing device based on the stored program concept. It consists of four main components:

  1. Central Processing Unit (CPU): Responsible for executing instructions stored in memory. It consists of an arithmetic logic unit (ALU) for performing computations and a control unit for managing instruction execution.
  2. Memory: Stores both data and instructions. In a Von Neumann architecture, the memory is typically organized as a linear sequence of addressable cells, and both data and instructions are stored in binary format.
  3. Input/ Output (I/O): Facilitates communication between the computer and the external world, allowing it to receive input from users and provide output to display results.
  4. Control Unit: Coordinates the operation of the CPU, memory, and I/O devices. It fetches instructions from memory, decodes them, and executes them sequentially.

In a Von Neumann machine, instructions and data are stored in the same memory space, and the CPU fetches instructions from memory one at a time, executing them in sequence. This architecture is the basis for most modern computers, including desktops, laptops, smart phones, and servers. It enables the versatility and programmability that are characteristic of modern computing devices.

8085microprocessor Architecture and operations

Fig: Function Block Diagram of 8085 Microprocessor

1) ALU:

  1. i) The ALU performs the actual numerical and logic operation such as ‘add’, ’subtract’, ’AND’, ’OR’ etc.
  2. ii) Uses data from memory and from Accumulator to perform arithmetic operation and always stores result of operation in Accumulation.

iii)  The ALU consists of accumulator, flag register and temporary register.

Accumulator:
Accumulator is used to perform I/O, arithmetic, and logical operations. It is connected to ALU and the internal data bus. The accumulator is the heart of the microprocessor because for all arithmetic operations Accumulator’s 8-bit pin will always there connected with ALU and in most-off times all the operations carried by different instructions will be stored in the accumulator after operation performance.

Flag register:

The Flag Register in the 8085 microprocessor is an 8-bit register that stores various status flags indicating the result of arithmetic and logic operations performed by the ALU (Arithmetic Logic Unit). Here’s a breakdown of its structure and the flags it contains:

  1. Sign (S) Flag: It reflects the sign of the result. If the most significant bit (MSB) of the result is set, the sign flag is set, indicating a negative result.
  2. Zero (Z) Flag: This flag is set if the result of an operation is zero.
  3. Auxiliary Carry (AC) Flag: It’s used for BCD (Binary Coded Decimal) arithmetic operations. If there’s a carry-out from the lower nibble (bits 0-3) to the higher nibble (bits 4-7), this flag is set.
  4. Parity (P) Flag: Indicates the parity of the result, i.e., whether the number of set bits in the result is even or odd. If even, the flag is set; otherwise, it’s cleared.
  5. Carry (CY) Flag: This flag is set if there’s a carry-out from the most significant bit (MSB) during addition, subtraction, or comparison operations. It’s also used for certain shift and rotated operations.

2) Timing and control unit

This unit produces all the timing and control signal for all the operation. This unit synchronizes all the microprocessor operations with the clock and generates the control signals necessary for communication between the microprocessor and peripherals.

3) Instruction register and decoder 

The instruction register and decoder are part of ALU. When an instruction is fetched from memory, it is loaded in the loaded in the instruction register. The decoder instruction and establishes the sequence of events to follows. The IR is not programmable and cannot be accessed through any instruction.

4) Register array 

  1. i) The six general-purpose registers are used to store 8-bit data. They can be combined as register pairs BC, DE, and HL to perform some 16-bit operations.
  2. ii) The two internal register W and Z are used to hold 8-bit data during the execution of some instructions, CALL and XCHG instructions.

iii) SP is 16-bit registers used to point the address of data stored in the stack memory. It always indicates the top of the stack.

  1. iv) PC is 16-bit register used to point the address of the next instruction to be fetched and executes stored in the memory.

5) System bus:

  1. Data bus: It carries ‘data’, in the binary form, between MP and other external units, such as memory. Typical size is 8 or 16 bits.
  2. Address bus: It carries ’address’ of operand in binary from. Typical size is 16-bit.
  3. Control bus: control bus are various lines which have specific functions from coordinating and controlling microprocessor operations. E.g.: Read/Write control line.

6) Interrupt Control:

  • Interrupt is a signal, which suspends the routine what the MP is doing, brings the control to perform the subroutine, completes it and returns to main routine.
  • May be hardware and software interrupts. Some interrupts may be ignored (maskable), some cannot (non-maskable).
  • g. INTR, TRAP, RST 7.5, RST 6.5, RST 5.5

7) Serial I/O control
The MP performs Serial data input or output (one bit at a time). In serial transmission, data bits are send over a single                                                                               line, one bit at a time. The 8085 has two signals to implement the serial transmission: SID (Serial input data) and SOD (serial output data).

 

INTEL 8085 Microprocessor

  

Fig: 8085 Microprocessor pin diagram

  • It is 8-bit microprocessor.
  • Manufactured with N-mos technology.
  • It has 16-bit address bus up to 216=65536 bytes.
  • The first 8 lines of address bus and 8 lines of data bus are multiplexed.
  • 16-bit program counter, 16 bit stack pointer.
  • 6 to 8-bit general purpose resistors in pair.
  • Requires plus 5 volt power supply and operates at 3.2 single phases stack.
  • It is enclosed with 40 pins DIF.

Address Bus:

  • 16 signals lines are used as address bus.
  • These lines are split into two segment e  A15=A0, AD7=AD0.
  • A15 to A8 are uni-directional and are used to carry higher order address of 16 bit address.
  • AD7 to AD0 are used for dual purpose.

 Data Bus

  • Pin (12-19)
  • Used as lower order address bus
  • Activate when ALE pin goes low.

Control and status signal

  • To identify nature of operation
  1. Control signal

R̅D̅= Read control signal (active low)

This signal indicates that the selected I/O or memory device is to be read.

W̅R̅= write control signal

This is a write control signal (active low). This signal indicates the selected I/O or memory device is to be written too.

  1. Status Signal: There are 3 pins i.e I/O m̅, S1, S0.
IO/m̅    S1  S0  
   0    1   1   Op code fetch
   0    1   0   Memory read
   1    1   0   I/O read
   0    0   1   Memory write
   1    0   1   I/O write
     0   0   No operation

  ALE: 1              (AD0-AD7)                 Address Bus

0                (AD0-AD7)            Data Bus

Power supply and Frequency Signal

  • +5v DC  (pin 40)
  • GND  (pin 20)
  • X1 and X2 RC            ascilator
  • Pin no 1 and 2, this is connected to crystal ascilator

CLK OUT

Pin no 37/ This signal can be used as the system clock for other device.

Externally Initiated signal

 INTR (I/P): Interrupt request. It is used as general purpose interrupt.

 I̅N̅T̅A̅ (O/P): Interrupt request Acknowledgement. It is use acknowledgement.

 RST 7.5, RST 6.5, RST 5.5

  • Restart interrupt.
  • These are vector interrupt that transfer the program control to specific memory location.
  • They have higher priority than INTR (general purpose).

REGISTERS IN INTEL 8085
i) A register (Accumulator)(8 bits)
ii)BC; DE; HL (General purpose register usually used in pair and handled by programmer)

iii) PC, SP         System register (16 bits)

  1. iv) W, Z Temporary register used by system (8 bits)
  2. v) Temporary register, IR System register (8 bits)

Externally Initiated Signal

TRAP (I / P): This is a non-mask able interrupt and has the higher priority.

 Hold (I / P): This signal indicates that a peripheral such as DMA controller is requesting T

HLDA: This signal knowledge the hold request.

Ready:  his signal is used to delay the microprocessor read or write cycle unit as low responding peripheral is ready to send or receive data.

RESET-IN: when the signal on this pin goes low the program country is set to 0 the microprocessor is reset.

RESET-OUT: This signal indicates that the microprocessor is being reset. This signal can be used to reset other devices.

Serial I/O Ports

Two pins for serial transmission.

  1. i) SOD (Serial output data) pin no.4
  2. ii) SID (Serial input data) pin no.5

IN serial transmission data bits are sent over a single line one bit at a time.

Instruction

  • Instruction is a command or information given to the MP to perform a given specific task on specified data.
  • Each instruction has two parts: one the text to be performed and the other is data to be operated.
  • The code which specifies what operation be performed is called operation code or op-code.
  • The data on which operation is performed is called operand.

E.g. ADD B

  • Here ADD is op-code and B is operand.
  • The complete instruction is combination of op-code and operand.

Addressing Modes

  • Each instruction performs an operation on the specified data. An operand must be specified for an instruction to be executed. The operand may be in the general purpose registers, accumulator or a memory location.
  • The method in which the operand is specified in an instruction is called addressing mode.
  • The various modes used in 8085 microprocessor are:

Implied or Implicit or Inherent Addressing: The instructions of this mode do not have operands. For example: EI (Enable Interrupt), STC (Set the carry flag), NOP (No operation).

Immediate Addressing: This is the simplest way of addressing. When it executes the instruction will operate on immediate hexadecimal number. The operand is present in instruction in this mode. The mode is used to define and use constants of set initial values of variables. The operand may be 8-bit data or 16-bit data. For example: MVI B, 05H

  LXI B, 7A21H      (B          7 and C          21)

ADI 72H

Register Addressing: Register direct addressing mode means that a register is the source of an operand for an instruction. It is similar to direct addressing. For example:

MOV A, B

ADD B

Direct Addressing: This addressing mode is called direct because the effective address of the operand of the operand is specific directly in the instruction. Instructions using this mode may contain 2 or 3 bytes, with first byte as the op-code followed by 1 or 2 bytes of address of data. Loading and storing in memory use 2 bytes of addressing while IN and OUT have one-byte address. For example:

LDA 2035H                   (A          M [2035H])

STA 2500H                   (M [2500H]           A)

IN 07H                          (A          port address 07H)

Register Indirect Addressing: The address of the operand is specified by register pair. This Addressing  mode basically operand with Accumulator as one of the major operand.

LDAX B   (if B= 23 and C=50 then A      M [2350H]) STAX D (if D=30 and E=10 then M[3010H]      A)

MOV A, M (M=HL; if H=68 and L=32; then A             M[6832H)

Instruction and Data Flow

An instruction is a binary pattern designed to perform a specific function. The list of entire instruction is called the instruction set. The instruction set determines what function the microprocessor can perform.

The following notations are used in the description of the instructions: R=8085 8-bit registers (B, C, D, E, H, L)

M=memory register (location) pointed by value HL Rs=register source

Rd=register destination (B, C, D, E, H, L) Rp=register pair (BC, DE, HL) ()=contents.

Data Transfer (copy) Instructions

These instructions perform the following six operations:

  • Load 8-bit number in a register in a register.
  • Load 16-bit number in a register pair.
  • Copy from register to register.
  • Copy between register and memory.
  • Copy between I/O and accumulator.
  • Copy between registers and stack memory.
MVI R, 8-bit: 2-byte instruction, loads the 8 bit of second byte into the special register.
MOV Rd, Rs: 1 bytes instruction, copies the data from the source register Rs to the destination register Rd.
LXI Rp, 16-bit Load 16 bit data in register pair immediate
OUT 8-bit Write data in the output port
IN 8-bit Read data from the input port
LDA 16-bit Copy (M) into (A), memory specified by 16 bit address
STA 16-bit Copy (A) into memory, specified by the 16 bit address
LDAX Rp Copy the content of the memory, indicated by the  register pair into the accumulator
STAX Rp Copy (A) into the memory, indicated by the register pair
MOV R, M Copy (M) into ®
MOV M, R Copy ® into (M)

 

 

Arithmetic Instruction

 The frequently used arithmetic operations are: Add, Subtract, Increment (add 1), Decrement (Subtract 1)

ADD R Add register content with the accumulator content
ADI 8-bit Add 8 bit data to (A) immediately
ADD M Add (M) to (A)
SUB R Subtract ® from (A)
SUI 8-bit Subtract 8 bit data from (A)
SUB M Subtract (M) from (A)
INR  R Increment register (R) with unity
INR M Increment the content of (M) by unity
DCR R Decrement register® with unity
DCR M Decrement memory content by unity
INX Rp Increment the register pair by unity
DCX Rp Decrement the register pair by unity

 

Logical and Bit Manipulation Instructions

These instructions include the following operations: AND, OR, X-OR, Compare, Rotate bits

ANA R: Logically AND® with (A)

ANI 8-bit: Logically AND 8 bit data with (A) immediately

ANA M: Logically AND the memory content with (A)

ORA R: Logically OR

ORI 8-bit:

ORA M:

XRA R: Logically Exclusive-OR the register® with (A)

XRI 8-bit:

XRA M:

CMP R: compare® with (A)

CPI 8-bit: Compare 8 bit data with (A)

Branching Instructions

The following instructions change the program sequence.

JMP 16-bit: Jump to 16 bit address unconditionally

JZ 16-bit: Jump to 16 bit address if zero flag is set

JNZ 16-bit: Jump to 16 bit address if zero flag is reset

JC 16-bit: Jump to 16 bit address if carry flag is set

JNC 16-bit:

CALL 16-bit:

RET

 

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *