Вы находитесь на странице: 1из 15

M.

GOPINATHAN/PHYSICS/SBWASC P a g e |1

MICROPROCESSOR AND ITS APPLICATION


PART-A
1. What is Microprocessor?
It is a program controlled semiconductor device (IC}, which fetches, decodes and executes
instructions.

2. What are the basic units of a microprocessor?


The basic units or blocks of a microprocessor are ALU, an array of registers and control unit.

3. What is Software and Hardware?


The Software is a set of instructions or commands needed for performing a specific task by a
programmable device or a computing machine.
The Hardware refers to the components or devices used to form computing machine in which the
Software can be run and tested. Without software the Hardware is an idle machine.

4. Define bit, byte and word.


A digit of the binary number or code is called bit. Also, the bit is the fundamental storage unit of
computer memory. The 8-bit (8-digit) binary number or code is called byte and 16-bit binary number or
code is called word.

5. What is a bus?
Bus is a group of conducting wire/lines that carries data, address and control signals.

6. Why data bus is bi-directional?


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 device. Hence the data bus is bi-
directional.

7. Why address bus is unidirectional?


The address is an identification number used by the microprocessor to identify or access a memory
location or I / O device. It is an output signal from the processor. Hence the address bus is unidirectional.

8. What is the function of microprocessor in a system?


The microprocessor is the master in the system, which controls all the activity of the system. It
issues address and control signals and fetches the instruction and data from memory. Then it executes the
instruction to take appropriate action.

9. Define machine cycle.


Machine cycle is defined as the time required to complete one operation of accessing memory, I/O, or
acknowledging an external request. This cycle may consist of three to six T-states.

10. Define T-State.


T-State is defined as one subdivision of the operation performed in one clock period. These
subdivisions are internal states synchronized with the system clock, and each T-State is precisely equal to
one clock period.

11. What is the need for system clock and how it is generated in 8085?
The system clock is necessary for synchronizing various internal operations or devices in the
microprocessor and to synchronize the microprocessor with other peripherals in the system.
13. List the four operations commonly performed by MPU( Micro processing Unit)?
• Memory Read : Reads data (or instructions) from memory.
• Memory Write: Writes Data (or instructions) into memory.
• I/O Read: Accepts data from input devices.
M. GOPINATHAN/PHYSICS/SBWASC P a g e |2

12. What is the need for timing diagram?


The timing diagram provides information regarding the status of various signals, when a machine
cycle is executed. The knowledge of timing diagram is essential for system designer to select matched
peripheral devices like memories, latches, ports, etc., to form a microprocessor system.

13. Define opcode and operand.


Opcode (Operation code) is the part of an instruction / directive that identifies a specific operation.
Operand is a part of an instruction / directive that represents a value on which the instruction acts.
14. 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.

15. List the 16 – bit registers of 8085 microprocessor.


Stack pointer (SP) and Program counter (PC).

16. List the allowed register pairs of 8085.


• B-C register pair
• D-E register pair
• H-L register pair

17. 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.

18. What is the function of IO/M signal in the 8085?


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.

19. List out the five categories of the 8085 instructions. Give examples of the instructions for each
group.
• Data transfer group – MOV, MVI, LXI.
• Arithmetic group – ADD, SUB, INR.
• Logical group –ANA, XRA, CMP.
• Branch group – JMP, JNZ, CALL.
• Stack I/O and Machine control group – PUSH, POP, IN, HLT.

20. Explain the difference between a JMP instruction and CALL instruction.
A JMP instruction permanently changes the program counter. A CALL instruction leaves
information on the stack so that the original program execution sequence can be resumed.

21. 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.



M. GOPINATHAN/PHYSICS/SBWASC P a g e |3

22. What is the difference between the shifts 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.

23. 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.

24. List the four instructions which control the interrupt structure of the 8085 microprocessor.

