Sei sulla pagina 1di 22

DEPARTMENT OF ELECTRONICS & COMM. ENGG.

B.I.T. MESRA, RANCHI

EC5101 MICROPROCESSOR AND INTERFACING

Module – 1:

Revision of logic circuits with emphasis on control lines, SAP concepts with stress on timing
diagrams, Microinstructions, Microprogramming, Variable machine cycle, Architecture of 8085
Processor , Functions of all signals, Bus concepts, Multiplexed and De-multiplexed Bus,
Minimum system.

Text Books:

1. “Digital Computer Electronics”, 2/e. by A. P. Malvino.


2. “Microprocessor Architecture, Programming and Applications with 8085” by R. S.
Gaonkar.

Module – 2:

Instruction set, Addressing modes, Stack operation, Timing diagrams, Programming examples
like Time delay, Looping, Sorting, Code conversions like BCD to Binary, Binary to BCD, HEX to
ASCII, ASCII to HEX, BCD Arithmetic etc.

Text Books:

1. “Digital Computer Electronics”, 2/e. by A. P. Malvino.


2. “Microprocessor Architecture, Programming and Applications with 8085” by R. S.
Gaonkar.

Module – 3:

8085 based Microcomputer system, Memory Organization, Memory Interfacing, Memory


Mapped I/O, I/O Mapped I/O, Interrupts, Hardware and Software Interrupts, Interrupt
instructions, Programmed I/O, Interrupt driven I/O, DMA.

Text Books:

1. “Digital Computer Electronics”, 2/e. by A. P. Malvino.


2. “Microprocessor Architecture, Programming and Applications with 8085” by R. S.
Gaonkar.

Module – 4:

Architecture of 8255 I/O peripheral chip, Modes of operation, Hand shake mode operation, BSR
mode, ADC 0801 and ADC 0808 Interfacing with microprocessor, Analogue multiplexed ADC,
DAC 0808 specifications, DAC Interfacing, Programming examples for Generation of square
wave, positive and negatives ramps, triangular and sine waves, Sample and Hold circuit, LF
398 and its applications in Data Acquisition.
Text Books:

1. “Digital Computer Electronics”, 2/e. by A. P. Malvino.


2. “Microprocessor Architecture, Programming and Applications with 8085”. by R. S.
Gaonkar.
3. “Microprocessor and Interfacing, Programming of Hardware” by Douglas Hall.
4. “Microprocessor and Peripherals” by S. P. Chowdhury and Sunetra Chowdhury.

Module – 5:

8253 timer, Modes of operation, Applications, 8279 Keyboard/Display Interface, Different modes
of operation, Interfacing, Programming examples, 8237 DMA Controller.

Text Books:

1. “Microprocessor and Interfacing, Programming of Hardware” by Douglas Hall.


2. “Microprocessor and Peripherals” by S. P. Chowdhury and Sunetra Chowdhury.
3. “The INTEL 8086/8088 Microprocessor, Architecture, Programming, Design and
Interfacing”, 3/e. by Bhupendra Singh Chhabra.

Module – 6:

Evolution of Microprocessors, Introduction (Architecture and Instruction set only) of 8086 and
8088, Evolutionary steps and Additional features of 80186, 80286, 80386, 80486 and Pentium
Processors, Concept of CISC and RISC processors.

Text Books:

1. “Microprocessor, Microcomputer and their Applications”, 2/e. by A, K. Mukhopadhyay.


2. “Advanced Microprocessor” by Y. Rajasree.
3. “The INTEL 8086/8088 Microprocessor, Architecture, Programming, Design and
Interfacing”, 3/e. by Bhupendra Singh Chhabra.

Module - 7 :

Introduction to Microcontrollers, 8051 Microcontroller, Memory Organization, Programming


techniques, Addressing modes, Instruction set, Interrupt structure, Port structure, Different
modes of operation, Programming examples.

Text Books:

1. “Advanced Microprocessors and Microcontrollers” by S. K. Venkata Ram.


2. “Microprocessor, Microcomputer and their Applications”, 2/e. by A, K. Mukhopadhyay.
3. “Advanced Microprocessors” by Y. Rajasree.
4. “Microprocessor and Peripherals” by S. P. Chowdhury and Sunetra Chowdhury.
TUTORIAL

EC5101 MICROPROCESSOR AND INTERFACING

Module – 1:

1. What are the advancements made in SAP2 over SAP1?

2. Explain clearly the difference between Dynamic RAM, Static RAM, ROM, PROM and EPROM.

3. What is the difference between macroinstructions and microinstructions?

4. What is meant by microprogramming?

5. With the help of a diagram, explain the function of an adder-subtracter unit.

6. What is meant by variable machines cycle? How is it achieved?

7. What is meant by hardware control matrix? Mention a suitable alternative for that.

8. What is meant by a minimum system?

9. What is meant by folded memory? How it could be avoided in a reliable microprocessor system?

10. Explain with a neat diagram, the architecture of 8085.

11. Which are the status signals available in 8085? What are their functions? Which status do they
reflect?

12. Which are the control signals available in 8085? What are their functions?

13. Explain the RESET procedure of an 8085.

14. What is the function of READY pin? Explain what is meant by WAIT cycles.

15. Why ROM is always mapped to lower region of a memory map in 8085?

16. Explain the function of various flags available in 8085.

17. What is the function of ALE pin in 8085?

18. Name three components that must be connected to the isolated address and data buses of 8085,
and sketch the connection details of these components.

19. What is the function of Program Counter in 8085? Why should it be a 16-bit binary counter?

20. What is the function of TMP register, W and Z registers in 8085?

21. With a neat sketch, explain how the address and data buses are demultiplexed out in an 8085
based microprocessor system.

22. What is meant by HOLD state in 8085?


23. Explain the DMA process in 8085.

24. Why 8257 chips can perform I/O operations faster than 8085?

25. What is the difference between Synchronous and Asynchronous communication?

Module – 2:

1. What are the different addressing modes available in 8085?

2. What is the difference between CMP and SUB instruction?

3. How is a CMP instruction is used to compare two bytes in 8085?

