1 / 24

Input/Output (I/O) Port Addresses

Input/Output (I/O) Port Addresses. Input/output (I/O) port addresses are used to communicate between devices and software. The I/O port address is used to send and receive data for a component. Each component will have a unique I/O port assigned.

Download Presentation

Input/Output (I/O) Port Addresses

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Input/Output (I/O) Port Addresses • Input/output (I/O) port addresses are used to communicate between devices and software. • The I/O port address is used to send and receive data for a component. • Each component will have a unique I/O port assigned. • There are 65,535 I/O ports in a computer, and they are referenced by a hexadecimal address in the range of 0000h to FFFFh.

  2. I/O Port and resolving the conflict ofresources

  3. Input and output port • Input and output port devices can not be interfaced to a microprocessor directly because they are not provided with necessary logic circuitry needed for direct interfacing to the processor buses. • They are usually interfaced to the processor buses through electronic circuitry called I/O Ports. • An i/o port is supposed to contain device selection logic, bus drivers, data buffers, status register, control lines, etc. • Standard i/o ports in IC forms are available.

  4. An input device is connected to the processor through an input port. • The port is the place for loading or unloading data. • The input device unloads data into an input port. • Then the microprocessor reads the data from the input port.

  5. Similarly, an output device is connected to the processor through an output port. • The microprocessor unloads data into an output port. • Then the output device receives data from the output port.

  6. nonprogrammable port • An i/o port may be programmable or nonprogrammable. • A nonprogrammable port is permanently connected to the processor to behave either as input port or output port. • If a port is connected as an input port, it will always act as an input port. • Similarly, if a port has been connected as an output port, it will always act as an output port. • The operating mode to act as input port or an output port cannot be altered by the user.

  7. programmable port • A programmable port is also permanently connected to the processor. • But it can be made to act either as input port or output port by software technique. • The same port can be programmed as an input port for one problem and as an output port for another problem. • When it has been programmed to act as input port, an input device will be connected to it. • When it has been programmed to act as an output port, an output device is connected to it.

  8. I/O ports are of two types. Programmable I/O ports and non-programmable I/O ports. Programmable I/O ports are more popular because their function can be changed by software. There is no need to change the wiring or the hardware to change the function of the I/O port. A very popular programmable I/O port chip is the Intel 8255. It will be discussed in detail in the next chapter. • On the other hand, non-programmable I/O ports require change of wiring or hardware to change its function. An example is Intel 8212, which is the topic of this chapter. As will be seen later, connection has to be changed if the 8212 has to work as an input port instead of an output port. Such non-programmable I/O ports are simple in design.

  9. Intel 8212 • It is an nonprogrammable 8-bit i/o port. • It can be used either as input port or output port. • Once a 8212 ic is connected as input port, it will always work as input port. • When it is connected as an output port, it will always work as an output port.

  10. Suppose we require one input port and two output ports in a particular system. • In this case three 8212 ics will be used. • One unit will be connected as an input and two units as output ports.

  11. Programmable Peripheral Interface • A programmable peripheral interface is a multiport device. • Its ports can be programmed in a variety of ways as required by the user. • It is very useful device for interfacing input/output device. • Some manufactures use the term “peripheral interface adapter” or “versatile interface adapter”. • The 8255 is a programmable peripheral interface.

  12. 8255 contains three 8-bit programmable ports, port A, port B and Port C. • The 8255 operates in three modes: mode 0, mode 1 and mode 2. • In mode 0, all the three ports operate as simple i/o ports. • In mode 1, the port A and port B operate in strobed input/output mode. • Pins of port C are used for their control (for handshaking signals, interrupt, etc.) • In mode 2, only port A operates.

  13. With basic I/o the I/O pin will be high or low immediately when you set or clear it in the program code.With strobed I/O the pin will only be set or cleared on the clock cycle either rising edge or falling edge. • So when you set/clear the pin in the code it will not immediately be set/cleared upon completion of the command. It will only take on the assigned state at the next clock cycle.

  14. As you add more peripherals to your system it can be difficult to find enough resources to satisfy all the requirements. This can lead to resource conflicts, which are one of the most common problems.

  15. conflict of resources • The resources in the system are limited. • Unfortunately, the demands on those resources seem to be unlimited. • Any of the following events could be diagnosed as a resource conflict: • A device transfers data inaccurately. • Your system frequently locks up.

  16. Your sound card doesn't sound quite right. • Your mouse doesn't work. • Garbage appears on your video screen for no apparent reason. • Your printer prints gibberish(Meaningless). • You can't format a floppy disk. • The PC starts in Safe mode (Windows 9x/Me) or can start only in Last Known Good Configuration (Windows 2000/XP).

  17. Resolving the conflict of resources • One way to resolve conflicts is to help prevent them in the first place. • Especially if you are building a new system, you can take several steps to avoid problems. • One is to avoid using older ISA buses. • Another way you can help is to install cards in a particular sequence and not all at once.

  18. The first time you start up a new system you have assembled or done major upgrades on, the first thing you should check is the BIOS setup. • If you have a setting for PnP operating system in your BIOS, be sure it is enabled if you are running an operating system with plug and play support, such as windows xp, etc. • Otherwise, make sure its disabled if you are running an OS that is not not plug and play, such as windows NT.

  19. On initial startup a minimum configuration with only the graphics card, memory, and storage drives (floppy, hard disk, CD-ROM, and DVD). • This allows for the least possibility of system conflicts in the initial configuration. • After the basic system has been configured ( and after you have successfully loaded your operating system and any updates or patches), you can begin adding one device at a time in a specific order. • So, you will power down, install int new device, power up, and proceed to install any necessary drives and configure the device.

  20. ADDITIONAL READING IS STRONGLY RECOMMENDED

More Related