a. DI ( Disable Interrupts )
b. EI ( Enable Interrupts )
c. RIM ( Read Interrupt Masks )
d. SIM ( Set Interrupt Masks )

25. What is meant by polling?


Polling or device polling is a process which identifies the device that has interrupted the
microprocessor.

26. What is meant by interrupt?


Interrupt is an external signal that causes a microprocessor to jump to a specific subroutine.

27. Explain priority interrupts of 8085.


The 8085 microprocessor has five interrupt inputs. They are TRAP, RST 7.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 Priority

TRAP 1
RST 7.5 2
RST 6.5 3
RST 5.5 4
INTR 5

28. What is a microcomputer?


A computer that is designed using a microprocessor as its CPU is called microcomputer.

29. What are operations performed on data in 8085.


The various operations performed are
• Store 8-bit data
• Perform arithmetic and logical operations
• Test for conditions
• Sequence the execution of instructions
• Store data temporarily during execution in the defined R/W memory
locations called the stack
M. GOPINATHAN/PHYSICS/SBWASC P a g e |4

31. 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

32. Define instruction cycle, machine cycle and T-state


Instruction cycle is defined, as the time required completing the execution of an instruction.
Machine cycle is defined as the time required completing one operation of accessing memory, I/O or
acknowledging an external request. T- Cycle is defined as one subdivision of the operation performed in
one clock period

33. What is an instruction?


An instruction is a binary pattern entered through an input device to command the microprocessor
to perform that specific function

34. What is the use of ALE?


The ALE is used to latch the lower order address so that it can be available in T2 and T3 and used
for identifying the memory address. During T1 the ALE goes high, the latch is transparent ie, the output
changes according to the input data, so the output of the latch is the lower order address. When ALE goes
low the lower order address is latched until the next ALE.

35. How many machine cycles do 8085?


The 8085 have seven machine cycles. They are
• Opcode fetch
• Memory read
• Memory write
• I/O read
• I/O write
• Interrupt acknowledge
• Bus idle

36. 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

37. Mention the categories of instruction and give two examples for each Category?
The instructions of 8085 can be categorized into the following five

• Data transfer MOV Rd,Rs STA 16-bit


• Arithmetic ADD R DCR M
• Logical XRI 8-bit RAR
• Branching JNZ CALL 16-bit
• Machine control HLT NOP

38. Explain LDA, STA and DAA instructions


LDA copies the data byte into accumulator from the memory location specified by the 16-bit
address. STA copies the data byte from the accumulator in the memory location specified by 16-bit
address. DAA changes the contents of the accumulator from binary to 4-bit BCD digits.
M. GOPINATHAN/PHYSICS/SBWASC P a g e |5

39. Explain the different instruction formats with examples.


The instruction set is grouped into the following formats
• One byte instruction MOV C,A
• Two byte instruction MVI A,39H
• Three byte instruction 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. Give the register organization of 8085

W(8) Temp. Reg Z(8) Temp. Reg


B(8) Register C(8) Register
D(8) Register E(8) Register
H(8) Register L(8) Register
Stack Pointer(16)
Program Counter(16)

43. Define stack and explain stack related instructions


The stack is a group of memory locations in the R/W memory that is used for the temporary storage
of binary information during the execution of the program. The stack related instructions are PUSH &
POP.

44. Why do we use XRA A INSTRUCTION?


The XRA A instruction is used to clear the contents of the Accumulator and store the value 00H.

45. Compare CALL and PUSH instructions


CALL PUSH
When CALL is executed the
The programmer uses the instruction
microprocessor automatically stores the
PUSH to save the contents of the register
16-bit address of the instruction next to
pair on the stack
CALL on the stack
When CALL is executed the stack pointer When PUSH is executed the stack
is decremented by two pointer register is decremented by two

46. What is opcode fetch cycle?


The opcode fetch cycle is a machine cycle executed to fetch the opcode of an instruction stored in
memory. Every instruction starts with opcode fetch machine cycle.
M. GOPINATHAN/PHYSICS/SBWASC P a g e |6