4. Explain what a DAA instruction does in 8085.

5. What will be the status of A 8 – A 15 pins during the execution of IN and OUT instructions?

6. Which instruction takes maximum number of ‘T’ states in 8085? How many ‘T’ states it takes?
How many machine cycles it takes?

7. What is the difference between a JMP instruction and a CALL instruction?

8. What does XTHL instruction do?

9. Explain the following instructions, with suitable examples.

LHLD, SHLD, XCHG, LXI, STAX, LDAX

10. Explain the various steps involved in executing a CALL instruction.

11. What are meant by conditional call instructions? Give examples.

12. What is meant by STACK? Where it is used in 8085?

13. Explain the various steps involved in execution of PUSH and POP instructions.

14. What is the method of performing BCD subtraction in 8085?

15. In a time delay program, using a register pair for count, it is necessary to use an ORA instruction
after DCX reg. pair instruction. Why?

16. Explain the functions of all the pins in 8085.

17. Explain the functions of all instructions in 8085.

18. Write a program to choose only BCD numbers from a group of 12 bytes residing in locations
starting from 0C20H, and arrange them in descending order in location 0C41H. Keep the count
(BCD) in 0C40H.
19. Six unpacked BCD numbers are given at random in 0C20H. Write a program to form the largest
6-digit number which can be formed by them and keep it in 0C40H.

20. Write a program to select only even bytes from a group of 12 bytes residing in locations starting
from 0C30H and arrange them in ascending order from 0C41H. Keep the count (BCD) in 0C40H.

21. 12 nos. are given at random (6 are even and 6 are odd) in locations starting from 0C20H. Write a
program to arrange them alternatively first odd and next even in the same locations.

22. 8 hexadecimal nos. are given in locations starting from OC20H. Write a program to form the
smallest 8-digit binary no. and store it in 0C40H.

23. 3 groups of 12 bytes each are given in 3 locations starting from DATA1, DATA2 and DATA3.
Write a program to form a 4th group, with largest of all groups and store it in locations starting
from DATA4. (The nth byte of 4th group shall be the largest of nth byte of 1st, 2nd and 3rd groups)

24. Write a program to count the number of times, even numbers appear as memory pairs (count shall
be in BCD) in a block of 24 nos. residing in locations starting from DATA and keep the count in
location COUNT.

25. Write a program to count the number of consecutive odd numbers (count shall be in BCD) in a
block of 24 nos. residing in locations starting from DATA and keep the count in location COUNT.

26. Write a program to count the no. of times odd parity numbers appear as memory pairs.(count shall
be in BCD) in a block of 24 nos. residing in locations starting from DATA and keep the count in
location COUNT.

27. Write a program to count the no. of times consecutive even parity numbers appear(count shall be
in BCD) in a block of 24 nos. residing in locations starting from DATA and keep the count in
location COUNT.

28. Write a program to count the number of times, consecutive BCD nos. appear (count shall be in
BCD) in a block of 24 nos. residing in locations starting from DATA and keep the count in
location COUNT.

29. Write a program to select only BCD nos. from a group of 12 nos. residing in locations starting
from DATA, and add them together and store the sum in 2 locations starting from SUM.

30. Write a program to form a square table for 7 BCD nos. residing in locations starting from DATA
and store the table in 14 locations starting from SQUARE.

31. A block of memory residing in locations starting from DATA has 16 bytes consisting of 01H,
01H, 0FH, 05H, and 06H. Write a program to arrange them in such a way, that identical nos. are
grouped together in the same locations.

32. Write a program to convert two BCD nos. into a binary numbers and multiply them. BCD nos. are
given at 0C20H and 0C21H. Converted binary no. shall be stored in locations 0C22H and 0C23H.
The product shall be stored in locations 0C24H and 0C25H.
33. A group of 16 bytes are residing in locations starting from DATA. Write a program to arrange the
first eight of them in ascending order and next eight of them in descending order in the same
locations.

34. Write a program to add a 10-digit BCD no. residing in locations starting from NUM1 with another
10-digit BCD no. residing in locations starting from NUM2 and keep the sum in 6 locations
starting from SUM.

35. Write a program to fill 64 10 locations with nos. as shown below:


1st 4 locations with 0FH
2nd 4 locations with 0EH
3rd 4 locations with 0DH
last 4 locations with 00H
and repeat the same till all locations are fully filled.

36. Write a program to convert three binary nos. into BCD nos. and add them. Also subtract 98 10 from
the sum. Nos. are given at 0C20H, 0C21H, 0C22H. Converted nos. shall be in 0C23H, 0C24H and
0C25H. The sum shall be in 0C26H and 0C27H. The difference shall be on 0C28H and 0C29H.

37. Write a program of running lights as explained below (delay 1 sec.).


X – lighted LED 0 = Off LED.

0 000 000 X
0 0000 X 00
000 X 0000
0 X 000000
000 X 0000
00000 X 00
0000000 X
and so on. The address of LEDs is 3000H

38. Write a program to flash the LEDs as shown below at an interval of 2 sec.
X – Lighted LED, 0 – Off LED
0000 XXXX
00000000
XXXX 000
00000000
0000 XXXX
0000 0000 and so on. The address of LEDs is 3000H

39. Write a program to store the address of the last but one non-blank character in a block in 0C20H.
The block starts in 0C30H and ends with a carriage return 0DH.

40. Some ASCII letters are given in locations starting from 0C20H (total no. is 8). Write a program to
find ASCII for corresponding small letter and insert them alternatively in the same locations.

41. A block of 16 bytes resides in locations starting from 0C60H. Write a program to sort the odd nos.
and even nos. and nos. divisible by 4 and store them in the same locations in that order. Add all
the odd nos. together, even nos. together and keep the respective sums starting from 0C80H.

42. A block starts at 0C20H and ends where 4 consecutive 00H are followed by FFH. Write a
program to estimate the size of the block and store the count in BCD in COUNT.
43. A block starts at 0C20H and ends at 0C3FH. Write a program to determine the no. of times CCH
occurs as triplets (3 nos. CCH in consecutive locations) and store the count in BCD in 0C40H.

