You are on page 1of 11

UNIT I 8085 CPU 1. What is Microprocessor? Give the power supply & clock frequency of 8085.

A microprocessor is a multipurpose, programmable logic device that reads binary instructions from a storage device called memory, accepts binary data as input and processes data according to those instructions and provides result as output. The power supply required to operate 8085 is +5V DC and clock frequency is 3MHz. 2. List few applications of microprocessor-based system. It is used: i. For measurements, display and control of current, voltage, temperature, pressure, etc. ii. For traffic control and industrial tool control. iii. For speed control of machines. 3. What are the functions of an accumulator? The accumulator is the register associated with the ALU operations and sometimes I/O operations. It is an integral part of ALU. It holds one of data to be processed by ALU. It also temporarily stores the result of the operation performed by the ALU. 4. List the 16 bit registers of 8085 microprocessor. Stack pointer (SP) - It acts as a memory pointer. It holds the address of the top of the stack. Program counter (PC) - It acts as a memory pointer. It holds the address of the next instruction to be fetched. 5. Give the clock out frequency and state time T of 8085 when the cystal frequencies are: (a) 5 MHz (b) 6.144 MHz(U.Q)

Operating frequency= Crystal frequency/2 For 5 MHz, operating frequency=5/2=2.5 MHz Time=0.4 micro seconds For 6.144MHz, operating frequency=6.144/2=3.072MHz. Time=0.325 micro seconds 6.. List the allowed register pairs of 8085. B-C register pair D-E register pair H-L register pair

7. Mention the purpose of SID and SOD lines SID (Serial input data line): It is an input line through which the microprocessor accepts serial data. SOD (Serial output data line): It is an output line through which the microprocessor sends output serial data. 8. Define opcode and operand. Opcode or operation code is the part of an instruction that identifies a specific operation to be performed by the processor. Operand is a part of an instruction, that represents a data on which the operation is to be performed. PUSH PSW MOV A, M. Opcode: PUSH Opcode: MOV Operand: PSW Operand: A,M

9. What is the function of IO/M signal in the 8085? (or) How the 8085 processor differentiates a memory access and I/O access? It is a status signal. It is used to differentiate between memory locations and I/O operations. When this signal is low (IO/M = 0) it denotes the memory related operations. When this signal is high (IO/M = 1) it denotes an I/O operation. 10. How many operations are there in the instruction set of 8085 microprocessor? There are 74 operations in the 8085 microprocessor.

11. List out the five categories of the 8085 instructions. Give examples of the instructions for each group. Data transfer group Arithmetic group Logical group Branch group MOV B,A, MVI B,05H, LXI H,4600H ADD B, SUB C, INR M. ANA C, XRA B, CMP M. JMP 4600H, JNZ REPEAT , CALL 16 bit address.

Stack, I/O and Machine control group PUSH, POP, IN 86H, HLT.

12. Explain the difference between a JMP instruction and CALL instruction. A JMP instruction permanently changes the contents of program counter. A CALL instruction stores the return address on the stack so that the original program execution sequence can be resumed after the execution of subroutine.

13. Explain the purpose of the I/O instructions IN and OUT. The IN instruction is used to move data from an I/O port into the accumulator. The OUT instruction is used to move data from the accumulator to an I/O port. The IN & OUT instructions are used only on microprocessor, which use a separate address space for interfacing. 14. What is the difference between the shift and rotate instructions? A rotate instruction is a closed loop instruction. That is, the data moved out at one end is put back in at the other end. The shift instruction loses the data that is moved out of the last bit locations. 15. How address and data lines are de multiplexed in 8085? (U.Q) The ALE (Address Latch Enable) signal is used to enable the latches. The latches are used to de multiplex the address and data lines. 16. What is the function performed by SIM instruction in 8085? (U.Q) This is a multipurpose instruction and used to implement the 8085 interrupts (RST 7.5, 6.5 and 5.5) and serial data output. SOD SDE XXX R7.5 MSE M7.5 M6.5 M5.5

SOD-Serial Output Data: Bit D7 of the accumulator is latched into the SOD output line and Made available to a serial peripheral if bit D6=1. SDE-Serial Data enable: If this bit=1, it enables the serial output. To implement serial output, this bit needs to be enabled. XXX: Dont care MSE-Mask Set Enable-If this bit is high, it enables the functions of bits D2, D1, D0. M7.5- D2=0,RST 7.5 is enabled D2=1, RST 7.5 is masked or disabled. M6.5- D1=0, RST 6.5 is enabled D1=0, RST 6.5 is masked or diabled. M5.5- D0=0, RST 5.5 is enabled D0=1, RST 5.5 is masked or diabled. 17. Write an 8085 assembly language program to multiply two 8-bit numbers. (U.Q) MVI C, 00H LDA 4500H MOV B,A

