Devices in Windows

Before you start

Objectives: learn the difference between plug-and-play and legacy devices, different types of hardware, different hardware resources and general management concepts.

Prerequisites: no prerequisites.

Key terms: device, hardware, types, system, manager, bus, driver, settings, resources


Resources for Devices

When we install a new device, certain system resources must be assigned to the device. The computer uses these assignments to communicate with the device. Those resources are:

  • IRQ settings
  • DMA channels
  • I/O addresses

IRQ or Interrupt Request Line is the method by which devices can interact with the CPU. An IRQ allows a device to interrupt the CPU and request processing time. It can be a hardware IRQ, IRQ 0 through 15 or a logical IRQ supplied by Plug-and-Play. All new devices allow sharing of an IRQ, while older (legacy) devices had to be assigned a unique IRQ.

DMA or direct memory access allows a device to read and write directly to and from memory without using the processor. Devices such as hard drives, CD-ROM drives, tape drives, and sound cards can use DMA channels to increase the speed of data transfers. Devices must have a unique DMA channel.

Every device must have an I/O address. In fact, every device will have several I/O addresses. I/O addresses allow two devices in a computer to send information to each other. When a device wants to send information to another device, it addresses the data to the receiving I/O port number and sends it out on the system bus. Each device in a computer must have its own I/O address. An address is in a form of hexadecimal number.

Plug and Play

The plug and play (PnP) was introduced in 1995. Plug and play automatically assigns hardware resources to new devices. In order for PnP to work the system BIOS, the operating system and the device must be plug and play compliant. Plug and Play allows IRQ sharing and ensures that DMA and I/O resources used by each device are unique. Plug and Play does not replace the need for a driver. The operating system still requires a driver to be able to configure and use the device. Windows will automatically try to install appropriate drivers for PnP devices. However, there are older devices in which this was not the case. A legacy device is one that does not support Plug and Play. In that case we had to manually configure all of the required resources. These are often set up using tip switches or jumper switches, and for some devices we could do that in Device Manager in Windows. We have to be careful when we manually configure legacy devices, so they don’t interfere with existing devices that are already installed on our system. Troubleshooting of legacy systems often involved finding and resolving resource conflicts.

Device Manager

Sometimes our system will not recognize newly added device. This is generally what occurs with our legacy devices. To find more information about those devices after we have added them to the computer, we can useDevice Manager. By going to the Device Manager, we can see a lot of the statuses of our various devices. As we look at our devices, we can see whether they are working or not. If the icon for the device is not there, then Windows did not detect the device. We can try to scan for new hardware or rebooting the system to detect the device. A normal icon means the device was configured, the appropriate driver was installed, and the device is working properly. If device is not working, we will see a yellow question mark on our device. If this is the case, we may have to install the drivers manually. Drivers are small software components that allow the operating system to interface with the actual hardware so that it can control it and make it actually work. An icon with a yellow exclamation mark means the device was detected, but could not be configured properly. In this case, we should make sure that we have the latest driver for the device. An icon with a red X means the device is disabled. To identify the system resources used by a device, we should open the device properties and use the Resources tab.

Types of Devices

You will notice that we differentiate devices based on how they communicate with the computer. Some of the different types are listed below.

IDE

When adding IDE devices, remember that each IDE host bus adapter supports a maximum of two devices. When two devices per adapter are configured, we have to use Jumpers to identify a Master and a Slave device. The CMOS and BIOS typically auto-detects the devices attached to each adapter. We have to configure the BIOS to identify which devices can be used to boot the computer.

SCSI

When talking about SCSI devices, we should know that some computers have a built-in SCSI host bus adapter. For other computers, we have to install an adapter card in the PCI bus. Devices are connected in a chain. Most host bus adapters allow an internal chain and an external chain of devices. Most SCSI implementations have a limitation of seven devices (including the host bus adapter). Each device (including the host bus adapter) in the chain must have a unique ID number. This number might be set with switches or through the software. The end of the SCSI chain must be terminated. Some devices are self-terminating. Other devices require a special termination plug. We have to modify the system BIOS to boot from a SCSI device (set the device type to 0 or not installed).

Parallel

When talking about Parallel devices, we should know that Parallel ports originally supported only printers. Now we can attach a wide variety of devices to the parallel port. Windows identifies each parallel port with the designation LPT1, LPT2, etc. Parallel ports operate in three different modes: SPP (standard), EPP (enhanced, to support non-printer devices), and ECP (extended, for improved printer support). Virtually all computers support all three modes. In most cases, Windows automatically detects the device connected to a parallel port and sets the mode accordingly. To configure the port mode manually (such as to disable EPP for a port), we have to edit BIOS settings.

Serial

When talking about Serial devices, we should know that most computers have one or two serial ports. Modems and direct computer-to-computer connections typically use serial ports. Windows allocates resources to serial devices using COM1, COM2… designations. Windows XP supports up to 256 COM ports. For each serial port we can configure the data speed, data/stop bits, parity, and flow control settings. Conflicts might occur if two devices share the same COM port number.

USB

When talking about USB devices we should know that USB devices connect through hubs to form a tree bus structure. Hubs are either self-powered or bus-powered (receiving their power from another hub). Bus-powered hubs have a maximum of four ports, and supply a maximum of 100 mA of power per port. Self-powered hubs supply up to 500 mA per port and can have many ports. USB devices can be self-powered or hub-powered (receiving their power from the hub). Connect low powered devices (such as a mouse or keyboard) to either self-powered or bus-powered hubs. Connect high-powered devices (such as video cameras or scanners) to either a self-powered hub or plug the device into its own power supply. The USB bus is self-terminating and automatically assigns IDs to each device.

