QUESTIONS AND PROBLEMS ON BASIC I/O INTERFACE.

QUESTIONS AND PROBLEMS

1. Explain which way the data flow for an IN and an OUT instruction.

2. Where is the I/O port number stored for a fixed I/O instruction?

3. Where is the I/O port number stored for a variable I/O instruction?

4. Where is the I/O port number stored for a string I/O instruction?

5. To which register are data input by the 16-bit IN instruction?

6. Describe the operation of the OUTSB instruction.

7. Describe the operation of the INSW instruction.

8. Contrast a memory-mapped I/O system with an isolated I/O system.

9. What is the basic input interface?

10. What is the basic output interface?

11. Explain the term handshaking as it applies to computer I/O systems.

12. An even-number I/O port address is found in the ____________ I/O bank in the 8086 microprocessor.

13. In the Pentium 4, what bank contains I/O port number 000AH?

14. How many I/O banks are found in the Pentium 4 or Core2 microprocessor?

15. Show the circuitry that generates the upper and lower I/O write strobes.

16. What is the purpose of a contact bounce eliminator?

17. Develop an interface to correctly drive a relay. The relay is 12 V and requires a coil current of 150 mA.

18. Develop a relay coil driver that can control a 5.0 V relay that requires 60 mA of coil current.

19. Develop an I/O port decoder, using a 74ALS138, that generates low-bank I/O strobes, for a 16-bit microprocessor, for the following 8-bit I/O port addresses: 10H, 12H, 14H, 16H, 18H, 1AH, 1CH, and 1EH.

20. Develop an I/O port decoder, using a 74ALS138, that generates high-bank I/O strobes, for a 16-bit microprocessor, for the following 8-bit I/O port addresses: 11H, 13H, 15H, 17H, 19H, 1BH, 1DH, and 1FH.

21. Develop an I/O port decoder, using a PLD, that generates 16-bit I/O strobes for the following 16-bit I/O port addresses: 1000H–1001H, 1002H–103H, 1004H–1005H, 1006H–1007H,1008H–1009H, 100AH–100BH, 100CH–100DH, and 100EH–100FH.

22. Develop an I/O port decoder, using a PLD, that generates the following low-bank I/O strobes: 00A8H, 00B6H, and 00EEH.

23. Develop an I/O port decoder, using a PLD, that generates the following high-bank I/O strobes: 300DH, 300BH, 1005H, and 1007H.

24. Why are both BHE and BLE (A0) ignored in a 16-bit port address decoder?

25. An 8-bit I/O device, located at I/O port address 0010H, is connected to which data bus connections in a Pentium 4?

26. An 8-bit I/O device, located at I/O port address 100DH, is connected to which data bus connections in a Core2 microprocessor?

27. The 82C55 has how many programmable I/O pin connections?

28. List the pins that belong to group A and to group B in the 82C55.

29. Which two 82C55 pins accomplish internal I/O port address selection?

30. The RD connection on the 82C55 is attached to which 8086 system control bus connection?

31. Using a PLD, interface an 82C55 to the 8086 microprocessor so that it functions at I/O locations 0380H, 0382H, 0384H, and 0386H.

32. When the 82C55 is reset, its I/O ports are all initialized as .

33. What three modes of operation are available to the 82C55?

34. What is the purpose of the STB signal in strobed input operation of the 82C55?

35. Develop a time delay procedure for the 2.0 GHz Pentium 4 that waits for 80 μs.

36. Develop a time delay procedure for the 3.0 GHz Pentium 4 that waits for 12 ms.

37. Explain the operation of a simple four-coil stepper motor.

38. What sets the IBF pin in strobed input operation of the 82C55?

39. Write the software required to place a logic 1 on the PC7 pin of the 82C55 during strobed input operation.

40. How is the interrupt request pin (INTR) enabled in the strobed input mode of operation of the 82C55?

41. In strobed output operation of the 82C55, what is the purpose of the ACK signal?

42. What clears the OBF signal in strobed output operation of the 82C55?

43. Write the software required to decide whether PC4 is a logic 1 when the 82C55 is operated in the strobed output mode.

44. Which group of pins is used during bidirectional operation of the 82C55?

45. Which pins are general-purpose I/O pins during mode 2 operation of the 82C55?

46. Describe how the display is cleared in the LCD display.

47. How is a display position selected in the LCD display?

48. Write a short procedure that places an ASCII null string in display position 6 on the LCD display.

49. How is the busy flag tested in the LCD display?

50. What changes must be made to Figure 11–25 so that it functions with a keyboard matrix that contains three rows and five columns?

51. What time is usually used to debounce a keyboard?

52. Develop the interface to a three- by four-key telephone-style keypad. You will need to use a lookup table to convert to the proper key code.

53. The 8254 interval timer functions from DC to Hz.

54. Each counter in the 8254 functions in how many different modes?

55. Interface an 8254 to function at I/O port addresses XX10H, XX12H, XX14H, and XX16H.

56. Write the software that programs counter 2 to generate an 80 KHz square wave if the CLK input to counter 2 is 8 MHz.

57. What number is programmed in an 8254 counter to count 300 events?

58. If a 16-bit count is programmed into the 8254, which byte of the count is programmed first?

59. Explain how the read-back control word functions in the 8254.

60. Program counter 1 of the 8254 so that it generates a continuous series of pulses that have a high time of 100 μs and a low time of 1 μs. Make sure to indicate the CLK frequency required for this task.

61. Why does a 50% duty cycle cause the motor to stand still in the motor speed and direction control circuit presented in this chapter?

62. What is asynchronous serial data?

63. What is baud rate?

64. Program the 16550 for operation using six data bits, even parity, one stop bit, and a baud rate of 19,200 using a 18.432 MHz clock. (Assume that the I/O ports are numbered 20H and 22H.)

65. If the 16550 is to generate a serial signal at a baud rate of 2400 baud and the baud rate divisor is programmed for 16, what is the frequency of the signal?

66. Describe the following terms: simplex, half-duplex, and full-duplex.

67. How is the 16550 reset?

68. Write a procedure for the 16550 that transmits 16 bytes from a small buffer in the data segment address (DS is loaded externally) by SI (SI is loaded externally).

69. The DAC0830 converts an 8-bit digital input to an analog output in approximately .

70. What is the step voltage at the output of the DAC0830 if the reference voltage is -2.55 V?

71. Interface a DAC0830 to the 8086 so that it operates at I/O port 400H.

72. Develop a program for the interface of question 71 so the DAC0830 generates a triangular voltage wave-form. The frequency of this wave-form must be approximately 100 Hz.

73. The ADC080X requires approximately to convert an analog voltage into a digital code.

74. What is the purpose of the INTR pin on the ADC080X?

75. The WR pin on the ADC080X is used for what purpose?

76. Interface an ADC080X at I/O port 0260H for data and 0270H to test the INTR pin.

77. Develop a program for the ADC080X in question 76 so that it reads an input voltage once per 100 ms and stores the results in a memory array that is 100H bytes long.

78. Rewrite Example 11–29 using C++ with inline assembly code.

Leave a comment

Your email address will not be published. Required fields are marked *