Friday 3 June 2016

8085 microprocessor


The Intel 8085  is an 8-bit microprocessor produced by Intel and introduced in 1976.This was the most advanced and developed computing chip produced at that time.

In this blog I will explain everything about microprocessor that you need to know as per your school and college needs and I will also cover up some Assembly language programs for practicals.


CONTENT'S(click on the topics below)
  • Introduction to 8085
    • What is a microprocessor?
    • What are its application in general life?
    • 8085 microprocessor and its features.
  • Concept of Address,Data and Control Bus
    • What is an Address Bus?
    • What is a Data Bus?
    • What are control bus?
  • PIN Diagram
    • 40 PIN functional layout of 8085 (diagram)
    • Address Bus(A8-A15)
    • Multiplex Address/Data Bus(AD0-AD7)
    • Control and Status signal
    • Power supply and clock frequency signals
    • Interrupts and peripheral initiated signal
    • Serial I/O signal
  • Architecture of 8085
    • Architecture diagram of 8085
    • Timing and control unit
    • Arithmetic and Logic Unit 
    • Address and Data Buffer
    • Instruction Register and Decoder
    • CPU Register Array
    • Interrupt control
    • serial control
  • 8085 programming
    • Types Addressing modes
    • Types Instruction set
    • All instructions with examples
  • Assembly language programs and common practicals


Software Interrupts in 8085

Software interrupt are a type of interrupts that can be put at any location in the program.
There are eight software interrupts i.e. RST0 to RST7.
 These instructions transfer s the program control from the main program to subroutine program and after completing the subroutine program the control returns back to the main program

Vector Address these interrupts are calculated by the below given formula:-
 Vector Address = Interrupt Number * 8
e.g;
 RST1:        vector address=1*8    =  08
 RST2:        vector address=2*8    =  16
 RST3:        vector address=3*8    =  24


InterruptVector Address
RST00000H
RST10008H
RST20010H
RST30018H
RST40020H
RST50028H
RST60030H
RST70038H

Thursday 5 May 2016

Timing and control unit

Timing and control unit : 
           It provides timing and control signal to the microprocessor to perform the various operation.It has three control signal. It controls all external and internal circuits. It operates with reference to clock signal.It synchronizes all the data transfers.
           The three control signals are:-
  1. ALE-Airthmetic Latch Enable, It provides control signal to synchronize the components of microprocessor.
  2. WR-This is used for writing operation.This is active low.
  3. RD- This is  used for reading operation. This is active low
There are three status signal used in microprocessor S0, S1 and IO/M. It changes its status according the provided input to these pins. Below is the truth table for various combinations of status signals.
      

IO/M (Active Low)S1 S2 Data bus status (Output)
000Halt
001Memory Write
010Memory read
101IO write
110IO read
011Opcode fetch
111Interrupt Acknowledge


Flag register

Flag register:-It contains 5 single bit flags and three unused bits which changes its status according to the result stored in an accumulator. It is also known as status registers.
        There are five flip-flops in the flag register are as follows:
                                1.Sign flag(S)
                                2.zero flag(z)
                                3.Auxiliary carry flag(AC)
                                4.Parity flag(P)
                                5.Carry flag(C)

Bit position of flags in flag register
1.Sign (S)- If D7 of the result is 1 then sign flag is set otherwise reset. As we know that a number on the D7 always decides the sign of the number.
if D7 is 1: the number is negative.
if D7 is 0: the number is positive.

2.Zero (Z)-If the result stored in an accumulator is zero then this flip flop is set otherwise it is reset.

3.Auxiliary carry(AC)-If any carry goes from D3 to D4 in the output then it is set otherwise it is reset.

4.Parity (P)If the no of 1's is even in the output stored in the accumulator then it is set otherwise it is reset for the odd.

5.Carry Flag (CY)- If the result stored in an accumulator generates a carry in its final output then it is set otherwise it is reset.

Register array

Register array:
     There are various types of registers in 8085.These registers are used for storage ,manipulating data and instructions.The different types of registers are:

  1. Accumulator.
  2. Temporary register.
  3. General purpose register.
  4. Program Counter.
  5. Stack Pointer.
  6. Instruction register.
  7. Flag register.




Accumulator:-It is a 8-bit register which is used to perform arithmetical and logical operation. It stores the output of any operation. It also works as registers for i/o accesses.

Temporary Register:-It is a 8-bit register which is used to hold the data on which the acumulator is computing operation. It is also called as operand register because it provides operands to ALU.

General purposes registers:-Microprocessor consists 6 general purpose registers of 8-bit each named as B,C,D,E,H and L. Generally theses registers are not used for storing the data permanently. It carries the 8-bits data. These are used only during the execution of the instructions.
      These registers can also be used to carry the 16 bits data by making the pair of 2 registers. The valid register pairs available are BC,DE HL. We can not use other pairs except BC,DE and HL . These registers are programmed by user.

Program Counter:-It is a 16 bit register used as memory pointer. It stores the memory address of the next instruction to be executed. So we can say that this register is used to sequencing the program. Generally the memory have 16 bit addresses so that it has 16 bit memory. The program counter is set to 0000H.

Stack Pointer:-It is also a 16 bit register used as memory pointer. It points to the memory location called stack. Generally stack is a reserved portion of memory where information can be stores or taken back together.

Instruction registers :-It is a 8-bit register. When op-code of an instruction is fetched from memory then it is stored in this register. This is not programmable and is not available to he programmer.

Flag register:-It contains 5 single bit flags and three unused bits which changes its status according to the result stored in an accumulator

Reset signals

RESET Signals:


  1. Reset in (PIN 36): This is active low input. This pin is used to reset the microprocessor. An active low signal applied to this pin reset the program counter inside the microprocessor. The buses are tri-stated.
  2. Reset out (PIN 3): If we want to reset the external devices connected to the microprocessor then a signal applied to this pin resets the external devices.

Hardware interrupts

       8085 has five hardware interrupt signals that can be used to interrupt program execution.these signals are
            (1)TRAP
            (2)RST 7.5
            (3)RST 6.5
            (4)RST 5.5
            (5)INTR/INTA

      


TRAP (PIN 6):
    Trap is highest priority, nonmaskable interrupt, when trap is received microprocessor starts the program execution from location (4.5*8) =0024H. this is why it is also called as vectored interrupt.

RST 7.5, 6.5, 5.5 (PIN 7,8,9):
     These are restart interrupts or vectored interrupt. these are maskable interrupt and has lower priority than TRAP, among these RST 7.5 has the highest priority and RST 5.5 having the lowest.

INTR (PIN 10):
    Interrupt request - this signal is used as a general purpose interrupt.it has lowest priority and is a maskable interrupt.

INTA (PIN 11):
     This is interrupt acknowledgement signal sent by the processor when INTR is recognized. This is active low signal.