FireWire

When talking about FireWire devices, we should know that FireWire (also called IEEE 1394) is similar to USB, but is targeted mainly towards audio/video data transfer. FireWire is typically used for video cameras and devices requiring high-speed and guaranteed bandwidth. FireWire devices are connected in a chain. The controller automatically assigns device IDs. No termination is needed. Windows detects and configures FireWire devices automatically as they are plugged in.

Wireless

When talking about Wireless devices, we should know that common wireless interfaces include IrDA (infrared) and BlueTooth (radio frequency). BlueTooth devices are typically used for networking such as to allow a laptop to connect to a network without wires, or with other devices like mobile phones. Both the host computer and communicating devices require a transmitter/receiver. With IrDA, devices must be close and have a direct line of sight path. With BlueTooth, devices can be further away (up to 10 meters) and separated by walls or other objects in the path.

Hot Swappable Devices

Hot swappable devices can be added and removed without powering down our system. Technically speaking, hot plug refers to automatically detecting and configuring devices that are added, while hot swap refers to the ability to both add and remove devices. Hot swapping must be supported by the BIOS, the bus type or controller, the device, and the driver/operating system. Some examples of hot swappable devices are firewire, USB and even SATA devices. IDE drives are not hot swappable. When we connect a hot swappable device, Windows automatically detects the device, configures a driver (if one is not already installed), and enables the device. Before removing device from the system we should safely remove a device. We safely remove a device by clicking on the safely remove icon in system tray.

Installation and Deinstallation

Before we purchase a new device we should ensure the compatibility with our version of Windows. To do that we can check the product documentation, manufacturers website, and check Microsoft’s HCL (Hardware Compatibility List) and to ensure compatibility. When installing new devices we should begin by adding the device to the system or plugging the device in. Windows automatically detects and installs drivers for plug and play devices. Only members of the Administrators group can install new drivers, but any user can install a device and have it work with Windows if Windows already has a preinstalled driver for that device. For undetected legacy devices, we might need to run the setup program that came with the device, or use the Add New Hardware wizard to install a device driver manually, or manually set IRQ, DMA, or I/O addresses, or manually select and install the driver.

If a device is no longer used on our computer, we should begin by physically removing the device. In most cases, Windows will detect that the hardware no longer exists, and it will remove the corresponding icon in the Device Manager. If the icon remains after the hardware is removed, we can right-click the icon and select Uninstall option. This uninstalls the device from the system. If the device is no longer used, but it can not be physically removed from the computer, we can use the Disable option in Device Manager instead. For example, suppose that we have a network card that’s integrated on the motherboard, but we have installed a new network adapter and we don’t want to use the integrated NIC. In this case, we can use the Disable option to prevent the integrated network adapter from being used by Windows. Although the device still appears in the Device Manager, it can no longer be used.

Troubleshooting

Let’s say that we have just added new device to our computer, but as we power on our machine we don’t see Add New Hardware wizard. As a result of that we never saw device drivers get installed. As we go into the Device Manager, we may notice that either the device is not there, or it may be represented by yellow exclamation point. In this particular case we have several options. Since the Plug and Play did not work for us, as we go into the Device Manager, we could tell it to scan for new hardware. Sometimes this will work, but generally it won’t, because it has already scanned for devices when we powered on our computer.

Sometimes, if a device has a problem it’s because it is in conflict with some other device. In this case, we should edit the properties of the device, in Device Manager. To do that, we have to right-click on the device and select the Properties option. First we want to check the ‘Device status‘ information on the General tab. Then, typically, we need to go to the Resources tabwhere we can see resource settings for our device. We should check the I/O Range, and IRQ resources. At the bottom of the window, we can see if we have a conflicting device. We can choose typical settings from the ‘Setting based on‘ drop down list. If you have problems with I/O ranges, try to change ‘Setting based on’ to some other ‘Basic configuration 000X‘. Also, if we have problems with our IRQ resources, we should click on IRQ icon, and select the free IRQ value. We have to restart our computer after changing those options.

Another thing which we can do is use the setup software that came with our hardware device. By running the setup, it can force the system to automatically detect the hardware, install the appropriate drivers, and any other software for that particular device (for example, if it is a printer, we could get a color management software). If that particular option does not work either, then we can use the Add Hardware Wizard and see if we can force the system to recognize the new device and then be able to configure that device. As we open the Add New Hardware, it will try to scan for the devices. This often does not give any results, because the system has already scanned it when we boot up the system. If he finds one, he will ask us how to configure it, or where are it’s drivers. Otherwise we will have to manually go through the system and tell it where to find the drivers, so that the device can work properly.

If a red X appears next to the device the device is disabled. We can simply re enable the device in device manager.

Examples

Read article Devices in XP to see how to manage and troubleshoot devices in XP.

Remember

For Plug and Play devices Windows will automatically detect the device and try to install appropriate driver. The settings that are required to set up the legacy devices are IRQ settings, DMA channels and I/O addresses. To find more information about devices in Windows we can use Device Manager. Some general types of devices are IDE, SCSI, Parallel, Serial, USB, FireWire, Wirelles.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Giveaway: EaseUS Data Recovery Pro licence ($89.95 worth). Read more
+
%d bloggers like this: