A device driver acts as a translator between the hardware and the software that uses the devices. In other words, it intermediates between the device and the software, in order to use the device.
Some devices that are commonly connected to the computer are—keyboard, mouse, hard disk, printer, speakers, microphone, joystick, webcam, scanner, digital camera, and monitor. For proper working of a device, its corresponding device driver must be installed on the computer. For example, when we give a command to read data from the hard disk, the command is sent to the hard disk driver and is translated to a form that the hard disk can understand. The device driver software is typically supplied by the respective device manufacturers.
Programmers can write the higher-level application code independently of whatever specific hardware devices it will ultimately use, because code and device can interface in a standard way, regardless of the software superstructure, or of the underlying hardware. Each version of a device, such as a printer, requires its own hardware-specific specialized commands. In contrast, most applications instruct devices (such as a file to a printer) by means of high level generic commands for the device, such as PRINTLN (print a line). The device-driver accepts these generic high-level commands and breaks them into a series of low-level, device-specific commands, as required by the device being driven.
Nowadays, the operating system comes preloaded with some commonly used device drivers, like the device driver for mouse, webcam, and keyboard. The device drivers of these devices are preinstalled on the computer, such that the operating system can automatically detect the device when it is connected to the computer. Such devices are called plug and play devices. In case the computer does not find the device driver, it prompts the user to insert the media (like a CD which contains the corresponding device driver) provided along with the device. Most device manufacturers, host the device drivers for their devices on their companies’ websites; users can download the relevant driver and install it on their computer.
» Each device has its own device driver.
» Whenever a new device is connected to a computer, its device driver has to be loaded in the computer∙s memory, to enable use of the device. When you buy a new printer, you get the device driver CD with it. You must install the device driver on your computer, to use the new printer. Each printer comes with its own device driver. If you replace your old printer with a new model, you need to install the device driver for the new printer.
» Device drivers can be character or block device drivers. Character device drivers are for character based devices like keyboard, which transfer data character by character. Block device driver are for devices that transfer data as a block, like in hard disk.