LDA 4501H MOV C,A MVI A,00H repaeat ADD B JNC go INR D go DCR C JNZ repeat STA 4503H MOV A,D STA 4504H HLT 18. What are the functions of the RST 6.5 and ALE signals of 8085? (U.Q) RST 6.5: This is restart/vectored interrupt, that transfer the program control to specific memory locations. They have higher priorities than the INTR request. ALE-Address Latch Enable: This is a positive going pulse generated every time the 8085 begins an operation. This signal is used to latch the low order address from the multiplexed bus and generate a separate set of 8 address lines A7-A0. 19. Name the various flag bits available in an 8085 microprocessor. (U.Q) The flags are used to reflect the data conditions in the accumulator. The 8085 flags are SSign flag, Z-Zero flag, AC-Auxiliary carry flag, P-Parity flag, CY Carry flag D7 S D6 Z D5 D4 D3 AC D2 D1 P D0 CY

20. Give the significance of SIM and RIM instructions available in 8085.(U.Q) SIM: Set interrupt Mask This is a multipurpose instruction and used to implement the 8085 interrupts (RST 7.5, 6.5 and 5.5) and serial data output. SOD SDE XXX R7.5 MSE M7.5 M6.5 M5.5

RIM: Read Interrupt Mask This is a multipurpose instruction used to read the status of interrupts 7.5, 6.5, 5.5 and to read serial data input bit. The instruction loads eight bits in the accumulator with the following interpretations. SID I7 I6 I5 IE 7.5 6.5 5.5

21. Give any two single byte instructions that clear the accumulator register of 8085. (U.Q) XRA A

22. List the machine cycles involved in the execution of the following 8085 instructions: PUSH PSW; MOV A, M. (U.Q) PUSH PSW: Machine cycles: 2 Machine cycle I : Machine cycle II: MOV A,M Machine cycles: 2 Machine cycle I : Machine cycle II: Opcode Fetch Memory read Opcode Fetch Memory write

23. Control signals used for DMA operation are ____________ HOLD & HLDA. 24. What is meant by Wait State? This state is used by slow peripheral devices. The peripheral devices can transfer the data to or from the microprocessor by using READY input line. The microprocessor remains in wait state as long as READY line is low. During the wait state, the contents of the address, address/data and control buses are held constant. 25. List the four instructions which control the interrupt structure of the 8085 microprocessor. DI ( Disable Interrupts ) EI ( Enable Interrupts )

RIM ( Read Interrupt Masks ) SIM ( Set Interrupt Masks ) 26. What is meant by polling? Polling or device polling is a process which identifies the device that has interrupted the microprocessor. 27. What is meant by interrupt? Interrupt is an external signal that causes a microprocessor to jump to a specific subroutine. 28. List the interrupt signals present in 8085 processor in the priority order.(U.Q) The 8085 microprocessor has five interrupt inputs. They are TRAP, RST7.5, RST 6.5, RST 5.5, and INTR. These interrupts have a fixed priority of interrupt service. If two or more interrupts go high at the same time, the 8085 will service them on priority basis. The TRAP has the highest priority followed by RST 7.5, RST 6.5, RST 5.5. The priority of interrupts in 8085 is shown in the table. Interrupts TRAP RST 7.5 RST 6.5 RST 5.5 INTR Priority 1 2 3 4 5

29. Give the sequence of operation that takes place during the execution of call instruction. (U.Q)

When CALL is executed, the stack pointer is decremented by two. The microprocessor automatically stores the 16 bit address of the instruction, next to the CALL (Return address) on stack.

The program sequence is transferred to the address specified by the operand.

30. State the number of machine cycles and T states requires to complete the execution of the 8085 instruction MOV M, A (U.Q) Machine Cycles: 2 I Machine Cycle : Opcode Fetch(4 T) II Machine Cycle: Memory write(3 T) T states :7

31. Let PC=8500H and SP=E000H when a current instruction is being executed by 8085. What will be new value of these registers, when a device interrupts the processor on RST 5.5? (U.Q) RST 5.5 is a restart or vectored interrupt. The starting address of ISR is predefined memory address. i.e, 002CH. The contents of a PC is stored on stack by decrementing SP by 2, before the control will be transferred to ISR. Therefore the new values of PC=002CH & SP=. DFFEH

32. How the signals are classified in 8085? All the signals of 8085 can be classified into 6 groups. Address bus Data bus Control and status signals Power supply and frequency signals Externally initiated signals Serial I/O ports