47. What operation is performed during first T -state of every machine cycle in 8085?
In 8085, during the first T -state of every machine cycle the low byte address is latched into an
external latch using ALE signal.

48. Why status signals are provided in microprocessor?


The status signals can be used by the system designer to track the internal operations of the processor.
Also, it can be used for memory expansion (by providing separate memory banks for program & data
and selecting the bank using status signals).

49. How the 8085 processor differentiates a memory access (read/write) and I/O access
(read/write)?
The memory access and 1/0 access is differentiated using 10 I M signal. The 8085 processor asserts
10 I M low for memory read/write operation and 10 I M is asserted high for 1/0 read/write operation.

50. What is interrupt acknowledge cycle?


The interrupt acknowledge cycle is a machine cycle executed by 8085 processor to get the address
of the interrupt service routine in-order to service the interrupt device.

51. How the interrupts are affected by system reset?


Whenever the processor or system is rested all the interrupts except TRAP is disabled. Founder to
enable the interrupts, El instruction has to be executed after a reset.

52. What is the difference between Hardware and Software interrupt?


The Software interrupt is initiated by the main program, but the Hardware interrupt is initiated by
an external device. In 8085, the Software interrupt cannot be disabled or masked but the hardware
interrupt except TRAP can be disabled or masked.

53. What is vectored and Non- Vectored interrupt?


When an interrupt is accepted, if the processor control branches to a specific address defined by
the manufacturer then the interrupt is called vectored interrupt. 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.

54. List the Software and Hardware interrupts of 8085?


Software interrupts: RST 0, RST l, RST 2, RST 3, RST 4, RST 5, RST 6 and RST7.
Hardware interrupts: TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR.

55. What is TRAP?


The TRAP is non-maskable interrupt of8085. It is not disabled by processor reset or after
reorganization of interrupt.

56. Whether HOLD has higher priority than TRAP or not?


The interrupts including map are recognized only if the HOLD is not valid, hence TRAP has lower
priority than HOLD.

57. What is masking and why it is required?


Masking is preventing the interrupt from disturbing the current program execution. When the
processor is performing an important job (process) and if the process should not be interrupted then all the
interrupts should be masked or disabled. In processor with multiple 'interrupts, the lower priority interrupt
can be masked so as to prevent it from interrupting, the execution of interrupt service routine of higher
priority interrupt.
M. GOPINATHAN/PHYSICS/SBWASC P a g e |7

58. When the 8085 processor accept hardware interrupt?


The processor keeps on checking the interrupt pins at the second T -state of last Machine cycle of
every instruction. If the processor finds a valid interrupt signal and if the interrupt is unmasked and
enabled then the processor accepts the interrupt. The acceptance of the interrupt is acknowledged by
sending an OOA signal to the interrupted device.

59. When the 8085 processor will disable the interrupt system?
The interrupts of 8085 except TRAP are disabled after anyone of the following operations
1. Executing El instruction.
2. System or processor reset.
3. After reorganization (acceptance) of an interrupt.

60. How the vector address is generated for the INTR interrupt of 8085?
For the interrupt INTR, the interrupting device has to place either RST opcode or CALL opcode
followed by l6-bit address. I~RST opcode is placed then the corresponding vector address is generated by
the processor. In case of CALL opcode the given l6-bit address will be the vector address.

61. How clock signals are generated in 8085 and what is the frequency of the internal clock?
The 8085 has the clock generation circuit on the chip but an external quartz crystal or L C circuit
or RC circuit should be connected at the pins XI and X2. The maximum internal clock frequency of
8085A is 3.03 MHz.

62. What happens to the 8085 processor when it is rested?


When the 8085 processor is rested it executes the first instruction at the 0000H location. The 8085
resets (clears) instruction register, interrupt mask bits and other registers.

63. What are the operations performed by ALU of 8085?


