Microprocessor 8085 - Prof. Nilesh Bahadure

BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
SHORT ANSWER TYPE QUESTIONS
Department: E & TC
Subject:
Microprocessor & Interfaces.
Semester:
Session:
2010-2011
5th
Marks: 2 each
1. List the components of a computer.
2. Explain the function of each component of a computer.
3. What is a Microprocessor? What is the difference between a Microprocessor & CPU?
4. Define bit, byte, word, double word, quad word and instruction
5. What determines that Microprocessor is an 8, 16 or 32 bit?
6. Explain the difference between the machine language and the assembly language of
the 8085 microprocessor.
7.
What is an assembler?
8. What are low and high level languages?
9. What are the advantages of an assembly language in comparison with high level languages?
10. List the four operations commonly performed by the MPU.
11. Specify the four control signals commonly used by the 8085 MPU.
12. Specify the function of the address bus and the direction of the information flow on the address
bus.
13. Why is the data bus bidirectional?
14. What is a bus?
15. How many memory locations can be addressed by a microprocessor with 14 address lines?
16. How many address lines are necessary to address two megabytes (2048K) of memory?
17. Why is the data bus bidirectional?
18. Specify the control signal and the direction of the data flow on the data bus in a memory-write
operation.
19. What is the function of the accumulator?
20. What is a flag?
23. Specify the number of registers and memory cells in a 128 x 4 memory chip.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
Page
22. What is the function of the WR signal on the memory chip?
1
21. Why are the program counter and the stack pointer 16-bit registers?
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
24. What is the memory word size required in an 8085 system?
25. While executing a program, when the 8085 MPU completes the fetching of the machine code
located at the memory address 2057H, what is the content of the program counter?
26. What is the role of clock in Microprocessor?
27. Which pins of 8085 carry only data?
28. Which pins of 8085 are bidirectional?
29. Differences between the 8155/8156 and 8355/8755 peripherals.
2 to 4 Marks
30. What is the difference between INR & INX instructions?
31. List all the interrupt signals of 8085 microprocessor.
32. Write short note on evolution of microprocessors.
33. Explain the functions of the ALE and IO/M signals of the 8085 microprocessor.
34. List the sequence of events that occurs when the 8085 MPU reads from memory.
35. If the 8085 adds 87H and 79H, specify the contents of the accumulator and the status of the S, Z,
and CY flags.
36. If the clock frequency is 5 MHz, how much time is required to execute an instruction of 18 Tstates?
37. Discuss the programming model of 8085 µP with the help of suitable diagram.
38. Draw and explain the timing diagram for opcode fetch operation
39. Discuss various types of addressing modes of 8085.
40. Explain why the number of output ports in the peripheral-mapped I/O is restricted to 256 ports.
41. In the peripheral-mapped I/O, can an input port and an output port have the same port
address? Explain.
42. What are the control signals necessary in the memory-mapped I/O?
43. List the four categories of 8085 instructions that manipulate data.
44. Define opcode and operand, and specify the opcode and the operand in the instruction
MOV H, L.
45. Write logical steps to add the following two Hex numbers. Both the numbers should be saved
for future use. Save the sum in the accumulator. Numbers: A2H and 18H.
48. What is the need for interfacing?
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
Page
47. How many machine cycles are needed to execute STA 1000h and MVI M, 30h
2
46. What is the need for ALE signal in microprocessor 8085?
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
49. Compare memory mapped I/O and Peripheral mapped I/O.
50. Differentiate between CALL/RET and PUSH/POP
51. Differentiate between SRAM and DRAM.
52. Differentiate between full decoding and absolute decoding technique.
53. What is memory, Classify the read/write and read only memory
54. State the disadvantages of memory mapped I/O scheme.
55. Differentiate between software and hardware interrupt?
56. What is interrupt? Name the vectored and non vectored interrupts of 8085?
57. What do you mean by timing diagram?
58. Define instruction cycle and machine cycle?
59. Define T – state and in which T cycle the ALE signal is activated?
60. What do you mean by masking the interrupt? How it is activated in 8085 system?
61. Show the different instruction formats used in 8085.
62. What is the type of stack used in 8085?
63. What are the different addressing modes of 8085?
64. Define addressing modes. How many addressing modes are available in 8085?
65. The last executable instruction in a procedure must be ………….. .
66. Explain the following instruction:
i.
LHLD 8020
ii. XTHL
67. What is the subroutine? How it is useful?
68. Explain the need of software timers.
69. If the CALL and RET instructions are not provided in the 8085, could it be possible to write
subroutines for this microprocessor? If so how will you call and return from the subroutine?
70. What is the significance of ‘XCHG’ and ‘SPHL’ instructions?
71. Write an initialization program to mask RST 6.5 and disable RST 5.5 and RST 7.5
72. Write an initialization program to disable RST 7.5 and enable RST 5.5 and RST 7.5
73. After the execution of RIM instruction, the contents of the accumulator is found to be 4Ch. Put
Page
3
your comments on the result.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
LONG ANSWER TYPE QUESTIONS
Architecture and operation.
1. Give a general block diagram of a microprocessor based system. Explain briefly the various blocks of
the system. Give some examples of the types of devices used for each block.
2. What is a microprocessor? Sketch and explain the various pins of 8085.
3. Sketch and explain the signal diagram of 8085.
4. Explain the operation of 8085 signals: READY, S1 & S0, HOLD & HLDA and ALE.
5. Explain the architecture of 8085 with the help of its internal block schematic.
6. Write the flag register and explain each of the flags with an example.
7. Mention the list of registers of 8085 that are accessible to the programmer. Explain what each of
these registers is generally used for.
8. What should be the starting address of ROM for an 8085 microcomputer? Substantiate your answer.
9. Explain the purpose of the following signals of 8085: AD0-AD7, /RESET IN, RESET OUT, and RST 7.5.
10. Explain with schematic diagram how separate address, data signals can be generated from 8085
common address-data lines.
11. Explain the schematic which decodes IO//M, /RD, /WR into two active low signals /MERD, /MEWR,
/IORD and /IOWR.
12. List the status signals in 8085. Explain their functions.
13. List the control signals in 8085. Explain their functions.
14. Explain, how the microprocessor works?
15. Explain the operations of microprocessor.
16. What are RAM’s and ROM’s? Why should both of these be used in an 8085 system?
17. Explain the functions of following 8085 registers in Intel 8085: HL, STACK POINTER, and FLAG
REGISTER.
18. (a)
Specify the contents of the registers and the flag status as the following instructions are
executed.
i. MVI A, 00H
ii. MVI B, F8H
iii. MOV C, A
v. HLT
(b)
Write instructions to load the hexadecimal number 65H in register C and 92H in accumulator
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
Page
4
iv. MOV D, B
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
A, Display the number 65H at PORT0 and 92H at PORT1.
19. Draw and explain the block diagram of a microprocessor 8085.
20. Why the lower order address bus is multiplexed with data bus? How they will be de-multiplexed?
21. Differentiate between maskable and non-maskable interrupts.
22. Write an 8085 assembly language program using minimum number of instructions to add the 16 bit
no. in BC, DE & HL. Store the 16 bit result in DE pair.
23. Mention the features of 8085.
24. Describe the functions of the following registers of 8085: Instruction Register, PC, SP, Incrementer /
Decrementer Address latch.
25. How many temporary registers are there in8085? Mention their utilizations.
26. Discuss the scheme of multiplexing Address/Data bus in 8085.
27. Explain the structure of flag register of 8085.
28. With a neat diagram discuss the architecture of 8085.
29. Classify the registers of 8085 and mention their functions in brief.
30. Why Accumulator is said to be a special register?
31. What are program visible and program invisible registers?
32. Why it is said that HL pair is a special pair?
33. Write a brief note on ‘virtual register’.
34. Classify various pins of 8085.
35. Mention the functions of the following pins of 8085: ALE, CLK OUT, RESET OUT, RESET IN
36. Mention the functions of the clock related pins of 8085.
37. Briefly discuss the how clock signal is generated in 8085.
38. Mention the pins which carry both address as well as data. How they are demultiplexed?
39. Why the address bus is unidirectional whereas data bus is bidirectional?
40. How can you generate IOR, IOW, MEMR and MEMW signal?
41. (a)
Explain in detail the following instructions:(i) ADC (ii) LHLD (iii) RLC (iv) DI
(b)
Define & explain the term addressing modes.
Page
5
Instructions and Programming of 8085.
1. Sketch the programming model and explain in detail.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
2. What are the various addressing modes available in 8085? Explain with examples.
3. Explain the instruction format of 8085 microprocessor with an example.
4. How do you classify the instructions of 8085, based on a) Number of bytes b) Addressing modes?
Explain with examples.
5. Give two examples for each of the following types of instructions and indicate what each of these
instructions do:
a. Instructions with implied addressing.
b. ALU type of instructions.
c. Instructions addressing memory indirectly through any register pair.
d. Conditional branch instructions.
e. Interrupt related instructions.
6. Explain fully the action of the following 8085 instructions: ADC M, STAX D, RLC, LHLD 9898, and
TRAP.
7. Explain the following instructions and indicate the flags affected: DAA, DAD D, XCHG, HALT & MOV
M, A.
8. Define Instruction cycle, Machine cycle and T-States with examples.
9. With suitable examples explain the addressing modes supported by 8085.
10. Classify the instructions of 8085 based on their operation.
11. Mention different ways to clear the accumulator and make a comparison between them.
12. Explain the meaning of the following instructions of 8085: LHLD, SHLD, XTHL, XCHG, SPHL, PCHL,
CMA, and DAD.
13. Differentiate between: CMP & SUB, RAL & RLC, RAR & RRC, JMP & CALL, PUSH & POP, XTHL & SPHL.
14. Explain all stack related instructions.
15. Explain all instructions related to HL pair.
16. Explain all sorts of conditional instructions.
17. Write a short note on DAA instruction.
18. Explain all exchange instructions supported by 8085.
19. Why INX and DCX instructions do not affect the flags?
20. Mention the instructions through which the user can have an access to flag register.
21. Mention an alternative instruction for JMP.
22. What are the various ways of initializing HL pair?
Page
6
23. What are various ways of initializing DE pair?
24. What are the various ways of initializing Stack Pointer?
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
25. Write a short note on stack.
26. What are dummy operations? Give examples.
27. Mention various parts of an instruction.
28. What is label? How it is useful in writing a program?
29. Mention the meaning and addressing modes of the following instructions: MVI M, 03H, PUSH B, RET
30. Can there be more than one HLT in an assembly language program? Justify your answer with a
suitable example.
31. Explain the following instructions indicating their addressing modes, flags affected, number and
names of machine cycles on the execution of each: XRA A, SUB M, & DCXSP.
32. Draw opcodes fetch machine cycle, memory write machine cycle and I/O read machine cycle and
explain.
33. Explain the various steps involved while executing CALL instruction with an example.
34. Explain DAA instruction with example.
35. Explain the functions and timing associated with STA and RST instructions.
36. Explain the working of CALL address and RET instructions, in terms of machine cycles.
37. Write an ALP for 8085 to multiply two 8-bit numbers. Explain your program with only comments.
38. Write a program in 8085 to convert the binary number stored in location XX20h to BCD. Store the
possible three BCD digits in unpacked manner from location XX50h.
39. What is a stack? On what principle it works? Is it necessary to initialize stack pointer while writing
program? Explain with example.
40. Mention the uses of stack. Sketch the content of SP and stack memory after the execution of each of
the following instructions in the given order, if SP = 1000h, BC = 2030h and DE = 4050h initially:
PUSH B and PUSH D.
41. With suitable programming example clearly explain passing the parameter through registers,
through memory and through stack.
42. Explain stack operation in detail.
43. Sketch and explain briefly the timing diagram of the instruction MVI A, 32h, which is stored from
address 3000h.
44. Draw the timing diagram for the instruction STA 9000h.
45. Write an 8085 program to simulate a decimal upcounter to count 00 to 99. Use delay of 100 msec in
Page
46. What is the use of instruction ORA A? What is the status of CY and AC flags after the execution of
this instruction?
Created By: N. B. Bahadure, Reader, E & TC Department
7
between counts. Assume the operating frequency as 2 MHz.
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
47. Write a recursive subroutine named FACT to find factorial of the number in 8085.
48. Using JMP, can you call a subroutine? Explain with an example and a corresponding ALP.
49. Write an ALP to count number of 1’s and 0’s present in a hex byte present at 9100h memory
location. Store number of 1’s at 9101h and number of 0’s at 9102h.
50. Write an ALP for 8085 processor to separate ODD and EVEN numbers from an array of 16 numbers
stored from F100h. Store the EVEN numbers from F120h and ODD numbers from F150h.
51. Write an ALP subroutine to produce a delay of 1 second. Consider the 8085 clocked at 5 MHz.
52. What is a subroutine? How it is useful? Explain the use of stack in CALL and RET instructions.
53. Explain any five logical instructions with their function, addressing modes and flags affected.
54. Assume register B holds 94H and the accumulator holds 16H. Illustrate the results of the instructions
ORA B, XRA B, CMA, INX B separately alongwith the status flags.
55. Register E contains 01H. What will be the contents of the register E after DCR E has been
executed twice? Also mention the status of the flag register.
56. To write program on:
a. Addition of single byte numbers
b. Addition of multibyte numbers
c. Addition of BCD numbers
d. Subtraction of BCD numbers
e. Multiplication of unsigned binary number
f.
Reversing an array
g. Sorting in ascending order
h. Sorting in descending order
i.
Searching a block for a specific byte
j.
Counting of the occurrence of a specified byte in a block
k. Conversion of BCD numbers into binary
l.
Conversion of binary numbers into BCD
m. Counting the number of BCD number in an array
n. To add even and odd bytes separately from a block
o. Conversion of ASCII to binary
p. Conversion of binary to ASCII
q. Editing of an ACII string
Page
8
57. Write two instructions to initialize stack pointer at FFFFh.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
58. Compare the following pairs of instructions with their opcode operations instruction bytes,
addressing modes, affected flags and the results.
a. MVI A, 00
and
XRA A
b. SUB B
and
CMP B
c. JMP 2700
and
PCHL
d. XTHL
and
SPHL
e. LDA 1000
and
LHLD 2000
f.
and
RAR
RRC
59. How many times will the two JNZ instructions be executed in the following sequence? What will be
the contents of H and L when program control reaches to HLT instruction?
LXI H, 0503H
LOOP: DCR L
JNZ LOOP
DCR H
JNZ LOOP
HLT
60. The first four instructions of a typical subroutine are:
PUSH PSW
PUSH H
PUSH B
PUSH D
What will be the last five instructions of the subroutine? Explain clearly.
61. What is the roll of stack and stack pointer in processing interrupt service routine?
62. Explain the concept of subroutine in 8085 assembly language.
63. Draw timing diagram for execution of the instruction MVI A, 40h on 8085. Opcode for MVI A is 3Eh.
64. Draw the timing diagram for the execution of RET instruction of 8085.
65. Draw the timing diagram for the execution of CALL instruction in 8085.
66. Explain the concept of machine cycle with the help of 8085 microprocessor.
67. Obtain logical OR of the data 0Fh and 02h.
68. Obtain EX-OR of the data 22h and 13h.
69. Obtain logical AND of the data 0Fh and 02h.
Page
9
70. Addition of two number of one byte each using registers only.
71. Addition of two decimal numbers using registers only.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
72. Addition of two decimal numbers referring memory locations.
73. Addition of two hexadecimal numbers stored in two consecutive locations and stores the result at
the third location.
74. Subtraction of two 8 bit numbers using registers only
75. Subtraction of two 8-bit numbers with memory referencing.
76. Multiplication using ADD instruction
77. Write a program to obtain 1’s complement of the 16-bit number stored at location 2115 and 2116h.
Store the result at location 2117 and 2118h. MSB’s should be in location 2116 and 2118h.
78. Obtain 2’s complement of the number stored at location 2110 and store the result at 2111h.
79. Obtain 1’s complement of the data stored at memory location 2110 and place the result at location
2111h.
80. Write a program to convert the binary number into gray code
81. Write a program to multiply the data 05 by 07d.
82. Obtain larger of the contents of memory locations 2140 and 2141h
83. Write a program to add two 16-bit numbers from memory 2140 and 2141 with 2142 and 2143 store
the result in next consecutive memory locations.
84. Write a program to multiply two 8-bit numbers to result in 8 bit number only i.e. maximum value
could be FFh.
85. Write a program to multiply two 8-bit numbers to result in 16 bit numbers.
86. Write a program to separate the hexadecimal number into two nibbles (MSB and LSB).
87. Write a program to form a byte from two nibbles.
88. Write a program to check the parity of data stored in the memory 2130h. Indication should be 00 for
odd parity and EE for the even parity. Stored the result in the next memory location.
89. Write a program to multiply any number by 2 that is stored at location 2130h and stored the result
at 2131h.
90. Write a program to multiply by 08h to a number stored at location 2130h and store the result at
location 2131h.
91. Multi byte addition when the result is more than data byte.
92. Multi byte addition for any number of bytes.
93. Subtraction of multi byte numbers when the value of the subtrahend is more than the minuend.
I=1∑
I
Page
20
10
94. Addition of series of numbers descending continuously to zero i.e.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
95. Write a program to add and display the result automatically of s series of continuously increasing
number.
96. Multiplication of two 8-bit numbers o result in the 16-bit number by repetitive addition.
97. Multiplication of two 8-bit numbers by registers shifting method.
98. Write a program to convert BCD to binary number. MSD and LSD numbers are stored at location at
2140 and 2141 respectively.
99. Write a program to find out minimum value of data stored at 10 locations.
100. Write a program to find out maximum value of data stored at 10 locations.
101. Write a program to short out the maximum and minimum from a table data stored 04 locations.
102. Arrange a sequence of data in ascending order.
103. Arrange a sequence of data in descending order.
104. Evaluate E= (A+B) * (C+D)
105. Division of 8-bit number. Write a program to divide 8-bit number from 8-bit number.
106. Division of 16 bit numbers.
107. A BCD number is stored in memory location 2040 in packed form. Write a program using
8085 ALP to unpack it and store in memory location 2041 and 2042. LSB should be store first.
108. Write a program that input data from port 01 h and masks all bits except D0. Test the result
for 0. If the result is zero, then halt, if not, jump to input data from port 02.
NOTE:
Any of the instructions can be asked for explanation.
For programs one must cover lab programs also.
Timing Diagram and Memory Interface
1. Compare the memory mapped I/O with peripheral mapped I/O.
3. Explain assembler directives or pseudo instructions or dummy instruction in details.
Page
4. Interface the following memory to 8085:
5. ROM : 2Kx 8-bit, using 2716, starting address : 0000h
Created By: N. B. Bahadure, Reader, E & TC Department
11
2. Explain data transfer techniques.
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
6. RAM : 2Kx 8-bit, using 6116, starting address : 8000h.
Use absolute address decoding. Show all the control signals interfacing.
7. Design a microcomputer to obtain the following: 4K EPROM, 512 bytes static RAM, four 8-bit ports.
using
a. Standard I/O and linear decoding.
b. Full decoding using 3 x 8 decoder.
c. Memory mapped I/O and full decoding.
8. Interface two input ports at addresses FFF0h and FFF1h and two output ports at addresses 9000h
and 9001h using memory mapped I/O. Indicate the assumptions made if any.
9. Interface 8K bytes of EPROM & 4K bytes of RAM, 8 I/P devices, 8 O/P devices to a 8085 system in I/O
mapped I/O. the memories are provided in 2K bytes ICs. Give the schematic diagram with address
data bus demultiplexing; indicate the decoding logic & the address space for each.
10. Differentiate between partial decoding and absolute decoding in case of device (memory I/O)
selection. Give an example.
11. Interface 8K byte RAM and 4K byte EPROM to 8085, by absolute decoding using 74LS138 decoder.
Give the memory map starting at address 0000h for EPROM.
12. Explain: i) memory mapped I/O, ii) I/O mapped or standard I/O, iii) serial I/O.
13. Draw the timing diagram of an 8085 instruction MVI M, 34h
14. Draw the timing diagram for the instruction STA 1000h. Opcode of STA is 32h
7000
32
7001
00
7002
10
15. Draw the timing diagram of an 8085 Instruction LHLD 1234h
2000
2A
2001
34
2002
12
(Opcode of LHLD)
16. Draw the timing diagram of an 8085 instruction XTHL.
17. Define T-state, Machine cycle, Opcode fetch Cycle, Execute Cycle, Instruction Cycle.
18. Differentiate between Opcode Fetch cycle and Memory read cycle.
19. Mention various Machine cycle encountered by 8085 and the status of various signals thereof.
21. List the instruction takes 6 T-states in their Opcode Fetch?
22. Which is the longest instruction of 8085? Draw its timing diagram.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
Page
12
20. Why the Address data bus goes into tristate while the CPU is reading from the memory?
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
23. Mention the instructions those consume all five machine cycles of 8085.
24. Draw the timing diagram of MVI B, 32H and mention its difference with MVI M, 32H as far as the
timing diagram is concerned.
25. What is a timing diagram? Why it is so important?
26. Write a short note on FEO.
27. Write a delay program using single register. Calculate the delay being introduced by the program.
28. Write a delay program using register pair. Calculate the delay being introduced by the program.
29. Write a delay program that can introduce a delay of 1 msec. assume suitable frequency of the clock
supported by 8085.
30. Draw the timing diagram of an instruction which is in the indirect addressing mode.
31. Draw the timing diagram of an instruction which is equivalent to JMP instruction.
32. Draw the timing diagram of an instruction that stores the contents of the accumulator at a location
pointed by BC pair.
33. Draw the timing diagram of an instruction that adds a specified byte to the contents of the
accumulator.
34. Draw the timing diagram of an instruction that increments the contents of the memory location
pointed by HL pair.
35. Answer the following questions with respect to the timing diagram of the following instructions:
a. How many machine cycles are there in the instruction?
b. Mention the sequence of the machine cycles
c. How many T-states are there in the Opcode fetch of the instruction?
d. How many machine cycles are there in the execute cycle of the instruction?
e. How many times the CPU reads the memory?
f.
How many T-states are there in the instruction?
g. If the clock frequency is 1MHz, what will be the time of execution of the instruction?
JMP, JNZ, CALL, STA, CC, RET, INX, SHLD, LHLD, HLT, MOV M,R
36. Explain with neat diagram the opcode fetch and memory read and memory write machine cycles.
37. Define WAIT state. How it is internally generated by the CPU? What is its duration?
38. Suggest a circuit that can introduce one WAIT state in every machine cycle.
39. Suggest a circuit that can introduce two WAIT state in every machine cycle.
Page
41. Draw the timing diagram of JPO when the condition is not satisfied.
42. Differentiate absolute and partial address decoding.
Created By: N. B. Bahadure, Reader, E & TC Department
13
40. Draw the state transition diagram of 8085 with respect to WAIT state.
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
43. A circuit containing 32KB of RAM is to be an interfaced with 8085 based system, so that the first
address of RAM is at 4800h. What is the entire range of RAM address? How the address bus is used
to enable the RAMs? What address lines should be used?
44. Design the interfacing system of 16K x 8 with microprocessor 8085. The available chip is 16K x 1
45. Connect following memory IC with 8085
16 K * 8 EPROM
4 IC’s
4 K * 8 RAM
4 IC’s
i.
Perform memory mapping using partial decoding
ii.
Perform memory mapping without fold back
46. Connect 2114 IC with 8085. Use suitable address.
47. Design the interfacing system of 64K x 8 with microprocessor 8085 based system. The available chip
is 64K x 1
48. Interface 2K word memory using 2142 SRAM chip. 2142 is 1024 x 4 bit SRAM, with output enable.
Select starting address 4000h. Use decoder circuit to select memory chips.
49. Interface 8K bytes of EPROM and 8K bytes of RAM to 8085.
50. Interface 6K X 8 memory to 8085 using 2K X 8 memory chips. Give the address range of each chip
used.
51. Interface 2KX8 memory chip to 8085. Show all necessary connections. Use minimum hardware for
the same. Specify the addresses under use.
52. What do you folding back of Memory? How this can be avoided?
53. What are shadows of memory? Why they are generated? How they can be removed?
54. What do you mean by ‘Hardwired Decoding chip select and Decoder decoding chip select? Give
examples of each.
55. Describe the Minimum System with neat diagram.
56. What is ‘Bus Contention’? How it can be avoided?
57. Differentiate between linear select decoding and absolute decoding. Mention their relative merits
and demerits.
58. A particular microprocessor has 10 bit address bus. (i) How many memory locations it can access?
(ii) Write down the highest address, (iii) Using 256 byte memory blocks design a decoder logic for
above memory requirement.
Page
60. What parameters are to be considered while selecting a memory chip for interfacing?
14
59. Explain the basic concept of memory interfacing and draw the memory write cycle.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
61. Given a memory with a 14 bit address and 8 bit word size. (i) How many bytes can be stored in this
memory? (ii) If this memory were constructed from 1KX1 bit RAMs, how many such memory chips
would be required? (iii) How many bits will be required for chip select?
62. Define Memory Map.
63. Interface 1K X 8 memory chips. Give the address range of each chip used.
64. The following memory devices are to be interfaced to 8085: (i) 2 K EPROM, (ii) 2K RAM. The EPROM
location address should start from location 0000H and RAM from location 4000 H. Draw the
complete interfacing diagram. Use minimum hardware.
65. Interface 16K X 8 EPROM memory to 8085. The available memory chip is 4K X 4. The address should
start from 0000H onwards. Give detailed interfacing diagram and address range for each chip used.
66. It is required to connect following memory devices to 8085 CPU system bus:
4K of EPROM (2732) starting address 0000H
:
1 No.
Followed by this 2K of SRAM (6116)
:
2 Nos.
256 bytes of RWM starting address 2000H
:
1 No.
2K of SRAM (6116) starting address 2800H
:
1 No.
4K of EPROM (2732) starting address 3000H
:
1 No.
Use a decoder fro chip select logic and you may use additional gates if required. Use exhaustive
decoding. Draw the memory map and logic diagram of the system.
67. Interface an 8085 CPU with a 2K X 8 ROM chip and two 1K X 8 RAM chips such that the following
address map is realized:
ROM Chip
:
Starting address – 0800H
1st RAM chip
:
Starting address – 1000H
2nd RAM chip
:
Starting address – 4000H
68. Design an 8085 based minimum chip configuration system for the following specifications
256 x 8 bit RAM
-
2000H onwards
2K x 8 bit EPROM
-
0000h onwards
69. Design an interface arrangement to map a
a. 1024 x 8 ROM in address space 0000h to 03FFh
b. 2048 x 8 RAM in 0800H to 0FFFH
c. Output port in address space 1000H to 2000H
Page
15
d. Input port in 3000H to 4000H
Interrupts
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
1. Explain in detail the interrupt system of 8085.
2. Design and explain a scheme to interrupt on INTR of 8085.
3. Indicate all the pins of 8085 through which the processor can be interrupted. In respect of each of
these pins describe how the processor obtains the starting address of the interrupt service routine.
4. What is meant by priority interrupts? Explain the operation of different interrupts available in 8085,
with the help of circuit diagram.
5. How is the device priority determined in hardware polling? Explain.
6. Discuss the instructions related to interrupts of 8085.
7. Mention the functions of RIM and SIM.
8. Explain various I/O techniques supported by 8085.
9. Mention the desirable features of PID
10. Differentiate between Memory mapped I/O and I/O mapped I/O.
11. Using Status check program controlled I/O input 256 bytes of data and store them at locations
starting from 9000H. Draw the interfacing diagram and write necessary program for the same.
12. Using Status check program controlled I/O output 256 bytes of data stored at locations starting from
9000H. Draw the interfacing diagram and write necessary program for the same.
13. Repeat problem No. 24 with a delay of at least 1 msec in between two consecutive bytes.
14. Explain timing diagram for inputting and outputting of data using handshake.
15. What are the various techniques of addressing the I/O ports. Make a comparison between them.
16. Distinguish between: i) Vectored and non vectored interrupt, ii) Maskable and non maskable
interrupt, iii) Internal and external interrupt, iv) Software and hardware interrupt.
17. Explain interrupt driven I/O technique. How 8085 responds to INTR interrupt?
18. What is an interrupt? Why it is required?
19. Discuss the interrupt structure of 8085.
20. Differentiate between hardware and Software interrupt
21. Differentiate between Maskable and Non-Maskable interrupt.
22. Draw and explain the basic timings characteristics of hardware interrupt of 8085.
23. Write an initialization program to disable RST 7.5 and enable RST 5.5 and RST 7.5
24. After the execution of RIM instruction, the contents of the Accumulator is found to be 4CH. Put ur
Page
25. Write an ALP to count the number of times RST 6.5 interrupt has occurred and display the count in
BCD at 8-LEDs connected at memory location 3000H.
Created By: N. B. Bahadure, Reader, E & TC Department
16
comments on the result.
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
26. Write an ALP to reverse a block of 16 bytes residing at locations starting from 0900H whenever an
RST 6.5 interrupt occur.
27. Write an ALP to output a train of square waves having a frequency of 1 KHz through SOD pin.
28. Write an ALP to output a train of rectangular pulses having a frequency of 1 KHz and Duty Cycle
70%, through SOD pin.
29. Write an ALP to output a train of 256 rectangular pulses having a frequency of 1 KHz and Duty Cycle
70%, through SOD pin.
30. Write an ALP to output a byte residing at 9000H serially through SOD pin. Allow a delay of 1 msec as
the bit interval.
31. Write an ALP to input a byte serially through SID pin. Assume a delay of 1 msec as the bit interval.
Convert the serial bit pattern into a parallel byte and store the byte at 9000H.
32. Assume the microprocessor is completing an RST 7.5 interrupt request, check to see if RST 6.5 is
pending, enable RST 6.5 without affecting any other interrupts; otherwise, return to the min
program.
33. Design a 1-hour real time clock using 50Hz power line as an interrupt source. The displays are to be
mad at the ports and must be in BCD.
34. Design a 24-hour real time clock using 50Hz power line as an interrupt source. The displays are to be
mad at the ports and must be in BCD.
35. Implement a breakpoint facility at RST 5 for user. When the user writes RST 5 in the program, the
program should be interrupted at the instruction RST 5, display the content of the accumulator and
the flags when Hex key A is pressed and exit the break point routine and continue execution when
Hex key ‘0’ (zero) is pressed
36. Discuss the instructions related to interrupts of 8085.
37. Mention the functions of RIM and SIM.
38. Explain various I/O techniques supported by 8085.
39. Mention the desirable features of PID
40. Differentiate between Memory mapped I/O and I/O mapped I/O.
41. Using Status check program controlled I/O input 256 bytes of data and store them at locations
starting from 9000H. Draw the interfacing diagram and write necessary program for the same.
42. Using Status check program controlled I/O output 256 bytes of data stored at locations starting from
44. What are the various techniques of addressing the I/O ports. Make a comparison between them.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
Page
43. Explain timing diagram for inputting and outputting of data using handshake.
17
9000H. Draw the interfacing diagram and write necessary program for the same.
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
45. Write an ALP to reverse a block of 16 bytes residing at locations starting from 0900H whenever an
RST 6.5 interrupt occur.
46. Write an ALP to count the number of times RST 6.5 interrupt has occurred and display the count in
BCD at 8-LEDs connected at memory location 3000H.
47. Write an ALP to output a train of square waves having a frequency of 1 KHz through SOD pin
48. Write an ALP to output a byte residing at 9000H serially through SOD pin. Allow a delay of 1 msec as
the bit interval.
49. Write an ALP to input a byte serially through SID pin. Assume a delay of 1 msec as the bit interval.
Convert the serial bit pattern into a parallel byte and store the byte at 9000H.
Interfacing of peripherals and applications.
1. Initialize port A as input port and port B as output port in such a way that port a should in the
handshake mode and port B as simple I/O mode for the 8155.
2. Write a program to read the status of 8 switches connected to port A and display the status of
switches at the LED’s connected to port B.
3. Mention the important features of 8155 / 8156.
4. What is the difference between 8155 & 8156?
5. With neat diagram explain the architecture of 8155 / 8156.
6. Discuss the utility of Port C in 8155 / 8156.
7. Discuss, with example, the generation of addresses of the various ports and registers of 8155 / 8156.
8. Explain the timer operation of 8155 / 8156.
9. Mention the function of the bit ‘INTR TIMER’ in the status registers of 8155.
10. Discuss the start and stop operation of timer I 8155 / 8156.
11. Discuss various modes of operation of the ports of 8155 / 8156.
12. Discuss various modes of operation of the timer 8155 / 8156 with necessary signal.
13. Draw the detail decoding diagram to achieve the address of Port A of 8155 / 8156 as 91H. Under this
situation, mention the addresses of other ports and registers in 8155 / 8156.
14. Mention the utility of Port C in 8155 / 8156.
16. Write initialization instructions to program Port A as output port and Port B as input Port for the
Created By: N. B. Bahadure, Reader, E & TC Department
Page
8755
18
15. Design a square wave generator of frequency 2 KHz using 8155 timer.
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
17. Write initialization instructions to program Port B as output port and Port A as input Port for the
8755
18. Write initialization instructions to program Port B in such a way that the upper nibble (PB7 – PB4) be
declared as input and upper nibble (PB3 – PB0) be declared as output for the 8755
19. Write initialization instructions to program Port A in such a way that the alternate bits be declared
as i/p and o/p alternately starting from MSB for the 8755.
20. 4 switches are connected across PA7 – PA4 and 4 LEDs are connected across PA3 – PA0. Write a
program to read the status of the switches and to display the status at the LEDs. For the 8755.
21. Explain the operation of 8255 PPI chip with its internal block schematic. Explain its mode 0, mode 1
and BSR modes.
22. Explain the features of Programmable Peripheral Interface 8255.
23. Draw and explain the block diagram of the Programmable Peripheral Interface 8255.
Or explain the architecture of the Programmable Peripheral Interface 8255.
24. Explain the modes of operation supported by the Programmable Peripheral Interface 8255.
25. Explain the Bit Set Reset mode of Programmable Peripheral Interface 8255.
26. Explain in details the parallel Input – Output mode of 8255 PPI.
27. What is the mode and Input – Output configuration for ports A, B and C of an 8255 PPI after its
control word register is loaded with 54H.
28. Describe the mode 0, mode 1 and mode 2 input – output operation of the 8255 PPI.
29. If Ports A, B and C of an 8255 PPI are to be configured for mode 1 operation, where the ports A and
B are Inputs and Port C as an output, what is the control word.
30. Explain how Programmable Peripheral Interface 8255 is interfaced with Microprocessor 8086.
31. Give the interfacing of 16 – bit 8255 ports are to be interfaced with Microprocessor 8086. Assume
that the address of port A is E0h.
32. A 4 x 4 matrix keyboard is to be interfaced with Microprocessor 8086. Write an ALP to detect key
closure and return the key code in register AL. The debouncing period for a key is 10ms. Use
software key debouncing technique.
33. Write a control word format and assembly instruction when the ports of 8255 are defined as
follows:
Port A as an Input port in mode 0.
19
Port B as an Output port in mode 0
Page
Port CUP as an Input port and Port CLow as an Output port.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
34. Write a control word format and assembly instruction when the ports of 8255 are defined as
follows:
Port A as an Output port in mode 0.
Port B as an Output port in mode 0
Port CUP as an Output port and Port CLow as an Input port.
35. Interface an 8255 PPI with 8086 Microprocessor at address from 60h. Interface 5 seven segment
display with 8255 PPI and write a sequence of instruction to display 1,2,3,4 and 5 over the five
displays continuously. The seven segment codes for the number is available in the look up table at
address 30000h.
36. Write an assembly language program to generate 256 pulses at the rate of 50Hz. Pulse ON time is
5msec used PC3 pin of 8255 PPI.
37. Write an ALP to generate a square wave of frequency 1 Hz on PC2 pin of 8255 having control word
register address is 93h.
38. Write an ALP to generate 256 pulses at the rate of 50 Hz. Pulse ON time is 5 msec. used PC3 pin of
8255.
39. Write a short note on 8279 keyboard/display interface.
40. Explain with block diagram the 8253 timer chip and its operation.
41. Explain with block diagram the USART 8251 chip and its operation.
42. Explain how data can be transferred using 8251 USART at different baud rates. Also discuss the
features available in 8251.
43. Explain the features of 8253. Briefly explain its different modes of operation.
44. With the help of functional block diagram, explain the different features available in 8279.
45. What are the maximum and minimum frequencies that can be generated using 8155 timer section
when 8085 clock is 3 MHz?
46. Explain with diagram serial synchronous and asynchronous data formats of 8251.
47. Write a program to transmit 8 bit data through SOD pin starting with MSB. The data is stored at
address 1A00h.
48. Write an ALP to generate square wave using 8255.
49. Write & explain the mode word format, command word format & status word format of 8251.
50. Write ALP to initialize 8251 USART and receive data on polled basis given the parameters: Baud rate
20
factor = 64, Character length = 8 bits, No parity check and 1 stop bit. Assume port address 50h for
Page
data and 51h for control/status.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
51. Show how you would interface a keyboard to an 8085 processor using 8255. Write an ALP to
generate a key code for the key pressed.
Fill in the blanks:
1. Microprocessor 8085 is a ------------------ bit processor.
2. Microprocessor has ------------ number of pins.
3. Address bus of 8085 microprocessor is of -------- bits.
4. Data bus of 8085 microprocessor is of -------- bits.
5. Address bus of 8086 microprocessor is of -------- bits.
6. Data bus of 8086 microprocessor is of -------- bits.
7. Examples of 1-byte instruction -------------------------.
8. Examples of 2-byte instruction -------------------------.
9. Examples of 3-byte instruction -------------------------.
10. STA 2500H takes ------------------ machine cycles.
11. LDA 2500H takes ------------------ machine cycles.
12. MOV A, B takes ------------------ machine cycles.
13. LXI H 2600H takes ------------------ machine cycles.
14. ADI 09 takes ------------------ machine cycles.
15. IN 02 takes ------------------ machine cycles.
16. Opcode fetch cycle takes ------------ T- states.
17. Memory read cycle takes ------------ T- states.
18. Memory write cycle takes ------------ T- states.
19. There are ------------- addressing modes.
20. Differentiate between microprocessors and microcontroller in one line.
21. PUSH PSW means -------------22. POP PSW means ------------23. The function of ALE is ---------------24. Values of S1 and S2 in case of opcode fetch cycle is ---------- and -------------.
25. Values of S1 and S2 in case of memory read cycle is ---------- and -------------.
26. Values of S1 and S2 in case of memory write cycle is ---------- and -------------.
21
27. RAM of 1K* 8 means --------------------
Page
28. There are --------------- opcodes in 8085.
29. An example of direct addressing mode is -----------------.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
30. An example of indirect addressing mode is -----------------.
31. Examples of register addressing mode is -----------------.
32. An example of implicit addressing mode is -----------------.
33. Examples of control signals of 8085 ----------------------.
34. Give the priority order of interrupts in 8085.
35. Data transfer instructions change the status of flags. State true or false.
36. CPM M means -----------------37. The CPU of a computer comprises of ------------------.
38. Opcode is a term used to refer --------------.
39. An 8-bit microprocessor signifies that it has -----------------.
40. The address bus width of 64 KB of memory is ----------------.
41. DCR register can be used to decrement the contents of ----------------.
42. A 3-byte instruction requires ------------- fetch cycles for its execution.
43. A 2- byte instruction requires ------------- fetch cycles for its execution.
44. A 1-byte instruction requires ------------- fetch cycles for its execution.
45. The term cycle stealing is used for ---------------.
46. The instruction MOV A, B belongs to ----------------- addressing mode.
47. The instruction MVI A, B belongs to ----------------- addressing mode.
48. The instruction LXI H, 2000H belongs to ----------------- addressing mode.
49. The instruction LDAX D belongs to ----------------- addressing mode.
50. The instruction CMA belongs to ----------------- addressing mode.
51. Move the contents of register A to register B.
52. Move the contents of memory location 2000H to the accumulator directly.
53. In digital computers byte denotes ----------------.
54. Load the HL pair with the address 2500H.
55. Move the data 09H to the B register.
56. Complement the contents of the accumulator.
57. Complement the contents of the carry flag.
58. Rotate the contents of the accumulator by one bit to the left through carry.
59. Rotate the contents of the accumulator by one bit to the left.
62. In a microprocessor based system, the address signals are sent by ---------------.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
Page
61. Rotate the contents of the accumulator by one bit to the right.
22
60. Rotate the contents of the accumulator by one bit to the right through carry.
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
63. In a microprocessor based system, the address bus is ---------------.
64. In a microprocessor based system, the data bus is ----------.
65. The basic purpose of timing and control unit is ------------------.
66. The arithmetic and logical unit is meant for -----------------.
67. TRAP is a maskable interrupt. State true or false.
68. Subroutine is defined as -----------------.
69. 8253 works in ------------- modes.
70. The format for BSR mode is -----------.
71. The register pair WZ can only access by a microprocessor. State true or false.
72. The address bus width of 8 KB of memory is ----------------.
73. The term operand specifies ---------------.
74. The clock frequency required for 8085 is -----------.
75. Store the contents of accumulator in the memory location 2500H.
76. Increment the contents of memory location 2400H by 1.
77. Increment the contents of the register B by 2.
78. Decrement the contents of memory location 2400H by 1.
79. Decrement the contents of the register C by 2.
80. The instruction XTHL signifies -----------.
81. The instruction SPHL signifies -----------.
82. The instruction HLT signifies ------------.
83. The fist microprocessor was introduced in the year ------------.
84. The major difference between INTEL 8080 and INTEL 8085 is ---------------.
State true or false:
1.
RST 7.5 IS LATCHED IN 8085.
2. After HOLD is activated, the bus control is relinquished by 8085 after the instruction is executed.
With encoded scan keyboard mode, the total number of keys are connected to 8279 is 128.
5.
Asynchronous mode of 8251 is used for very high rate of data transfer.
6.
POP D is data transfer of instruction.
7.
ALE signal is required because higher order bus is multiplexed with data in 8085.
8.
'Opcode Fetch ’machine cycle is of 4t states for all instructions.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]
Page
4.
23
3. INTA pulses are required because INTR is having the lowest priority.
BHILAI INSTITUTE OF TECHNOLOGY, DURG
Question Bank
9. RST 4.5 pin causes microprocessor 8085 to go in to ‘WAIT’ state.
10. If register H=OOH, L=OIH, then by using DCX h instruction will set zero flag.
11. RST5 is a direct addressing mode type instruction.
Dear students any queries on the above questions and also on the others related topics to the
Microprocessor are welcome. Please put up your queries on my email ID [email protected]
(please mention sub: ur_name) or discuss with me directly as per convenience.
Please remember the following points for the examination (if possible try this):
1. All solution Theory or Programs must be in well manner and up to the point. Also highlight
important points.
2. If problem solved then please make a hobbit to outline your answers by drawing square or
underline it (Don’t use other ink pen other than blue or black).
3. If you attempt que -1 Part (a) and u wish to attempt then Part (b) or (c) of que -1 later but not
at the moment (not successively) leave the space for it. But don’t solve other questions part
and then again remaining parts of que -1 its make lot of confusion for the checker so it may
be ignore.
4. Finally all blank spaces are simply cross.
Page
24
5. If possible avoids mistakes don’t rub it again and again make better visibility of your attempt.
Created By: N. B. Bahadure, Reader, E & TC Department
[email protected]