Friday, December 30, 2011

Internal architecture of 8085






Arithmetic and Logic Unit (ALU):

  • It is used to perform the arithmetic operations like addition, subtraction, multiplication, division, increment and decrement and logical operations like AND, OR and EX-OR.

  • It receives the data from accumulator and registers.

  • According to the result it set or reset the flags.

Program Counter (PC):

  • This 16-bit register sequencing the execution of instructions.

  • It is a memory pointer. Memory locations have 16-bit addresses, and that is why this is a 16-bit register.

  • The function of the program counter is to point to the memory address of the next instruction to be executed.
  • When an opcode is being fetched, the program counter is incremented by one to point to the next memory location.

  • Stack Pointer (Sp):

    • The stack pointer is also a 16-bit register used as a memory pointer.

    • It points to a memory location in R/W memory, called the stack.

    • The beginning of the stack is defined by loading a 16-bit address in the stack pointer (register).

       Temporary Register: 
                     It is used to hold the data during the arithmetic and logical operations.

      Instruction Register: 
                  When an instruction is fetched from the memory, it is loaded in the instruction register.

        Instruction Decoder: 
                    It gets the instruction from the instruction register and decodes the instruction.        It identifies the instruction to be performed.

Serial I/O Control: 
                    It has two control signals named SID and SOD for serial data transmission.


Timing and Control unit:

  • It has three control signals ALE, RD (Active low) and WR (Active low) and three status signals IO/M(Active low), S0 and S1.

  • ALE is used for provide control signal to synchronize the components of microprocessor and timing for instruction to perform the operation.

  • RD (Active low) and WR (Active low) are used to indicate whether the operation is reading the data from memory or writing the data into memory respectively.

  • IO/M(Active low) is used to indicate whether the operation is belongs to the memory or peripherals.
  •                  
                   
Interrupt Control Unit:

  • It receives hardware interrupt signals and sends an acknowledgement for receiving the interrupt signal.



  • A comparison between a microprocessor, and a computer is shown below:


BlockdiagramofComputer_thumb9


OverviewdiagramofMicroprocessor_thum
  • Arithmetic/Logic Unit: This is the area of the microprocessor where various computing functions are performed on data. The ALU unit performs such arithmetic operations as addition and subtraction, and such logic operations as AND, OR, and exclusive OR.
  • Register Array: This area of the microprocessor consists of various registers identified by letters such as B, C, D, E, H, and L. These registers are primarily used to store data temporarily during the execution of a program and are accessible to the user through instructions.
  • Control Unit: The control unit 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 and peripherals.
  • Memory: Memory stores such binary information as instructions and data, and provides that information to the microprocessor whenever necessary. To execute programs, the microprocessor reads instructions and data from memory and performs the computing operations in its ALU section. Results are either transferred to the output section for display or stored in memory for later use. Read-Only memory (ROM) and Read/Write memory (R/WM), popularly known as Random- Access memory (RAM).
1. The ROM is used to store programs that do not need alterations. The monitor program of a single-board microcomputer is generally stored in the ROM. This program interprets the information entered through a keyboard and provides equivalent binary digits to the microprocessor. Programs stored in the ROM can only be read; they cannot be altered.
2. The Read/Write memory (RIWM) is also known as user memory It is used to store user programs and data. In single-board microcomputers, the monitor program monitors the Hex keys and stores those instructions and data in the R/W memory. The information stored in this memory can be easily read and altered.
  • I/O (Input/Output): It communicates with the outside world. I/O includes two types of devices: input and output; these I/O devices are also known as peripherals.
  • System Bus: The system bus is a communication path between the microprocessor and peripherals: it is nothing but a group of wires to carry bits.

    Microprocessor is a multi-use device which finds applications in almost all the fields.Here is some sample applications given in variety of fields.
    Electronics:
    • Digital clocks & Watches
    • Mobile phones
    • Measuring Meters
    Mechanical:
    • Automobiles
    • Lathes
    • All remote machines
    Electrical:
    • Motors
    • Lighting controls
    • Power stations
    Medical:
    • Patient monitoring
    • Most of the Medical equipments
    • Data loggers
    Computer:
    • All computer accessories
    • Laptops & Modems
    • Scanners & Printers
    Domestic:
    • Microwave Ovens
    • Television/CD/DVD players
    • Washing Machines

  • The microprocessor is a clock-driven semiconductor device consisting of electronic logic circuits manufactured by using either a large-scale integration (LSI) or very-large-scale integration (VLSI) technique.

  • The microprocessor is capable of performing various computing functions and making decisions to change the sequence of program execution.

  • The microprocessor is in many ways similar to the CPU, but includes the logic circuitry, including the control unit, on one chip.

  • The microprocessor can be divided into three segments for the sake clarity, arithmetic/logic unit (ALU), register array, and control unit.
    • 8085 is a 40 pin IC, DIP package. The signals from the pins can be grouped as follows

    1. Power supply and clock signals
    2. Address bus
    3. Data bus
    4. Control and status signals
    5. Interrupts and externally initiated signals
    6. Serial I/O ports
    1. Power supply and clock signals

    • Vcc        + 5 volt power supply
    • Vss        Ground
    • X1, X2 :    Crystal or R/C network or LC network connections to set the frequency of internal clock generator.
    • The frequency is internally divided by two. Since the basic operating timing frequency is 3 MHz, a 6 MHz crystal is connected externally.
    • CLK (output)-Clock Output is used as the system clock for peripheral and devices interfaced with the microprocessor.


            2. Address Bus:

      • A8 - A15   (output; 3-state)
      • It carries the most significant 8 bits of the memory address or the 8 bits of the I/O address;

      3. Multiplexed Address / Data Bus:

      • AD0 - AD7 (input/output; 3-state)
      • These multiplexed set of lines used to carry the lower order 8 bit address as well as data bus.
      • During the opcode fetch operation, in the first clock cycle, the lines deliver the lower order address A0 - A7.
      • In the subsequent IO / memory, read / write clock cycle the lines are used as data bus.
      • The CPU may read or write out data through these lines.

      4. Control and Status signals:

      • ALE  (output) - Address Latch Enable.
      • This signal helps to capture the lower order address presented on the multiplexed address / data bus.
      • RD (output 3-state, active low) - Read memory or IO device.
      • This indicates that the selected memory location or I/O device is to be read and that the data bus is ready for accepting data from the memory or I/O device.
      • WR (output 3-state, active low) - Write memory or IO device.
      • This indicates that the data on the data bus is to be written into the selected memory location or I/O device.
      • IO/M (output) - Select memory or an IO device.
      • This status signal indicates that the read / write operation relates to whether the memory or I/O device.
      • It goes high to indicate an I/O operation.
      • It goes low for memory operations.

      5. Status Signals:

      • It is used to know the type of current operation of the microprocessor.