44. A block starts at 0C20H ends at 0C3FH. Write a program to determine the no. of memory pairs,
where the consecutive bytes gets incremented by 1 and store the count in BCD in 0C40H.

45. A block starts at 0C20H and ends with 3 pairs of consecutive values of 00H and FFH. Write a
program to estimate the size of the block and store the count in BCD in COUNT.

46. Write a program to edit a string of ASCII characters by replacing all trailing zeros with blanks.
The string resides in locations starting from 0C20H. The string ends with a carriage 0DH. (Given
0 is 30H and blank is 20H).

47. An ASCII string exists in locations starting from 0C60H. It ends with carriage return. Write a
program to strip off the parity bit. Before striping the bit, check whether they are odd or even
parity and fill locations starting from 0C80H with either 01H or 02H as per the parity of the byte
(if corresponding to each byte if it is even, then 02H, and if it is odd, then 01H).

48. Write a program to add even parity to a string of 7-bit ASCII characters. The string ends with a
carriage return 0DH. The string begins in locations starting from 0C20H.

49. Write a program to compare two strings of ASCII characters to see if they are exactly identical.
Both the strings ends with carriage return 0DH. The strings start in locations STR1 and STR2
respectively. If strings are identical, light all the LEDs (3000H); otherwise, light only alternate
LEDs.

50. A block of 16 bytes resides in locations starting from 0C60H. Write a program to sort them in the
same locations as per the following way: first an odd parity no. and second an even parity no., thus
odd and even parity alternatively (Assume 8 are even parity numbers and 8 are odd parity
numbers).

51. 6 bytes are residing in locations starting from 0C60H. (could be any byte from 00H to 0FH). Write
a program to find the respective ASCII code, and fill them alternatively in the same locations (e.g.
if 1st character is 01H, the next location shall now contain 31H) and so on.

52. 6 ASCII bytes are residing in locations starting from 0C80H. Write a program to find the
respective Hex. character and fill alternate locations with them. (e.g. If 1st character is 31H, the
next location shall contain 01H).

53. Write a program to convert a 16–bit binary number residing in 2 locations starting from 0C50H,
to 16 ASCII characters. (Either ASCII ‘0’ or ASCII ‘1’) which are to be filled in locations starting
from 0830H (LS Bit first).

54. A supposed to be an ASCII string consists a few invalid characters in it. The string starts from
0C21H and the no. of characters is given in 0C20H. Write a program to delete all the invalid
characters, and update the string. Modify the count of characters in 0C20H accordingly. Also
insert a carriage return 0DH at the end.
55. There are 8 bytes residing in locations starting from 0C20H. Write a program to sort them in the
same location with the byte with minimum no. of ‘1’ bits in the 1st location and the bytes with
maximum no. of ‘1’ bits in the last location, and other bytes in between depending on the no. of
‘1’ bits in them.

56. There are 16 bytes residing in locations starting from 0C20H. Write a program to sort them in
same location in such a way, that the bytes with the same number of ‘1’ bits are brought in
adjacent locations. Keep the count of each category in location starting from 0C40H.

57. An ASCII string starts in location 0C20H and consists mostly of ASCII codes for either ‘0’ or ‘1’.
The ASCII string ends with a carriage return 0DH. Construct a binary word with 1st ASCII
character MS bit and following characters as the proceeding bits. If you find any character other
than ASCII code for ‘0’ or ‘1’ just neglect it. If the valid number of characters is less then 16 fill
all trailing bits with ‘0’. Write a program to construct the word and store it in 2 locations 0C60H
and 0C61H.

58. Two blocks of bytes exist in 0C20H and 0C40H. When the interrupt 6. 5 key is pressed, for each
pressing the larger of 1st bytes of each block is to be written in location 0C60H. Each block
consists of 10 bytes and hence after 10 interrupts a new block shall exist in OC60H with larger
bytes of the two blocks. Disable the interrupt after the new block formation.

59. A block of 10 bytes resides in locations starting from 0C20H. Write a program to multiply each
byte by 4 and then convert it to BCD, and then multiply it by 10, and store in locations starting
from 0C40H. The largest byte could be only 30H, and result space for each processed byte shall
be 2 bytes.

60. Write a program to check the bits of a 3-byte no. stored in locations starting from 0C40H, starting
from MS bit. If the bit is 0, fill the locations starting from 0830H with 00H. If it is ‘1’ fill the
location with FFH. Thus check all bits and fill all the 24 locations with appropriate 00H or FFH
depending on the bit of the data.

61. Write a program to sort 16 signed binary bytes residing in locations starting from 0C40H in the
same locations, positive nos., first, zero next and negative nos. last. Keep the respective count of
each (in BCD) in 3 locations starting from 0C50H.