The operations performed by ALU of 8085 are Addition, Subtraction, Logical AND, OR, Exclusive
OR, Compare Complement, Increment, Decrement and Left I Right shift

64. What is a flag?


Flag is a flip flop used to store the information about the status of the processor and the status of the
instruction executed most recently.

65. Where is the READY signal used?


READY is an input signal to the processor, used by the memory or I/O devices to get extra time
for data transfer or to introduce wait states in the bus cycles.

66. What are HOLD and HLDA and how it is used?


Hold and hold acknowledge signals are used for the Direct Memory Access (DMA) type of data
transfer. The DMA controller place a high on HOLD pins in order to take control of the system bus. The
HOLD request is acknowledged by the 8085 by driving all its tri-stated pins to high impedance state and
asserting HLDA signal high.

67. What is polling?


Polling is a scheme or an algorithm to identify the devices interrupting the processor. Polling is
employed when multiple devices interrupt the processor through one interrupt pin of the processor.

68. What are the different types of Polling?


The polling can be classified into software and hardware polling. In software polling the entire
polling process is governed by a prograrn. In hardware polling, the hardware takes care of checking the
status of interrupting devices and allowing one by one to the processor.
M. GOPINATHAN/PHYSICS/SBWASC P a g e |8

69. Define stack


Stack is a sequence of RAM memory locations defined by the programmer.

70. What is program counter? How is it useful in program execution?


The program counter 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 increments its content automatically.

71. How the microprocessor is synchronized with peripherals?


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

72. What is a minimum system and how it is formed in 8085?


A minimum system is one which is formed using minimum number of IC chips; the 8085 based
minimum system is formed using 8155, 8355 and 8755.

73. Give some examples of port devices used in 8085 microprocessor based system?
The various INTEL I/O port devices used in 8085 microprocessor based system are 8212, 8155, 8156,
8255, 8355 and 8755.

74. Write the uses of microprocessors in Medical Instrumentation field?


Patient Monitoring in Intensive Care Unit, Pathological Analysis and the measurement of parameters
like blood pressure and temperature.

75. Define Real Time Systems:


Real Time Systems are those in which timeliness is as important as the correctness of the outputs,
although this does not mean that they have to be “fast systems”.

76. List the limitations of 8 bit microprocessor:


 Lower Execution Speed
 It can address less memory size
 Few instructions are available

77. What do you mean ‘Data Width’?
Data Width is the width of the ALU. An 8 bit ALU can add / subtract/ multiply etc. Two 8- bit
numbers. In many cases, the external data bus is the same width as the ALU, but not always. The 8088 had
a 16 bit ALU and 8 bit bus, while the modern Pentiums fetch data 64 bits at a time for their 32 bit ALUs.
78. What are machine language and assembly language programs?
The software developed using 1’s and 0’s are called machine language programs. The software developed
using mnemonics are called assembly language programs.

79. Why data bus is bi-directional?


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 device. Hence the data bus in
microprocessor is bi-directional.

80. Why interfacing is needed for I/O devices?


Generally I/O devices are slow devices. Therefore the speed of I/O devices does not match with the
speed of microprocessor. Therefore, an interface is provided between microprocessor and I/O devices.
M. GOPINATHAN/PHYSICS/SBWASC P a g e |9

81. What is data size in a microprocessor?


The Data size is the size of the operand that can be processed by an ALU in a microprocessor.

82. Why EPROM is mapped at the beginning of memory space in 8085 system?
In 8085 microprocessor, after a reset, the program counter will have the address 0000H. The
monitor program is a permanent program for Initialization and configuring of peripherals and it is stored in
the EPROM memory. If EPROM memory is mapped at the beginning of memory space, i.e., at 0000H,
then the monitor program will be executed automatically after a reset of the processor. This is why
EPROM is mapped at the beginning of memory space.
83. What is Tri-state logic?
A device can reside in three states, which are a) On-state b) Off-state and c) High impedance-state.
The high impedance state is a state in which the output of a device is physically connected to a bus, but
electrically isolated through high impedance.
84. Define Stack and Stack Pointer.
Stack is a portion of RAM memory which is used for temporary storage of register contents using PUSH
and POP instructions. Stack Pointer (SP) is a 16-bit register that holds the memory address of the stack top.
Stack pointer gets decremented by 2, for every push operation and vice versa.

