MIcroprocessor unit 1

Fundamentals of Microprocessor

MIcroprocessor unit 1

1.1 Fundamentals of Microprocessor

  • A Microprocessor is a multipurpose programmable, clock driven, register based electronic device that reads binary instructions from a storage device called memory, accepts binary data as input, processes data according to those instructions and provide result as output.
  • Programmable- Performs different set of operation on the data depending on the sequence of instruction supplied by the programmer.
  • Clock Driven- Whole task is divided into some basic operations that is given precise system clock periods
  • Register Based- There is a storage element for data used in processing.
  • It is a program controlled semiconductor device (IC), which fetches, decodes and executes instructions.
  • The microprocessor operates in binary 0 and 1 known as bits and are represented in terms of electrical voltages in the machine where, 0 represents low voltage level and 1 represents high voltage level.
  • Each microprocessor recognizes and processes a group of bits called the Word and microprocessors are classified according to their word length such as 8 bits microprocessor with 8 bit word and 32 bit microprocessor with 32 bit word etc.
  • Advantages of Microprocessor:
  • Computational/Processing speed is high
  • Intelligence has been brought to systems
  • Automation of industrial process and office automation
  • Flexible
  • Compact in size
  • Maintenance is easier
  • Applications of Microprocessors:
  • Microcomputer: Computer having microprocessor as CPU.
    • Measurements and testing equipment: used in signal generators, counters, digital meters, x-ray analyzer, blood group analyzers, baby incubator, frequency synthesizers, data acquisition systems, spectrum analyzers etc.
    • Industry: used in data monitoring system, automatic weighting, batching systems etc.
    • Security systems: smart cameras, CCTV, smart doors etc.
    • Communication system
  • –Calculators

    –Accounting system

    –Traffic light Control

    –Data acquisition systems

    –Military applications

1.2 Microprocessor Architecture and Operation

  • Microprocessor based system includes there components microprocessor, input/output and memory.
  • These components are organized around a common communication path called a bus.
  • Microprocessor:

–It is capable of performing various computing functions and making decisions to change the sequence of program execution.

–It can be divided in to three segments.

Arithmetic/Logic unit: It performs arithmetic operations as addition and subtraction and logic operations as AND, OR & XOR.

  • Register Array: The registers are primarily used to store data temporarily during the execution of a program and are accessible to the user through instruction. The registers can be identified by letters such as B, C, D, E, H and L.
  • Control Unit: It provides the necessary timing and control signals to all the operations in the microcomputer. It controls the flow of data between the microprocessor and memory & peripherals.
  • Memory:
  • Memory stores binary information such as instructions and data
  • To execute programs, the microprocessor reads instructions and data from memory and performs the computing operations in its ALU.
  • Memory has two sections

                         –Read only Memory (ROM):

                        –Read/Write Memory (RAM):

  • Input/Output:
  • It communicates with the outside world using two devices input and output which are also Known as peripherals.
  • The input device such as keyboard, switches, and analog to digital converter transfer binary information from outside world to the microprocessor.
  • The output devices transfer data from the microprocessor to the outside world. They include the devices such as LED, CRT, digital to analog converter, printer etc.
  • System Bus:
  • It is a communication path between the microprocessor and peripherals; it is nothing but a group of wires to carry bits.

1.3 Microprocessor system with Bus Organization

  • Bus is a group of conducting wires which carries information. All the peripherals are connected to microprocessor through the help of Bus.
  • Thus , Bus is a common channel through which bits from any sources can be transferred to the destination.
  • A typical digital computer has many registers and paths must be provided to transfer instructions from one register to another. The number of wires will be excessive if separate lines are used between each register and all other registers in the system. So, a common bus organization is needed.
  • The diagram to represent bus organization of 8085 Microprocessor is given below:

  • There are three types of buses in microprocessor

–Address Bus

–Data Bus

–Control Bus

        1.Address Bus

  • It is a group of conducting wires which carries address only.(location of data in the memory)
  • The addresses bus is unidirectional because of data flow in one direction, from the microprocessor to memory or from the microprocessor to input/out devices.
  • Length of Address bus of 8085 microprocessor is 16 bit(4 hexadecimal digits).
  • Length ranging from 0000H to FFFF H. 
  • The microprocessor 8085 can transfer maximum 16-bit address which means it can address 65,536 different memory location .
  1. Data Bus
  • It is a group of conducting wires which carries Data only.
  • The data bus is bidirectional because of data flow in both directions, from the microprocessor to memory or input/output devices and from memory or input/output devices to microprocessors.
  • Length of Data bus of 8085 microprocessor is 8 bit (that is, two hexadecimal Digits), ranging from 00H to FF H.
  • The data bus is used to perform the function of transferring binary information.

     

  1. Control Bus
  • It is a group of conducting wires, which is used to generate timing and control signals to control all the associated peripherals. Microprocessor uses control bus to process data, that is what to do with selected memory location. 
  • Some control signals are:

                             –Memory read

                             –Memory write

                              –I/O read

                              –I/O Write

                              –Opcode fetch

1.4 8085 Microprocessor and its Operation

  • It is an 8-bit microprocessor designed by Intel in 1977.
  • The functional block diagram of architecture of 8085 Microprocessor is very important as it gives the complete details about a Microprocessor. 
  • The following are the functional blocks in the 8085 Microprocessor.

–Accumulator, Temporary register, Flag register

–Instruction Register, Arithmetic and Logic Unit (ALU)

–Instruction Decoder and Machine cycle encoder

–General purpose registers, Stack Pointer,  Program Counter

–Incrementer / Decrementer, Timing and Control unit

–Interrupt control,  Serial I/O control

–Address buffer and Address / Data buffer

  • The internal architecture (Functional Block Diagram of 8085 Microprocessor) is shown in figure.

1.Accumulator(A-register)

  • The accumulator is an 8-bit register that is a part of arithmetic/logic unit (ALU). 
  • This register is used to store 8-bit data(operand) and to perform arithmetic and logical operations.
  • The result of the arithmetic / logic operations is also stored in the Accumulator.

  1. Temporary(Temp) Register:
  • It is an 8-bit register, which holds the temporary data of arithmetic and logical operations.
  1. Arithmetic and Logic Unit(ALU):
  • The ALU can perform arithmetic (such as addition and subtraction) and logic operations (such as AND, OR and EX-OR) on 8-bit data. 
  • The Arithmetic and Logic Unit includes Accumulator, Temporary register, arithmetic and logic circuits and flag register.
  • It receives the data from accumulator and or TEMP register. The result is stored in the accumulator. The conditions of the result (such as carry, zero) are indicated in the flags.
  1. Flag Register:
  • It is an 8-bit register, but only 5 bits are used. Each holds either 0 or 1 depending upon the result stored in the accumulator.
  • There are five flags namely Sign (S) flag, Zero (Z) flag, Auxiliary Carry (AC) flag, Parity (P) flag and Carry (CY) flag.
  • The microprocessor uses the flags for testing the data conditions.

    a.Sign (S) flag:

    • After execution of an arithmetic and logical operation, if D7 of the result is 1, the sign flag is set. Otherwise it is reset.
    • If D7 is 1, the number will be viewed as a negative number. If D7 is 0, the number will be viewed as a positive number.

    b.Zero (Z) flag:

    • Zero flag is set(1) if the result in the accumulator is 0, otherwise it is reset(0).

    c.Auxiliary Carry (AC) flag:

    • AC flag is set if there is a carry from D3 bit position of result in the accumulator, otherwise reset.
    • It is generally used for BCD operations.

Files