33. Steps involved to fetch a byte in 8085 i. The PC places the 16-bit memory address on the address bus ii. The control unit sends the control signal RD to enable the memory chip iii. The byte from the memory location is placed on the data bus iv. The byte is placed in the instruction decoder of the microprocessor and the task is carried out according to the instruction

34. Define instruction cycle, machine cycle and T-state (U.Q) Instruction cycle is defined, as the time required to complete the execution of an instruction. Machine cycle is defined as the time required to complet one operation i.e, accessing memory, I/O or acknowledging an external request. T-cycle is defined as one subdivision of the operation performed in one clock period. 35. What is an instruction? An instruction is a binary pattern entered through an input device to command the microprocessor to perform that specific function

36. How many machine cycles does 8085 have, mention them The 8085 has seven machine cycles. They are Opcode fetch Memory read Memory write I/O read I/O write Interrupt acknowledge Bus idle

37. Explain the signals HOLD, READY and SID HOLD indicates that a peripheral such as DMA controller is requesting the use of address bus, data bus and control bus. READY is used to delay the microprocessor read or write cycles until a slow responding peripheral is ready to send or accept data. SID is used to accept serial data bit by bit

38. Explain LDA, STA and DAA instructions LDA Load accumulator directly. This instruction copies the data byte into accumulator from the memory location specified by the 16-bit address. STA Store accumulator directly. This instruction stores the accumulator contents in the memory location specified by 16-bit address. DAA-Decimal Adjust Accumulator. This instruction accumulator from binary to 4-bit BCD digits. changes the contents of the

39. Explain the different instruction formats with examples The instruction set is grouped into the following formats One byte instruction Two byte instruction Three byte instruction MOV C,A MVI A,39H JMP 2345H

40. What is the use of addressing modes, mention the different types The various formats of specifying the operands are called addressing modes, It is used to access the operands or data. The different types are as follows Immediate addressing Register addressing Direct addressing Indirect addressing Implicit addressing 41. What is the use of bi-directional buffers? It is used to increase the driving capacity of the data bus. The data bus of a microcomputer system is bi-directional, so it requires a buffer that allows the data to flow in both directions. 42. Define stack and explain stack related instructions Stack is a set of memory locations in the R/W memory. Stack is used to store the datas temporarily, during program execution. The stack related instructions are PUSH & POP. PUSH instruction is used to store the datas. POP instruction is used to retrieve the datas. 43. Differentiate stack and stack pointer. Stack is a set of memory locations in the R/W memory. Stack is used to store the datas temporarily, during program execution. Stack pointer is a 16 bit register available in 8085 processor, which holds the address of the top of the stack. 44. Compare CALL/RET and PUSH /POP instructions CA LL and RE T 1. When CALL is executed, the microprocessor The programmer uses the instruction PUSH to PUSH and POP

automatically stores the 16 bit address of the save the contents of a register pair on the instruction next to CALL on the stack. 2. stack.

The instruction RET transfers the contents of the top The instruction POP transfers the contents of two locations of the stack to the program counter. top two locations of the stack to the specified

register pair. 3. In addition to the unconditional CALL and RET There are no conditional PUSH and POP instructions, there are eight conditional CALL and RET instructions instructions.

45. What is program counter? How it is useful in program execution? (U.Q) Program counter is a 16 bit register, which holds the address of the next instruction to be fetched. The program counter keeps track of program execution. To execute a program the starting address of the program is loaded in program counter. The program counter sends out an address to fetch a byte of instruction from memory and increments its content automatically. 46. What is vectored and non-vectored interrupt? When an interrupt is accepted, if the control will be transferred to a specific predefined address, then the interrupt is called vectored interrupt. Eg; NMI, RST 7.5, RST 6.5, RST 5.5 In non-vectored interrupt, there is no specific address for storing the interrupt service routine. Hence the interrupted device should give the address of the interrupt service routine. Eg: INTR 47. State the direction of address bus and justify. The address bus is unidirectional. The address is an identification number used by the microprocessor to identify or access a memory location or input/output device. It is an output signal from the processor. So it is unidirectional. 48. Why data bus is bidirectional? The microprocessor has to fetch/read the data from memory or input device for processing and after processing it has to store/write the data to memory or output devices. Hence the data bus is bidirectional. 49. Explain the operation of DAA.

DAA-Decimal Adjust accumulator. This instruction is used to convert the binary contents of accumulator to its equivalent BCD value.

This instruction will be executed after ADD or SUB instructions.

If the lower order nibble (D3-D0) of the accumulator contents are greater than 9, this instruction adds 06 to lower order nibble to get the equivalent BCD digit.

If the higher order nibble (D7-D3) of the accumulator contents are greater than 9, this instruction adds 60 to lower order nibble to get the equivalent BCD digit.