85. Define Program Counter.


Program Counter (PC) is a 16-bit register which holds the memory address of the instruction to be
executed next. Program counter gets incremented by 1 for every execution of the instruction.
86. What is the significance of IO/M pin?
IO/M pin is an I/O or Memory access indicator. It asserts to high level (1), when the processor access the
I/O device and it goes to low level (0), when the processor access the memory for read/write operations.
87. State the function of HOLD and HLDA pins in 8085.
The HOLD and HLDA pins in 8085 are used in interfacing the 8257-DMA controller IC with the
processor.
A signal is sent by 8257 to HOLD pin in µP, to request the µP to stop its current process and allocate the
buses for DMA data transfer.
µP acknowledges the request for DMA data transfer by 8257, by sending a signal in HLDA to 8257.
88. State the significance of X1 and X2 pins of 8085.
The clock signal is supplied to the microprocessor 8085 by connecting LC, RC or quartz crystal across the
pins X1 and X2. Out of the three, quartz crystal is preferred because of its high stability.
M. GOPINATHAN/PHYSICS/SBWASC P a g e | 10

89. What is an Interrupt? How the interrupts are classified?


Interrupt is a signal send by an external device to the processor (or special instruction executed in a
program), to stop the execution of the current process in the microprocessor and perform a particular task
(ie., data transfer) between the processor and the called device.
They are three methods of classifying interrupts.
Method I: The interrupts are classified into Hardware and Software interrupts
Method II: The interrupts are classified into Vectored and Non-Vectored interrupts.
Method III: The interrupts are classified as Maskable and Non-maskable interrupts

90. Distinguish I/O mapped I/O and memory mapped I/O.


Mapping is the process by which the addresses are allocated to the I/O devices.
The two kinds of mapping are a) Memory mapped I/O
b) I/O mapped I/O

Memory mapped I/O I/O mapped I/O


1. 16-bit address is allotted to each 1. 8-bit address is allotted to each I/O
I/O device. device.

2. The I/O devices are accessed by 2. The I/O devices are accessed by I/O
Memory Read or Memory Write Read or I/O write machine cycles
machine cycles.

3. All instructions related to memory 3. Only IN and OUT instructions can


can be used to access I/O devices. be used to access I/O devices.

4. Large number of I/O devices can 4. Only small number of I/O devices
be interfaced. can be interfaced.

5. Data transfer can be made between 5. Data transfer can be made only
all registers and I/O devices. between Accumulator and I/O
devices.
6. This scheme is used when memory 6. This scheme is used when complete
requirement is less. memory space is required.

91. Explain the concept of demultiplexing AD0-7 lines in 8085?


Demultiplexing is the process of separating the low byte Address (A0-7) and Data (D0-7) from the
multiplexed lines AD0-7 lines of 8085, using a latch and Address latch enable (ALE) signal.

When low byte address (A0-7) comes out of AD0-7 lines, the processor asserts HIGH in the ALE pin,
enabling the latch to separate the low byte address.
M. GOPINATHAN/PHYSICS/SBWASC P a g e | 11

92. What is memory mapping?


The memory mapping is the process of interfacing memories to microprocessor and allocating
addresses to each memory locations.
93. Explain the execution of the instruction CMA instruction in 8085.
CMA instruction is used to perform 1’s complement of the contents of Accumulator in 8085.

94. What is the function performed by SIM and RIM instruction.


SIM Instruction:
The SIM instruction is used to mask the hardware interrupts RST7.5, RST6.5 and RST5.5. It is also used to
send data through SOD line.
RIM Instruction:
The RIM instruction is used to check whether an interrupt (RST7.5, RST6.5 and RST5.5) is masked or not.
It is also used to read data from SID line.
95. What will be the outcome, in execution of instructions LXI H, 4600H and LHLD 4600H?
When LXI H,4600 is executed, the number 4600 will be loaded into HL register pair. When LHLD 4600 is
executed, the contents of memory location 4600H and 4601H will be transferred into HL register pair.

96. Explain the function of IN and OUT instructions.


Execution of an IN instruction will transfer one byte of data from an Input device to Accumulator of
microprocessor.

Execution of an OUT instruction will transfer one byte of data from Accumulator of microprocessor to an
Output device.
97. Compare System bus and CPU bus.
Bus is a set of conducting wires in a microprocessor based system, which helps to carry various
information like DATA, ADDRESS and CONTROL signal.
Bus
System Bus CPU Bus
It will not be
Internal External It will be directly
directly connected
connected to CPU
to CPU
There will be
The data and
separate data,
CPU bus System Bus address may be
address & control
multiplexed
buses

98. List the various interrupts in 8085.

HARDWARE interrupts: TRAP, RST7.5, RST6.5, RST5.5, INTR (5 Nos)


SOFTWARE interrupts: RST0, RST1, RST2, …… RST7 (8 Nos)
M. GOPINATHAN/PHYSICS/SBWASC P a g e | 12

99. What is meant by Vectored and Non-Vectored interrupt?


When an interrupt is accepted, if the processor control branches to a specific address defined by the
manufacturer then the interrupt is called vectored interrupt. All interrupts except INTR are vectored
interrupts.
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. INTR is a non-vectored
interrupt.
100. When the 8085 processor accept hardware interrupt?
The processor keeps on checking the interrupt pins at the second T -state of last Machine cycle of every
instruction.
If the processor finds a valid interrupt signal and if the interrupt is unmasked and enabled then the
processor accepts the interrupt. The acceptance of the interrupt is acknowledged by sending an INTA
signal to the interrupted device.
101. What is masking and why it is required?
Masking is preventing the interrupt from disturbing the current program execution. When the processor is
performing an important job (process) and if the process should not be interrupted then all the interrupts
should be masked or disabled.
In processor with multiple 'interrupts, the lower priority interrupt can be masked so as to prevent it from
interrupting, the execution of interrupt service routine of higher priority interrupt.
102. When the 8085 processor will disable the interrupt system?
The interrupts of 8085 except TRAP are disabled after anyone of the following operations
• Executing EI instruction.
• System or Processor reset.
• After acceptance of an interrupt.

103. Define T-State.


A T-State is the time period of the one complete cycle of the internal clock signal of the processor. The
time taken to execute a machine cycle is expressed in terms of T-states.

In 8085, if the external clock frequency applied through X1 & X2 pins are 6 MHz; then the internal clock
frequency is 3 MHz (since, Fint = Fext / 2).Therefore, one T-State equals to
T = 1/F = 1/3MHz = 0.333µs.
104. What is Processor (machine) cycle? List the various machine cycles with its T-states.
The machine cycles are the basic operations performed by the processor, while instructions are executed.
The time taken for performing each machine cycle is expressed in terms of T-states.
The various machine cycles are
1. Opcode fetch …………….. - 4 /6T
2. Memory Read ……………. - 3T
3. Memory Write ……………. - 3T
4. I/O Read ………………….. - 3T
5. I/O Write …………………. - 3T
6. Interrupt Acknowledge …… - 6 / 12 T
7. Bus Idle …………………… - 2 /3T
M. GOPINATHAN/PHYSICS/SBWASC P a g e | 13

105. What is the need for timing diagram?


The timing diagram provides information regarding the status of various signals, when a machine cycle is
executed. The knowledge of timing diagram is essential for system designer to select matched peripheral
devices like memories, latches, ports, etc., to form a microprocessor system.
106. Write an assembly language program to store the contents of the flag register in memory
location 2000H.
PUSH - Stores the contents of Accumulator & Flag register in Stack
PSW
POP D - Restores the stored contents of stack to DE register pair
MOV A, E - Move the contents of E register to Accumulator
STA - Contents of Accumulator is now stored to memory location 2000H
2000H
HLT

107. The various addressing modes in 8085 with two examples in each.
Addressing is the method of specifying the location of data in an instruction. The different
types of addressing modes in 8085 are,

I. Direct:
The data is stored in memory and 16 bit address of data in memory location is specified in the
instruction. Eg.: LDA 4500, LHLD 4200

II. Immediate:
The required data for processing is given next to the Opcode, in the instruction itself.
Eg.: MVI A, 55 CPI 64, ADI 0A

III. Register:
The data is placed in a register and the register name is given in the instruction to access
the data. Eg.: MOV A,B ADD B, SUB C

IV. Register Indirect:


The data is stored in memory and the 16-bit address of the data location in memory is placed in a
register pair. This register pair holding the 16-bit address is given in the instruction to access the
data. Eg.: LXI, H 4250
V. Implied:
The data location & the operation to be performed is given in the instruction itself. Eg.: CMA,
RAR, XCHG
108. Compare CALL and JMP instruction.
CALL Instruction:
Execution of a CALL instruction will transfer the program control from existing program to another
program. ie., Sub program specified by the 16-bit address in CALL instruction will be executed. The called
program should have RET – return instruction as its last instruction. Time taken for its execution is 9 / 18
T.
Main _________ addr16:_________
_________ _________
_________ _________
_________
CALL addr16 _________
_________ _________
M. GOPINATHAN/PHYSICS/SBWASC P a g e | 14

_________
_________ RET
JMP Instruction
Execution of a JMP instruction will transfer the program control from one location to another location
within the same program. Time taken for its execution is 7 / 10 T
Main _________
_________
_________

JMP addr16
_________
_________
addr16:_________
_________

109. Explain the Instruction format of 8085.


The 8085 have 74 basic instructions. The size of 8085
instructions can be either 1 byte, 2 bytes or 3bytes.

110. Draw and label the flags in flag register of 8085.

111. Draw the flow chart of a counter.


M. GOPINATHAN/PHYSICS/SBWASC P a g e | 15

The counter is an arrangement to keep track of a process. This consists of three operations which are a)
count initialization b) decrement count value and c) check whether count value has reached zero.
The count operation can be either Up-count or Down-count. A Counter is used for repeated processing,
time delay generation, counting of events.

112. Write an 8085 program to generate a time delay of 0.4sec; assuming crystal frequency as
5MHz.
Internal frequency = 5MHz/2 = 2.5MHZ.
Time for one T-state = 1/ 2.5MHz = 0.4msec.
Number of T-states required for delay= Delay time/Time for1Tstate=0.4sec/0.4msec
= 1 x 106 T-states
Delay program:
LXI B, Count ……………..….… 10T
Loop : MOV A, C …………….............. 4T
ORA B ……………………….… 4T
DCX B …………………….…… 6T
JNZ Loop …………………….… 10T

Total T-states needed = 10T + (Count*24T)


∴Count = (1000000 – 10) / 24 = 41666.25D ≅ 41666D = A2C2H.

113. Identify the no. of address lines needed for interfacing 8KB memory.
Where, N is number of address lines. ∴The no. of address lines for 8 KB is equal to 13.

114. Why address bus is unidirectional?


The address is an identification number used by the microprocessor to identify or access a memory location
or I / O device. It is an output signal from the processor. Hence the address bus is unidirectional.
115. How the microprocessor is synchronized with peripherals?
The timing and control unit synchronizes all the microprocessor operations with clock and generates
control signals necessary for communication between the microprocessor and peripherals.