8085 Architecture

30
8085 8085 ARCHITECTURE ARCHITECTURE

description

architecture

Transcript of 8085 Architecture

  • 8085 ARCHITECTURE

  • Microprocessor ?A microprocessor is multi programmable clock driven register based semiconductor device that is used to fetch , process and execute a data within fraction of seconds.

  • PIN CONFIGURATION

  • THE 8085 AND ITS BUSSESThe 8085 is an 8-bit general purpose microprocessor that can address 64K Byte of memory. It has 40 pins and uses +5V for power. It can run at a maximum frequency of 3 MHz.-The pins on the chip can be grouped into 6 groups:Address Bus.Data Bus.Control and Status Signals.Power supply and frequency.Externally Initiated Signals.Serial I/O ports.

  • The Address and Data BussesThe address bus has 8 signal lines A8 A15 which are unidirectional.The other 8 address bits are multiplexed (time shared) with the 8 data bits.So, the bits AD0 AD7 are bi-directional and serve as A0 A7 and D0 D7 at the same time.During the execution of the instruction, these lines carry the address bits during the early part, then during the late parts of the execution, they carry the 8 data bits.In order to separate the address from the data, we can use a latch to save the value before the function of the bits changes.

  • Interrupt controllerSerial I/O controllerAccumulatorALU

    Flag Flip Flops

    Temp RegInstruction RegInstruction Decoder and Machine Cycle EncodingMultiplexerW tempZ tempBCD EHL Stack Pointer (16)Program counter (16) Inc/dec latch8085 ARCHITECTURETiming and controlClk genControl Status DMA Reset Address BufferData/ Address BufferClk outReady S0S1IO/MHOLDHLDAReset inReset outRDWRALEX1X2A15 A8 Address BussAD0 AD7 Address/Data BussSIDSODINTARST 5.5RST 6.5RST 7.5TRAPINTR8 bit internal Data BusReg array

  • Flag RegisterCY PAC Z S D0 D1D2D3D4D5D6D7The flags are affected by the arithmetic and logical instruction

  • AccumulatorIt is an 8 bit registerFor any arithmetic and logical instruction one of the data should be in this registerIt is used for storing the result of any arithmetic and logical manipulations.It is also called as A registerAll the data which are sent to I/O devices are sent via A register.

  • Temporary registerIt is used to hold the data during the operation of arithmetic and logical operation

  • Sign FlagIf the D7 bit of the accumulator is set then this flag is set i.e 1 meaning that the result is in negative.Ex. 7-8 = -1

  • Carry flagDuring the arithmetic operation if a carry occurs then this flag is set.Ex. F1+1F= 101 Carry

  • Zero flagDuring the arithmetic/ logical operation if the result is zero then this flag is set.Ex. FF-FF = 00

  • Parity flagAfter the of the arithmetic and logical operation if the result is even then this flag is set.Ex. 0A-02 = 08

  • Auxiliary carry flagDuring BCD arithmetic operation when a carry is generated by D3 bit and passed on to D4 bit then this flag is set.Ex. 1F+11 = 0001 1111 + 0001 0001 = 0010 0000

  • Timing and controlIt synchronizes all the operation with the clock and generates the communication between the microprocessor and peripherals

  • Instruction Register and decoderThe instruction is loaded in the instruction registerThe decoder decodes them and establishes the operation that has to be performed

  • Register arrayThe W and Z register are temporary registersUsed to hold the 8 bit data during the execution and it is used internally .It is not used by the programmer.

  • Control and status signals

    Machine CycleIO/MS1S0Opcode fetch011Memory read010Memory write001I/O read110I/O write101

  • Arithmetic and Logical unitIt is an 8 bit registerIt is used for performing addition, subtraction and logical operation.AND, OR, NOT, XOR, CMP are some of the logical operation.

  • Program CounterIt is a 16 bit registerIt is used to point out the address of the next instruction which is to be executed

  • Stack pointerIt is a 16 bit registerIt points the starting address of the stack .

  • Register ArrayB, C, D, E, H and L are general purpose register All are 8 bit registerIf the are combined as BC, DE and HL they can store 16 bit data

  • Instruction set An instruction is a binary pattern designed inside a microprocessor to perform a specific function.A group of instruction together called as instruction set.Group of instruction set is called as a program.

  • Classification of instruction setAccording to word size or byte size it is classified into 3 types.1 - byte instruction2 - byte instruction and 3 - byte instruction

  • 1 byte instructionIt includes the Opcode and the Operand in the same byte.Ex. MOV A,B Ex. CMP BEx. ANA BEx. RAL

  • Opcode an operandThe task to be performed is called OpcodeThe data to be operated is called Operand.

  • 2 byte instructionThe first byte specifies the operation cod eand the next byte specifies the operandEx. MVI A, 10Ex. SUI A, 34

  • 3 byte instructionThe first byte specifies the opcode and the next two bytes specifies the 16 bit address/data.Ex. LXI H, 4500Ex. JMP 5000