62. Ten signed binary nos. reside in locations starting from 0C60H. Write a program to add all the
positive nos. together and all the negative numbers together separately. Strip off the sign bit,
before adding. Store the respective sums in locations 0C80H and 0C82H (each sum may take 2
byte spaces.

63. A block of 12 bytes (6 positive nos. and 6 negative nos.) is residing in locations starting from
0C20H. Write a program to sort them in same locations in the following manner.
00H
Positive no.
00H
Negative no.
00H
Positive no. and so on.
64. Write a program to count the number of times identical date comes in consecutive locations until a
FFH is seen. Calculate the count of each individual identical data and store them in locations
starting from 0C20H.

65. Write a program to find out the address of the last non-blank character in a string, which is
residing in locations starting from STRING. The string ends with a carriage return. The address of
the last non-blank character shall be stored in two locations starting from LASTBLANK.

66. A string of bytes exists between 0C20H and 0C60H. The string starts where two consecutive 00H
are found and ends where 2 consecutive FFH are found. Write a program to estimate the size of
the block and keep the count in BCD in location COUNT.

67. Write a program to subtract a 4-digit BCD number residing in 2 locations starting from 0C20H
from another 6-digit BCD number residing in 3 locations starting from 0C30H and store the
difference in 3 locations starting from 0C40H.

68. A square with side ‘a’ bits in length is to be mapped in a memory base area of 8 bytes wide and 16
bits high, by making all the bits inside the square as ‘1’ bit. Write a program to achieve this. The
dimension ‘a’ given in SQUARE.

69. Write a program to divide a binary bytes ’x’ by 22/ 3 . The algorithm is
x x x
-------- = ------- - -----
22/ 3 2 8

The ‘x ‘is given in location DATA and the answer shall be stored in QUOTIENT.

70. A BCD number ‘a’ is given in location BCD. Write a program to fill memory locations starting
from 0C20H, in such way, a, a+ b, a+3b,a+5b … until the value exceeds 99 10 . The BCD no.’b’ is
given in location BCD1.

71. Given two single byte binary nos. ’a’> ‘b’, write program to convert both the nos. to BCD and
take the difference. The nos. ‘a’ and ‘b’ are given in 2 locations NUM1 and NUM2.The converted
BCD nos. and the difference shall be stored in 3 locations BCD1, BCD2 and DIFF.

72. A string of ASCII codes for small alphabets reside in locations starting from 0C21H. The count of
bytes is given in location 0C20H. Write a program to replace them with ASCII for corresponding
capital letters.

73. Given three BCD nos. ‘a,’ ‘b’, and. ‘c,’ in 3 locations NUM1, NUM2 and NUM3, write a
program to fill up locations starting from ARRAY, in the following pattern.
a, a + b , a+ b +c, a +b +c +b, a + b + c + b + c , and so on until the sum exceeds 99 10 .

74. Y = m2 – n2. The values of ‘m’ and ‘n’ are available at locations 0C20 and 0C21H (BCD nos.)
respectively. Write a program to calculate ‘y’ and store in 0C22H and 0C23H.

75. Matrix A is of size 2x2 stored row wise from location 0820H and matrix B of size 2x2 is stored
column wise from location 0830H. Write a program to subtract (B) from (A) and store the result
in locations starting from 0840H. The matrix elements are BCD nos.
76. An array of ‘m’ elements resides in locations starting from 0C23H. Write a program to insert an
element in the ‘nth’ position. Modify ‘m’ accordingly after insertion.
The value of ‘m’ is at 0C20H
The value of ‘n’ is at 0C21H
The element is given at 0C22H.

77. An array of ‘m’ elements resides in locations starting from 0C22H. Write a program to delete the
element at ‘nth’ position. Modify ‘m’ accordingly after deletion.
The value of ‘m’ is given at 0C20H
The value of ‘n’ is given at 0C21H.

78. y = ax2 + bx + c. Write a program to check, if this equation has got equal roots. The value of ‘a’.
‘b’ and ‘c’ are available in 3 locations starting from 0C20H (BCD nos.). If roots are equal, fill
location 0C23H with FFH, otherwise an error code of 00H. For the roots to be equal, the condition
b2 = 2ac has to be satisfied.

79. Given two numbers n 1 , and n 2 both BCD nos. (0-9) stored in locations 0820H and 0821H, write a
program to check the equation
n2 1 – n2 2 = (n 1 +n 2 ) (n 1 – n 2 )
Store n2 1 in 0822H, n2 2 in 0823H,
n2 1 – n2 2 in 0824H, (n 1 +n 2 ) in 0825H, (n 1 – n 2 ) in 0826H, and
(n 1+ n 2 ) (n 1 – n 2 ) in 0827H

80. Write a program to store the multiples of a no. ‘m’ from locations starting from 0C30H. The value
of ‘m’ is available at location 0C20H.Stop generation of multiples of the number ‘m’, when the
value of multiple exceeds 99. Now add all these nos. and store the result in locations 0C21H and
0C22H.

81. Write a program to store the values of m, m2, m3, m4 …….mn from locations starting from
0C20H. Each value will have 2 bytes. Stop generation of the series, when the value exceeds
9999 10 . ‘m’ is in BCD and is available in location 0C20H. The value of ‘m’ is in the range (00 –
99).

82. A set of 24 ASCII Hex codes of nos. (0 to F) and characters and a few invalid characters are
stored from locations starting from 0C20H. Write a program to convert only the valid Hex codes
into binary. Add then the numbers in binary and store the result in locations 0840H and 0841H.
The valid Hex codes are ASCII Hex codes of nos. (0 to F).

83. Write a program to multiply a 6-byte binary number given in locations starting from 0C20H, by
another 6-byte binary number given in locations starting from 0C30H. Keep the product in 12
locations starting from 0C50H.

84. Write a program to divide a double byte number given in locations starting from 0C20H, by a
single byte binary number in location 0C22H and keep the quotient in 0C23H and the remainder
in 0C24H.

85. Write a program to multiply a 4-digit BCD number given in 2 locations starting from 0C20H, by
another 4-digit BCD number given in 2 locations starting from 0C30H. Keep the product in 4
locations starting from 0C40H.
86. A block of memory starts with 0C00H. The block ends where three consecutive memories have
FFH. It is desired to serially output all these bytes through SOD pin, with MS bit first and LS bit
last. Write a program for the same.

87. An 8-bit data is serially input to SID pin of 8085, at an interval of time delay ‘DELAY’ between
each bit. Assume MS bit is input first and LS bit is input last. This byte is an ASCII code, which is
normally a 7-bit data with MS bit invalid. This ASCII code is to be converted to the respective
character and to be stored in location CHARACTER. If the byte received is anything other than
any valid ASCII code for the nos. 00H to 0FH, then the same location is to be filled with an error
code FFH. Write a program for implementing the same. Assume delay subroutine ‘DELAY’.

88. Write a program to exchange two blocks of data starting from memory locations 2401H and
2501H respectively. Length of each block is stored in memory locations 2400H and 2500H
respectively.

89. Write a subroutine to find the larger of the two integer numbers stored in BC and DE register pairs
and store this value in HL register pair.

90. A block of 32 bytes resides in memory locations starting from 2000H. Write a program to separate
the bytes, which are divisible by 16, from them and store them in locations starting from 3001H.
Keep the count of bytes divisible by 16 in 3000H.

91. Write a program to multiply a signed binary byte residing in location NUM1 by another signed
binary byte residing in location NUM2 and store the product in 2 locations staring from
PRODUCT.

Module – 3:

1. What is the difference between I/O mapped I/O and memory mapped I/O?

2. How do you interface 2K RAM with 8085?

3. How do you interface 4K RAM with 8085, with starting address 2000 H?

4. Differentiate between hardware and software interrupts.

5. What is meant by priority in interrupts? Write the order of interrupt priority in 8085.

6. What is meant masking and unmasking of interrupts? How is it done in 8085?

7. What is the advantage of Interrupt driven I/O operation over the Status check I/O?

8. Differentiate between vectored calls and vectored interrupts.

9. Differentiate between Programmed I/O and Interrupt driven I/O operation.

10. Why an interrupt subroutine normally contain an EI instruction before RET instruction?

11. Why a JMP instruction is invariably written in the vectored location of an interrupt request?

12. What are the two functions for which a ‘SIM’ instruction is used? What are the two functions for
which a ‘RIM’ instruction is used?
13. Explain how an ISR is executed, if an interrupt is received at INTR pin.

14. What is the function of 8259 PIC chip?

15. Explain how data is serially input and output in 8085.

16. What is the function of MSE bit in 8085? What is the function of R 7.5 bit?

17. Write a program to count twice the no. of times RST 6.5 key is pressed alternatively. For 1st
pressing, count is to be made 2. Second pressing is ignored. Third press again, count is to be
incremented by 2. Fourth pressing is ignored. Count shall be in BCD, and shall be stored in
location COUNT (maximum count could only 98 10 ).

18. Write a program to count the no. of times the interrupt key is pressed alternatively (even pressings
are to be counted and odd pressings to be ignored) .The count shall be in BCD and be kept in
location COUNT.

19. Write a program to input two blocks of data of 16 bytes each through port nos. 20H and 21H
respectively using RST5.5 (for first block) and RST6.5 (for second block) interrupts and store
them in two memory locations, one starting from 0C10H and the other starting from 0C30H.
Assume the time taken for loading is 10 seconds. Disable the interrupts after all the bytes in the
blocks are inputted.

20. Write a program to form a new block in 0C50H such that each byte of the new block is the smaller
of the corresponding bytes in the two blocks. (The first byte of the new block should be the
smaller of the first byte of the first block and the first byte of the second block and so on). The
two blocks which are of size 16 bytes each, are to be inputted through port nos. 20H and 21H
respectively using RST5.5 (for first block) and RST6.5 (for second block) interrupts and to be
stored in two memory locations, one starting from 0C10H and the other starting from 0C30H.
Assume the time taken for loading is 10 seconds. Disable the interrupts after all the bytes in the
blocks are inputted. The program shall include the interrupt subroutines also.

21. Using RST 7.5 interrupt, 16 bytes (maximum value of each data can be only 15H) are to be
inputted through port no. 21H. Write an ISR to input each byte, multiply by 8, convert it to BCD,
again multiply it by 10 and store them in locations starting from MULTIDATA. Ensure the
interrupts are disabled after receiving 16 bytes.

22. Interrupt requests are arriving at RST 6.5 pin, at a rate of 200 requests/second. Write a program to
utilize these pulses, to design a real time clock, which will count up to 1 hour. Keep the count of
seconds, minutes and hour in 3 memory locations SECOND, MINUTE and HOUR respectively.
Once 1 hour is over, disable the interrupts. Assume interrupting pulses are sufficiently long
enough to be recognized.

23. Pulses of two different pulse widths are coming to SID pin of 8085 alternatively. Write a program
to distinguish the pulse with larger pulse width.
24. Ten 3-byte data are stored in locations starting from 0C20H. A push button called ‘NEXT’ is
connected to RST 7.5 pin and another pushbutton called ‘PREV’ is connected to RST 6.5 interrupt
pin. Whenever ‘NEXT’ key is pressed it shall display the 3 bytes in 6 LEDS, starting with the 1st
value, and when the 10th value is displayed, it shall again start with 1st value. If PREV key is
pressed at any instant, it shall display, the previous value, and if the PREV key is again pressed
after 1st value, it shall display 10th value. For display, the address of LED are as follows:

03H 02H 01H

You have to put the address of the byte to be displayed in HL register pair, the address of LEDs is
D register, and just call the subroutine DISPLAY which will display the corresponding byte in
that location in that particular LED pair. Write a program to achieve the above.

Module – 4:

1. Distinguish between decoder logic and gate logic methods of address generation.

2. Explain the architecture of 8255 peripheral chip.

3. What are the functions of different pins of 8255?

4. Explain various modes in which 8255 ports can be programmed.

5. Explain the address generation method of 8255, if the control register address is 83H.

6. What is meant by BSR mode in 8255?

7. Explain the processes of input handshaking and output handshaking in 8255.

8. What is the special feature of port A of 8255? Which are the handshake signals involved?

9. What is the status of ports when you reset an I/O chip? Why is it necessary?

10. Explain the principle of operation of Counter method of A/D Converter.

11. Explain the principle of Successive approximation A/D Converter.

12. Explain the principle of operation of Dual slope A/D Converter.

13. Explain the functions of various pins of ADC 0801.

14. Explain the principle of Analogue multiplexed ADC.

15. How do you interface an ADC chip with 8085 using any peripheral I/O chip?

16. Where exactly the Start of conversion signal and the End of conversion signal are connected to a
counter method A/D Converter hardware? What is meant by conversion time?

17. Explain the principle of a R-2R network method D/A Converter.

18. What is the principle of Weighted Resistor network method of D/A Converter?
19. Define the following terms with respect to a DAC.
(a) Absolute accuracy (b) Relative accuracy
(c) Settling time (d) Resolution (e) Monotonicity

20. Explain the functions of all the pins of DAC 0808 chip.

21. What is a Sample and Hold circuit? Why is it required in analogue interfacing?

22. Explain the functions of various pins of LF 398 S/H chip.

23. Define the following terms with respect to a S/H chip:


(a) Acquisition time,
(b) Aperture time
(c) Droop rate

24. Why is the choice of capacitor in a sample and hold circuit is a trade off between Acquisition time
and Droop Rate?

25. Write a program to generate waveforms a, b, c, d, e and f as shown below in pins PA 0 , PA 1 , PA 2 ,


PA 3 , PA 4 and PA 5 of 8255 respectively.

1 m. sec
a 5v

0 1 m. sec

5v
b
0

2 m. sec
c 5v

0 2 m. sec
5v
d
0

4 m. sec.
5v
e
0 4 m. sec.

5v

f
0
26. A digital pressure transducer gives the digital output of pressure readings, inside a chamber as
follows:
Four valves are connected and action to be taken is as follows:

2.00 psi 000 all valves to be closed


2.30 psi 001 open valve A
2.60 psi 010 open valve B also
2.90 psi 011 open valve C also
3.20 psi 100 open all valves, and give an alarm signal.
Use 8255 port A 0 , 1 , 2 bits to input status and port B 0 , 1 , 2 , 3 , and 4 bits for valves A, B, C, D and
alarm signal respectively. Show relay configuration also.

27. Set up port A of an 8255 as input mode and port B as output mode, both in mode 1. Write a
program to input 256 bytes of data from a keyboard connected to port A and output them parallely
to a parallel printer connected to port B. Use interrupt driven configuration for both inputting and
outputting.

28. Two blocks of data of 16 bytes each are to loaded into 32 memory locations starting from DATA1
and DATA2, by RST 5.5 and RST 6.5 interrupts. Assume the time taken for loading is 5 seconds.
Write a program to form a new block in DATA3, such that each byte in the new block is the larger
of the corresponding bytes in those two blocks. (The first byte of new block shall be larger of the
first byte in the first block and the first byte in the second block and so on). The program shall
include the interrupt subroutines also. The ports used are Port A and Port B of an 8255.

29. Using RST 7.5 interrupt, 16 bytes (maximum value of each data can be only 30H) are to be
inputted through port A of 8255. Write an ISR to input each byte then multiply it by 4, convert it
to BCD and again multiply it by 10 and store in locations starting from “DATA” (32 locations are
reserved for processed data of 16 bytes). Ensure the interrupts are disabled after receiving 16
bytes.

30. Write a program to generate a wave of the form shown below. Use 8255 (Port B) as the peripheral
chip. A time delay subroutine called DEL5 gives a time delay of 5 milliseconds.

15m.sec.
+3v
10m.sec 10m .sec
+2v

5m. Sec 5m.sec


-2.5v

31. Write a program for control of a process, which requires switching on a motor for T seconds,
switch it off for T seconds, run it in the reverse direction for T seconds, switch it off for T
seconds, and then repeat the cycle. The panel is required to have indication lights for forward and
reverse direction and On/Off indication. Write a program for implementing the same. Use 8255 as
peripheral chip.
32. An 8255 I/0 chip is used to input 256 bytes of data from a key beard connected to port A and to
output them parallely that to a parallel printer connected to port B. Both the ports are used in
handshake mode and inputting in done by interrupt driven configuration (using RST 5.5), while
outputting is done by status check. Write an 8085 by program to implement the same.

33. Write a program to drive a stepper motor in full step mode, clockwise for T1 steps and then T2
steps in anticlockwise direction and repeat the cycle. Assume a delay of 20 milliseconds between
steps. Assume a delay subroutine DEL20 for the delay. For driving in full step mode the pattern to
be followed is as follows

Step SW 4 SW 3 SW 2 SW 1
1 0 0 1 1
2 1 0 0 1
3 1 1 0 0
4 0 1 1 0 Anticlockwise
1 0 0 1 1
Clockwise

Use PA 0 , PA1, PA 2 , and PA 3 of 8255 chip for relay drives, to operate switches SW 1 to SW 4

34. An 8255 I/O ports are connected to an A/D converter to acquire data for 8 analogue inputs. The
A/D converter is of 12-bit resolution. The lower 8-bits of data are connected to port A and upper
4 bits are connected to PB 0 to PB 3 pins. The select lines are connected to PC 0 , PC 1 and PC 2 , PC 3
for ALE, PC 4 is used for SOC and PB 7 is connected to EOC. Write an 8085 program to acquire
data for all the eight channels and store them in locations starting form DATA.

35. A/D converter is connected directly to an 8085 system. The address of the A/D converter is FFH.
The end of conversion of A/D converter is connected to RST 7.5 interrupt. Write a program to
convert an analogue data to a digital data and store it is location ‘DATA’. Show the connection
diagram also.

36. Write a program to implement the successive approximation of A/D conversion. Use any
hardware you require for the purpose.

37. An external voltage varies from -5 to +5V. If this voltage exceeds 3.5V, a relay is to be energized.
Use A/D converter and 8255 as peripheral chip and write a program for implementing the same.
Show the connection diagram also.

38. An 8-bit D/A connector is connected to port A of 8255 chip. Write an 8085 program to generate a
voltage waveform in which the voltage rises linearly from –3V to +3 volts and decreases to –3V at
the same rate. The cycle repeats itself.

39. Write a program to generate a waveform given by the equation


2π x 106 t
Vi = 3 Sin -----------------------------
26640.15
The DAC used has a setting time of 150 nanoseconds. Assume clock frequency of 1MHz for
8085. Use 8255 (port B) as the peripheral chip. Assume steps of 1o. Use optimum memory.
40. Write a program to generate a waveform with equation V = 3 Sin θ. Assume steps of θ = 1o. Use
8255 port A as the peripheral chip. Assume optimum memory usage. Show only 1 sample
calculation, and detailed calculations for all values are not necessary.

41. Write a program to generate signal B from signal A using ADC and DAC. Use 8255 as peripheral
chip. Use PC o for SOC and PC 7 for EOC.

+3.5v

+2

-1v
+A
-3v

+2.5v

+B
-1.5v

42. Write a program to take 150 samples of a signal at intervals of 10 m sec and store them in
locations starting from DATA. The PA 0 of 8255 is connected to Logic of Sample and Hold chip
LF308. For logic 1, the switch is closed and for logic 0, switch is opened. Acquisition time is 4/µ
sec. Show the connection diagram also. Use PC o for SOC and PC 7 for EOC.

Module – 5:

1. Explain the architecture of an 8253-timer chip.

2. What are the functions of various pins of 8253 chip?

3. Explain the address generation method of 8253 chip, if timer 0 address is 80H.

4. What are the different modes available in 8253 chip?

5. What is the effect of GATE on output waveforms in different modes of 8253 chip?

6. What is the maximum frequency and minimum frequency, you can generate using 8253 timer, if
the clock frequency is 1.5 Mega Hz?

7. What are the differences between software triggered strobe and hardware triggered strobe modes
in 8253 timer?

8. What is meant by Read on fly method in 8253 timer?

9. Explain the architecture of an 8279 key board/display interface chip.

10. Explain how an 8279 chip is used for interfacing keyboard and display.
11. Explain the functions of various pins available in 8279 chip.

12. Explain the address generation method of 8279 chip in SDK-85 kit.

13. Explain the various modes available in 8279 for display and keyboard.

14. Distinguish among Scanned Key-Board, Scanned sensor and Strobed input modes of 8279.

15. Distinguish between 2 -Key Lockout and N-Key Rollover modes in 8279.

16. How do you program the clock in 8279?

17. What is the advantage of providing auto incrementing facility in 8279?

18. Explain with the help of a block diagram how a DMA controller operates in a microcomputer
system.

19. Explain the timing diagram of 8237 DMA transfer.

20. Explain the four modes of operation of an 8237 DMA controller channel.

21. Explain the three transfer types possible in a DMA controller.

22. Draw the block diagram of 8237 DMA controller and explain function of each block.

23. Describe the various registers available in 8237 DMA controller.

24. Explain the overview of initializing 8237 DMA controller.

25. Write a program to generate a burst of 200 pulses of 1 KHz frequency, using 8253 timer. The
CLK IN frequency in 2 MHz. Gate of the timer is connected to PC o of an 8255.

26. Write a program to design a clock, which will count up to one hour. Once an hour is reached the
count as to be stopped. Use 8253 timer to interrupt the CPU at a rate of 500 times per second.
Clock frequency is 2 MHz. Gate of the timer is connected to PC o of an 8255.

27. The time taken for a chemical process (which is expected to take a few minutes) has to be
assessed exactly. An 8253 timer is used, which is to be programmed to generate pulses at the rate
of 300 pulses per second (clock frequency is 3 MHz) which can be connected to RST 7.5 interrupt
input. The process controller associated with the process will send out a pulse to RST 5.5 input as
soon as the process starts. The timer is to be started then and real time shall be maintained until
the process controller sends another pulse to RST 6.5 input, indicating the process is over. The
timer can be stopped at this instant, and the time interval is to be stored in location 3000H
(seconds), and 3001 H (minutes). Write a program to implement the same. Gate of the timer is
connected to PC o of an 8255.

28. Write a program to measure the width of a pulse, using 8253 timer 1. The pulse is received at PA 0
of 8255 and the gate 1 is connected to PB 0 of 8255.
29. Write a program to generate pulses at a rate 250 pulses/second. The pulse amplitude is – 2 Volts
and the pulse width 1.5 milliseconds. Use 8255 as the peripheral chip. Use 8253 timer to generate
interrupts at RST 7.5 of 8085. The clock frequency is 1 MHz. The gate of timer is connected to
PC0 of 8255. Show the connection diagram also. Assume DEL 1.5 subroutine for 1.5 m sec delay
is available.

30. An A/D converter output in to be inputted using 8255 port A and displayed in LEDS connected to
port B. Use port B in handshake mode. Use PC 7 for SOC. EOC is connected to STBA. CPU
checks the BFA status to sense the end of conversion. Write a program to measure the time of
conversion. Use 8253 timer for measurement of time. PC 6 is connected to gate of 8253.

31. An A/D converter output is to be inputted using 8255 port A and displayed in LEDS connected to
port B. Use port A in handshake mode. Use PC 6 for start of conversion and EOC is connected
STBA (PC 4 ). The INTRA (PC 3 ) is connected to RST 7.5 pin of 8085. The time of conversion is to
be measured using 8253 timer 2. PC 7 of 8255 is connected gate 2 of 8253. Write a program to
implement the same.

32. Write a program to generate continuous pulses at rate of 300 pulses/second. The pulse amplitude
is –2 to +3V and the pulse width is 1 millisecond. Use 8255 as the peripheral chip and 8253 timer
is to be used to generate interrupt requests at RST 7.5 pin of 8085 at a rate of 300 pulses/second.
Assume that delay subroutine of DEL 1Ms is available which gives a delay of 1 millisecond. The
timer in clock frequency of 8253 is 3.0174 MHz. PC o of 8255 is connected to gate of the timer.
Show the connection diagram also.

33. An AD converter is used to acquire data for 8 analogue inputs. The AD converter is of 14-bit
resolution. Lower 8 bits of data are connected to port A and upper 6 bits to PB 0 to PB 5 pins of an
8255 peripheral chip. The select lines are connected to PC 0 , PC 1 and PC 2 . Port C bit PC 6 is
connected to SOC of A/D converter and EOC of A/D converter is connected to STBA (PC 4 ) of
8255. 8085 checks the status of IBFA (PC 5 ) to know the end of conversion. Write a program to
acquire the digital data from all eight channels and store them in locations starting from ‘DATA’.
An 8253 timer is used to measure the average conversion time. PC 7 of 8255 is connected to
GATE 1 of 8253. Write a program to implement the same and show the connection diagram also.
Store the average conversion time in location ‘TIME’.

34. Write a program to generate continuous pulses at a rate of 300 pulses/second. The pulse amplitude
is 0 to 5V, and the pulse width is 500 microseconds. (Assume a delay subroutine DEL500 for
that). The pulse is to be generated at ‘SOD’ pin of 8085. Use 8253 timer 2 to generate RST 7.5
interrupts at an interval of 300 interrupts/sec. The timer frequency to 8253 is 3.0174 MHz. The
gate of the timer is connected to PC 0 of an 8255.

35. Using latching on the fly method, display seconds in data LEDs. Use timer 2 of 8253 in mode 0,
and steps of 10 milliseconds. For display use subroutine 036EH.

36. An event counter is needed for biscuits packing machine. After every 20 biscuits, the processor
should be interrupted, to switch the biscuits to a new box. Write a program for implementing, the
same, using 8253 timer 1. The switching is done by a relay drive, which is to be interfaced using
8255 chip. Show connection details. PC o of 8255 is connected to gate 1 of timer.

37. Write a program to measure the time taken for running a program. Use timer 0 of 8253 and gate 0
is connected to PC 0 of 8255.
38. Write a program to display SECS 10, SECS 20, SECS 30, SECS 40 etc, at an interval of 5 seconds
between each display, in the address and data LEDS. Use 8279 chip. Repeat after SECS 90.

39. Write a program to accept two BCD keys from SDK-85 keyboard and display their difference (1st
no – 2nd no) in data LEDS. If the second no received is larger than 1st no, treat it as invalid key and
wait for the next key, which is smaller. Use 8279 chip.

40. Write a program to display the following “ALL OF US ARE HERE” and rotate it in address and
data LEDS. Use 8279 chip.

41. Write a program to count the number of pulses received at SID pin of 8085 and display in data
LEDS. Use 036EH subroutine for display (the maximum count could be 99).

42. Write a program to display seconds in data LEDS. Use RST 7.5 interrupts at 40 m sec intervals.
Use timer 0 of 8253 to generate interrupts. The 8253 is gated with PC 0 of 8255. For display use
subroutine 036E H. Clock frequency is 1 MHz.

43. Write a program to accept 4 keys using 8279 chip, as shown in the following pattern and display
the product of the two bytes in the Address LEDS.

1st key 2nd key

3rd key 4th key

Product, which is to be displayed in Address LEDs.

44. Write a program to read six key information from Sensor RAM of 8279 chip. The information is
to be read form 2nd to 7th Sensor RAM.

45. In a video game scheme, you are supposed to shoot at moving stars. Stars are released by outing a
high at PA 0 of 8255. They are released at a rate of one per 600 milliseconds. Shooting is effected
by outing a high at PA 1 of 8255, by pressing a vector interrupt key TRAP, which can be manually
operated. In the event of a successful collision, it is sensed out by a sensor, which gives a rising
pulse and is connected to gate 2 of 8253. The number of successful collisions is to be displayed
immediately in data LEDs for which subroutine 036EH could be used. During the whole process,
a real time clock also runs, and when 1 minute is over, it should end the game by displaying the
final count in data LEDs and displaying ‘GAME’ in address LEDs. Use 8279 chip, and write a
program for displaying ‘GAME’ in address LEDs. After a delay, 15 seconds (assume delay
routine for this) the whole game is restarted. PC 0 and PC 1 of 8255 are connected to gate 0 and
gate 1 of 8253 timer respectively. The timer in clock frequency is 1 MHz. If it is required to
sustain the interrupt requests for 18 T states, use RS flip-flops for the same. In this case use PB
bits of 8255, to reset these flip flops, in the respective subroutines. If necessary, use logic gates but
show them in the drawing. Implement the whole scheme, showing relevant connections.

Module – 6:

1. Draw and discuss the internal block diagram of 8086.

2. What do you mean by pipelined architecture? How is it implemented in 8086?


3. Explain the concept of segmented memory? What are its advantages?

4. Explain the physical address generation in 8086.

5. Draw the register organization of 8086 and explain typical applications of each register.

6. Draw and discuss flag register of 8086.

7. How does 8086 differentiate between an opcode and instruction data?

8. Explain the typical memory organization in an 8086 system.

9. What is the maximum memory addressing and I/O addressing capability of 8086?

10. Draw and discuss a typical minimum mode 8086 system.

11. Draw and discuss a typical maximum mode 8086 system. What is the use of a bus controller in
maximum mode?

12. Bring out the architectural and signal differences between 8086/8088.

13. State and explain the different instruction formats of 8086/8088.

14. What do you mean by addressing modes? What are the different addressing modes supported by
8086? Explain each of them with suitable examples.

15. What are the different instruction types of 8086?

16. Explain the concept of virtual memory.

17. What are the salient features of 80186, 80286, 80386 and 80486?

18. Discuss the salient features of Pentium Processors.

19. Discuss the advantages and features of RISC Architecture.

20. Compare and contrast between RISC and CISC architecture.

Module - 7:

1. Discuss the advantages of microcontroller-based systems over microprocessor-based systems.

2. Discuss the salient features of 8051 family of microcontrollers.

3. Draw and discuss the internal architecture of 8051.

4. How does 8051 differentiate between the external and internal program memory?
5. Discuss the function of the following signals of 8051. (i) ALE / PROG (ii) EA / VPP (iii) PSEN
(iv) RXD (v) TXD (vi) INT0 and INT1 (vii) T0 and T1 (viii) RD (ix) WR

6. Discuss the following special function registers of 8051. (i) PCON (ii) TCON (iii) IE (iv) IP (v)
TMOD (vi) PSW (vii) SCON.

7. What is the total size of the 8051 internal RAM?

8. An 8051 ADD instruction requires one machine cycle. With a crystal resonant frequency of 12
MHz, calculate the time required to execute an ADD instruction.

9. What is the total size of a program that can be stored on the 8051 internal ROM?

10. Explain the 8051 RAM structure.

11. Interface an 8051 to external memory where the RAM size is 16K and the ROM size is 64K.

12. Explain the function of the different timer modes of 8051. What is the maximum pulse rate that
can be counted on pin T1 if the oscillator frequency is 5 MHz?

13. Explain the timer and counter control logic circuitry.

14. Explain the 8051 interrupts and timer operation.

15. What are the various internal interrupts available in the 8051?

16. How is the 8051 interrupt priority set?

Potrebbero piacerti anche