18
8085 Microprocessor

8085 microprocessor

Embed Size (px)

DESCRIPTION

a quick and easy note on microprocessor.

Citation preview

Page 1: 8085 microprocessor

8085 Microprocessor

Page 2: 8085 microprocessor

Architectural Differences between SAP1 And SAP2

• 16 bit program Counter(16-bit address bus )• Loadable Program Counter(JMP instruction)• 2-input port , 2-output port• 64k Memory• Memory Data Register(MDR) • Temp, B, and C registers• Arithmetic and Logical Operations• Flags (Zero Flag and Sign Flag)• 8-bit Opcode,42 Instruction• Bidirectional Registers

Page 3: 8085 microprocessor

Instructions

Memory Reference Instruction :LDA , STA, MVI

Register Instruction:MOV, ADD, SUB, INR, DCR

Logical Instruction:ORA/ORI, ANA/ANI, XRA/XRI, CMA

Jump and Return :JMP/JZ/JNZ/JM and CALL/RET

Others: IN, OUT, HLT, NOP, RAR, RAR

Page 4: 8085 microprocessor

Other Topics

• Flags• T-State• Conditional Jumps

Page 5: 8085 microprocessor

Instruction affecting flag

Arithmetic and logical instructions:(ADD,SUB,INR,DCR, ANA/ANI,ORA/ORI, XRA/XRI)

Page 6: 8085 microprocessor

What you should know!!!

• Architecture • Instructions• Basic Programming

(Refer your books for several programming examples )

Page 7: 8085 microprocessor

Bonus Question

WALP to divide 41H by 10H.(Hint: Repetitive subtraction. You may need use Sign flag.)

Page 8: 8085 microprocessor

8085

8085 Architecture

Page 9: 8085 microprocessor
Page 10: 8085 microprocessor

ALU

Both Arithmetic and Logical Operation:Operation PerformedAddition, Subtraction, Increment, Decrement, Logical AND, Logical OR, Logical XOR, Compare ,Complement, Left/ Right Shift

Page 11: 8085 microprocessor

Flags

Five Flags Available in 8085Zero Flag(Z), Carry Flag(C), Auxiliary Carry(A),Sign Flag(S), Parity Flag (P)

Page 12: 8085 microprocessor

Timing and Control Signals

• The timing and control unit synchronizes all the microprocessor operations with the clock and generates the control signals necessary for communication between the microprocessor and peripherals.

Page 13: 8085 microprocessor

INSTRUCTION REGISTER & DECODER:

• When an instruction is fetched from memory it is placed in instruction register. Then it is decoded and encoded into various machine cycles.

Page 14: 8085 microprocessor

REGISTER ARRAY:

• Apart from Accumulator (A-register), there are six general-purpose programmable registers

• B, C, D, E, H and L.• They can be used as 8-bit registers or paired to

store l6-bit data. The allowed pairs are B-C,D-E and H-L.

• The temporary registers W and Z are intended for internal use of the processor and it cannot be used by the programmer.

Page 15: 8085 microprocessor

Register Array:

STACK POINTER (SP):• The stack pointer SP, holds the address of the

top of the stack.• The stack is used to save the content of

registers during the execution of a program.

Page 16: 8085 microprocessor

Register Array:

PROGRAM COUNTER (PC):The program counter (PC) keeps track of program execution. To execute a program the starting address of the program is loaded in program counter. The PC sends out an address to fetch a byte of instruction from memory and increment its content automatically. Hence, when a byte of instruction is fetched, the PC holds the address of the next byte of the instruction or next instruction.

Page 17: 8085 microprocessor

Address Bus

• Consists of 16 address lines: A0 – A15• Operates in unidirectional mode: The address

bits are always sent from the MPU to peripheral devices, not reverse.

• 16 address lines are capable of addressing a total of 216 = 65,536 (64k) memory locations.

• Address locations: 0000 (hex) – FFFF (hex)

Page 18: 8085 microprocessor

Data Bus

• Consists of 8 data lines: D0 – D7• Operates in bidirectional mode: The data bits

are sent from the MPU to peripheral devices, as well as from the peripheral devices to the microprocessor.

• Data range: 00 (hex) – FF (hex)