Thursday, December 31, 2009

SATA

The serial ATA (serial advanced technology attachment), or SATA computer bus, is a storage-interface for connecting host bus adapters to mass storage devices such as hard disk drives and optical drives. The SATA host adapter is integrated into almost all modern consumer laptop computers and desktop motherboards.
Serial ATA was designed to replace the older ATA (AT Attachment) standard (also known as EIDE). It is able to use the same low level commands, but serial ATA host-adapters and devices communicate via a high-speed serial cable over two pairs of conductors. In contrast, the parallel ATA (the redesignation for the legacy ATA specifications) used 16 data conductors each operating at a much lower speed.
SATA offers several compelling advantages over the older parallel ATA (PATA) interface: reduced cable-bulk and cost (reduced from eighty wires to seven), faster and more efficient data transfer, and hot swapping.
Features
Hotplug
All SATA devices support hotplugging. However, proper hotplug support requires the device be running in its native command mode not via IDE emulation, which requires AHCI (Advanced Host Controller Interface). Some of the earliest SATA host adapters were not capable of this and furthermore some older operating systems, such as Windows XP, do not directly support AHCI.
Advanced Host Controller Interface
As their standard interface, modern SATA controllers use the AHCI (Advanced Host Controller Interface), allowing advanced features of SATA such as hotplug and native command queuing (NCQ). If AHCI is not enabled by the motherboard and chipset, SATA controllers typically operate in "IDE emulation" mode which does not allow features of devices to be accessed if the ATA/IDE standard does not support them.
Windows device drivers that are labeled as SATA are usually running in IDE emulation mode unless they explicitly state that they are AHCI mode or in RAID mode. While the drivers included with Windows XP do not support AHCI, AHCI has been implemented by proprietary device drivers. Windows, Windows 7, FreeBSD, Linux with kernel version 2.6.19 onward as well as Solaris and OpenSolaris have native support for AHCI.

Cables, connectors, and ports
Connectors and cables present the most visible differences between SATA and parallel ATA drives. Unlike PATA, the same connectors are used on 3.5-inch SATA hard disks for desktop and server computers and 2.5-inch disks for portable or small computers; this allows 2.5-inch drives to be used in desktop computers with only a mounting bracket and no wiring adapter. Smaller disks may use the mini-SATA spec, suitable for small-form-factor Serial ATA drives and mini SSDs.
There is a special connector (eSATA) specified for external devices, and an optionally implemented provision for clips to hold internal connectors firmly in place. SATA drives may be plugged into SAS controllers and communicate on the same physical cable as native SAS disks, but SATA controllers cannot handle SAS disks.
There are SATA ports (on motherboards of a PC) that can use SATA data cable with locks or clips, thus, reducing the chance of accidentally unplugging while the PC is turned on. So does the same with SATA power connector and SATA data connector connected to a SATA HDD or SATA optical drive . Also, the
re are right-angled and left-angled connectors only on one end of SATA data cable, which can only be used when connecting to a SATA HDD or SATA optical drive.


Comparisons between SATA and SCSI
SCSI currently offers transfer rates higher than SATA, but it uses a more complex bus, usually resulting in higher manufacturing costs. SCSI buses also allow connection of several drives (using multiple channels, 7 or 15 on each channel), whereas SATA allows one drive per channel, unless using a port multiplier.
SATA 3 Gbit/s offers a maximum bandwidth of 300 MB/s per device compared to SCSI with a maximum of 320 MB/s. Also, SCSI drives provide greater sustained throughput than SATA drives because of disconnect-reconnect and aggregating performance. SATA devices generally link compatibly to SAS enclosures and adapters, while SCSI devices cannot be directly connected to a SATA bus.
SCSI, SAS and fibre-channel (FC) drives are typically more expensive so they are traditionally used in servers and disk arrays where the added cost is justifiable. Inexpensive ATA and SATA drives evolved in the home-computer market hence there is a view that they are less reliable. As those two worlds overlapped, the subject of reliability became somewhat controversial. Note that, generally, the failure rate of a disk drive is related to the quality of its heads, platters and supporting manufacturing processes, not to its interface.

Difference between IDE, SCSI and SATA
Integrated Drive Electronics (IDE) is one of the oldest interfaces for hard drives, marking a new era in computer history. It was the first interface to make hard drives affordable for everyone. The most prominent feature of IDE is that there was little cabling when hooking up a hard drive to the computer, which led to a hassle-free setup. IDE was introduced in 1986 Compaq computers.
Small Computer System Interface (SCSI) is a standard amongst certain devices that can be connected to a computer, such as hard drives. SCSI was introduced in 1986 as a component of Apple and Amiga computers. The basic idea was to give a faster alternative to Integrated Drive Electronics (IDE) and present an interface which almost any device can be designed to communicate with. Hard drives are the most popular devices that support SCSI, since it has a much higher bandwidth capacity than IDE. However, this high bandwidth capacity comes at a price. Most people do not find such hard drives worth the expense. Those who do invest plenty of money in SCSI hard drives are usually data centers and large companies that host their own servers.

The advent of Serial AT Attachment (SATA) in 2003 was successful and quickly became affordable to the public. The specific design of SATA was to beat the IDE benchmarks and render IDE obsolete. Its first release had a 1.5 GB/s throughput, and new versions of it just keep coming. The high bandwidth and affordability makes it perfect for home users and data centers alike. After SATA was introduced, motherboard manufacturers quickly put aside IDE and gave more importance to SATA technology.

Friday, December 11, 2009

IDE->INTEGRATED DRIVE ELECTRONICS

IDE CONTROLLER WORKS

Most personal computers have one or more of the following storage devices:

  • Floppy drive
  • Hard drive
  • CD-ROM drive
Usually, these devices connect to the computer through an Integrated Drive Electronics (IDE) interface. Essentially, an IDE interface is a standard way for a storage device to connect to a computer. IDE is actually not the true technical name for the interface standard. The original name, AT Attachment (ATA), signified that the interface was initially developed for the IBM AT computer. In this article, you will learn about the evolution of IDE/ATA, what the pinouts are and exactly what "slave" and "master" mean in IDE.

The Integrated Drive Electronics interface is the most popular way to connect a hard drive to a PC.

Drives that use the interface officially known as AT Attachment or ATA are also often called something else entirely: Integrated Drive Electronics or IDE drives. In fact, the term "IDE" is probably more widely used than the correct name for the interface! (This is changing, however, as new terms such as "Ultra ATA" grow in popularity.) IDE can be considered the unofficial "overall name" for this hard disk interface; it has been used since the earliest days of these drives, and will probably always be used by a large segment of the industry.

The reason for the name, of course, is that the IDE interface was the first where the logic board was integrated on the hard disk itself. As described in some detail in the overview and history of the interface, drives prior to this point had the hard drive control logic on a separate controller card that plugged in a system bus slot. This led to a number of compatibility and reliability problems that were corrected by mating the logic board to the hard disk itself.

The name "IDE" really reflects this design decision and has nothing to do with the interface per se. Today, all drives have integrated logic boards, including those that use interfaces quite different from ATA, such as SCSI or USB. However, habits are hard to break in the computer world, and use of the name persists. This has the potential for confusion, though most people today know that "IDE" refers to the IDE/ATA interface specifically. (One of the reasons that the name "IDE" was never adopted for the formal standards is that the developers of the standards considered it confusing.)

It's important to remember that today, being told that a particular drive is an "IDE drive" tells you only that it uses some variant of the IDE/ATA interface. "IDE" by itself is a generic term that does not tell you anything about the drive, such as what modes it supports or what official standard it adheres to. You need to find out more about the drive to understand the details of its interface.

IDE Evolution

IDE was created as a way to standardize the use of hard drives in computers. The basic concept behind IDE is that the hard drive and the controller should be combined. The controller is a small circuit board with chips that provide guidance as to exactly how the hard drive stores and accesses data. Most controllers also include some memory that acts as a buffer to enhance hard drive performance.

Before IDE, controllers and hard drives were separate and often proprietary. In other words, a controller from one manufacturer might not work with a hard drive from another manufacturer. The distance between the controller and the hard drive could result in poor signal quality and affect performance. Obviously, this caused much frustration for computer users

The birth of the IDE interface led to combining a controller like this one with a hard drive

While the IDE interface was originally developed for connecting hard drives, it has evolved into the universal interface for connecting internal floppy drives, CD-ROM drives and even some tape backup drives. Although it is very popular for internal drives, IDE is rarely used for attaching an external device.

There are several variations of ATA, each one adding to the previous standard and maintaining backward compatibility.

The standards include:

  • ATA-1 - The original specification that Compaq included in the Deskpro 386. It instituted the use of a master/slave configuration. ATA-1 was based on a subset of the standard ISA 96-pin connector that uses either 40 or 44 pin connectors and cables. In the 44-pin version, the extra four pins are used to supply power to a drive that doesn't have a separate power connector. Additionally, ATA-1 provides signal timing for direct memory access (DMA) and programmed input/output (PIO) functions. DMA means that the drive sends information directly to memory, while PIO means that the computer's central processing unit (CPU) manages the information transfer. ATA-1 is more commonly known as IDE.
  • ATA-2 - DMA was fully implemented beginning with the ATA-2 version. Standard DMA transfer rates increased from 4.16 megabytes per second (MBps) in ATA-1 to as many as 16.67 MBps. ATA-2 provides power management, PCMCIA card support and removable device support. ATA-2 is often called EIDE (Enhanced IDE), Fast ATA or Fast ATA-2. The total hard drive size supported increased to 137.4 gigabytes. ATA-2 provided standard translation methods for Cylinder Head Sector (CHS) for hard drives up to 8.4 gigabytes in size. CHS is how the system determines where the data is located on a hard drive. The reason for the big discrepancy between total hard drive size and CHS hard drive support is because of the bit sizes used by the basic input/output system (BIOS) for CHS. CHS has a fixed length for each part of the address.
  • ATA-3 - With the addition of Self-Monitoring Analysis and Reporting Technology (SMART), IDE drives were made more reliable. ATA-3 also adds password protection to access drives, providing a valuable security feature.

  • ATA-4 - Probably the two biggest additions to the standard in this version are Ultra DMA support and the integration of the AT Attachment Program Interface (ATAPI) standard. ATAPI provides a common interface for CD-ROM drives, tape backup drives and other removable storage devices. Before ATA-4, ATAPI was a completely separate standard. With the inclusion of ATAPI, ATA-4 immediately improved the removable media support of ATA. Ultra DMA increased the DMA transfer rate from ATA-2's 16.67 MBps to 33.33 MBps. In addition to the existing cable that uses 40 pins and 40 conductors (wires), this version introduces a cable that has 80 conductors. The other 40 conductors are ground wires interspersed between the standard 40 conductors to improve signal quality. ATA-4 is also known as Ultra DMA, Ultra ATA and Ultra ATA/33.

  • ATA-5 - The major update in ATA-5 is auto detection of which cable is used: the 40-conductor or 80-conductor version. Ultra DMA is increased to 66.67 MB/sec with the use of the 80-conductor cable. ATA-5 is also called Ultra ATA/66.

Cable Key

IDE devices use a ribbon cable to connect to each other. Ribbon cables have all of the wires laid flat next to each other instead of bunched or wrapped together in a bundle. IDE ribbon cables have either 40 or 80 wires. There is a connector at each end of the cable and another one about two-thirds of the distance from the motherboard connector. This cable cannot exceed 18 inches (46 cm) in total length (12 inches from first to second connector, and 6 inches from second to third) to maintain signal integrity. The three connectors are typically different colors and attach to specific items:

  • The blue connector attaches to the motherboard.
  • The black connector attaches to the primary (master) drive.
  • The grey connector attaches to the secondary (slave) drive.
Along one side of the cable is a stripe. This stripe tells you that the wire on that side is attached to Pin 1 of each connector. Wire 20 is not connected to anything. In fact, there is no pin at that position. This position is used to ensure that the cable is attached to the drive in the correct position. Another way that manufacturers make sure the cable is not reversed is by using a cable key. The cable key is a small, plastic square on top of the connector on the ribbon cable that fits into a notch on the connector of the device. This allows the cable to attach in only one position.


Masters and Slaves

A single IDE interface can support two devices. Most motherboards come with dual IDE interfaces (primary and secondary) for up to four IDE devices. Because the controller is integrated with the drive, there is no overall controller to decide which device is currently communicating with the computer. This is not a problem as long as each device is on a separate interface, but adding support for a second drive on the same cable took some ingenuity.

To allow for two drives on the same cable, IDE uses a special configuration called master and slave. This configuration allows one drive's controller to tell the other drive when it can transfer data to or from the computer. What happens is the slave drive makes a request to the master drive, which checks to see if it is currently communicating with the computer. If the master drive is idle, it tells the slave drive to go ahead. If the master drive is communicating with the computer, it tells the slave drive to wait and then informs it when it can go ahead.

The computer determines if there is a second (slave) drive attached through the use of Pin 39 on the connector. Pin 39 carries a special signal, called Drive Active/Slave Present (DASP), that checks to see if a slave drive is present.

Although it will work in either position, it is recommended that the master drive is attached to the connector at the very end of the IDE ribbon cable. Then, a jumper on the back of the drive next to the IDE connector must be set in the correct position to identify the drive as the master drive. The slave drive must have either the master jumper removed or a special slave jumper set, depending on the drive. Also, the slave drive is attached to the connector near the middle of the IDE ribbon cable. Each drive's controller board looks at the jumper setting to determine whether it is a slave or a master. This tells them how to perform. Every drive is capable of being either slave or master when you receive it from the manufacturer. If only one drive is installed, it should always be the master drive.

Many drives feature an option called Cable Select (CS). With the correct type of IDE ribbon cable, these drives can be auto configured as master or slave. CS works like this: A jumper on each drive is set to the CS option. The cable itself is just like a normal IDE cable except for one difference -- Pin 28 only connects to the master drive connector. When your computer is powered up, the IDE interface sends a signal along the wire for Pin 28. Only the drive attached to the master connector receives the signal. That drive then configures itself as the master drive. Since the other drive received no signal, it defaults to slave mode.


Thursday, December 10, 2009

USB->UNIVERSAL SERIAL BUS


Just about any computer that you buy today comes with one or more Universal Serial Bus connectors on the back. These USB connectors let you attach everything from mice to printers to your computer quickly and easily. The operating system supports USB as well, so the installation of the device drivers is quick and easy, too. Compared to other ways of connecting devices to your computer (including parallel ports, serial ports and special cards that you install inside the computer's case), USB devices are incredibly simple!

In this article, we will look at USB ports from both a user and a technical standpoint. You will learn why the USB system is so flexible and how it is able to support so many devices so easily -- it's truly an amazing system!

Anyone who has been around computers for more than two or three years knows the problem that the Universal Serial Bus is trying to solve -- in the past, connecting devices to computers has been a real headache!

  • Printers connected to parallel printer ports, and most computers only came with one. Things like Zip drives, which need a high-speed connection into the computer, would use the parallel port as well, often with limited success and not much speed.
  • Modems used the serial port, but so did some printers and a variety of odd things like Palm Pilots and digital cameras. Most computers have at most two serial ports, and they are very slow in most cases.
  • Devices that needed faster connections came with their own cards, which had to fit in a card slot inside the computer's case. Unfortunately, the number of card slots is limited and you needed a Ph.D. to install the software for some of the cards.

The goal of USB is to end all of these headaches. The Universal Serial Bus gives you a single, standardized, easy-to-use way to connect up to 127 devices to a computer.

Just about every peripheral made now comes in a USB version. A sample list of USB devices that you can buy today includes:

  • Printers
  • Scanners
  • Mice
  • Joysticks
  • Flight yokes
  • Digital cameras
  • Webcams
  • Scientific data acquisition devices
  • Modems
  • Speakers
  • Telephones
  • Video phones
  • Storage devices such as Zip drives
  • Network connections

In the next section, we'll look at the USB cables and connectors that allow your computer to communicate with these devices.

USB Hubs

Most computers that you buy today come with one or two USB sockets. With so many USB devices on the market today, you easily run out of sockets very quickly. For example, on the computer that I am typing on right now, I have a USB printer, a USB scanner, a USB Webcam and a USB network connection. My computer has only one USB connector on it, so the obvious question is, "How do you hook up all the devices?"

The easy solution to the problem is to buy an inexpensive USB hub. The USB standard supports up to 127 devices, and USB hubs are a part of the standard.

USB Cables and Connectors

Connecting a USB device to a computer is simple,we can find the USB connector on the back of your machine and plug the USB connector into it.








The rectangular socket is a typical USB socket on the back of a PC.

If it is a new device, the operating system auto-detects it and asks for the driver disk. If the device has already been installed, the computer activates it and starts talking to it. USB devices can be connected and disconnected at any time.


A typical USB connector, called an "A" connection


A typical USB four-port hub accepts 4 "A" connections.

A hub typically has four new ports, but may have many more. You plug the hub into your computer, and then plug your devices (or other hubs) into the hub. By chaining hubs together, you can build up dozens of available USB ports on a single computer.

Hubs can be powered or unpowered. As you will see on the next page, the USB standard allows for devices to draw their power from their USB connection. Obviously, a high-power device like a printer or scanner will have its own power supply, but low-power devices like mice and digital cameras get their power from the bus in order to simplify them. The power (up to 500 milliamps at 5 volts) comes from the computer. If you have lots of self-powered devices (like printers and scanners), then your hub does not need to be powered -- none of the devices connecting to the hub needs additional power, so the computer can handle it. If you have lots of unpowered devices like mice and cameras, you probably need a powered hub. The hub has its own transformer and it supplies power to the bus so that the devices do not overload the computer's supply.

The USB Process

When the host powers up, it queries all of the devices connected to the bus and assigns each one an address. This process is called enumeration -- devices are also enumerated when they connect to the bus. The host also finds out from each device what type of data transfer it wishes to perform:

  • Interrupt - A device like a mouse or a keyboard, which will be sending very little data, would choose the interrupt mode.
  • Bulk - A device like a printer, which receives data in one big packet, uses the bulk transfer mode. A block of data is sent to the printer (in 64-byte chunks) and verified to make sure it is correct.
  • Isochronous - A streaming device (such as speakers) uses the isochronous mode. Data streams between the device and the host in real-time, and there is no error correction.

The host can also send commands or query parameters with control packets.

As devices are enumerated, the host is keeping track of the total bandwidth that all of the isochronous and interrupt devices are requesting. They can consume up to 90 percent of the 480 Mbps of bandwidth that is available. After 90 percent is used up, the host denies access to any other isochronous or interrupt devices. Control packets and packets for bulk transfers use any bandwidth left over (at least 10 percent).

The Universal Serial Bus divides the available bandwidth into frames, and the host controls the frames. Frames contain 1,500 bytes, and a new frame starts every millisecond. During a frame, isochronous and interrupt devices get a slot so they are guaranteed the bandwidth they need. Bulk and control transfers use whatever space is left. The technical links at the end of the article contain lots of detail if you would like to learn more.

USB Features

The Universal Serial Bus has the following features:

  • The computer acts as the host.
  • Up to 127 devices can connect to the host, either directly or by way of USB hubs.
  • Individual USB cables can run as long as 5 meters; with hubs, devices can be up to 30 meters (six cables' worth) away from the host.
  • With USB 2.,the bus has a maximum data rate of 480 megabits per second.
  • A USB cable has two wires for power (+5 volts and ground) and a twisted pair of wires to carry the data.
  • On the power wires, the computer can supply up to 500 milliamps of power at 5 volts.
  • Low-power devices (such as mice) can draw their power directly from the bus. High-power devices (such as printers) have their own power supplies and draw minimal power from the bus. Hubs can have their own power supplies to provide power to devices connected to the hub.
  • USB devices are hot-swappable, meaning you can plug them into the bus and unplug them any time.
  • Many USB devices can be put to sleep by the host computer when the computer enters a power-saving mode.
  • The devices connected to a USB port rely on the USB cable to carry power and data.



Inside a USB cable: There are two wires for power -- +5 volts (red) and ground (brown) -- and a twisted pair (yellow and blue) of wires to carry the data. The cable is also shielded.

USB 2.0

The standard for USB version 2.0 was released in April 2000 and serves as an upgrade for USB 1.1.

USB 2.0 (High-speed USB) provides additional bandwidth for multimedia and storage applications and has a data transmission speed 40 times faster than USB 1.1. To allow a smooth transition for both consumers and manufacturers, USB 2.0 has full forward and backward compatibility with original USB devices and works with cables and connectors made for original USB, too.

Supporting three speed modes (1.5, 12 and 480 megabits per second), USB 2.0 supports low-bandwidth devices such as keyboards and mice, as well as high-bandwidth ones like high-resolution Webcams, scanners, printers and high-capacity storage systems. The deployment of USB 2.0 has allowed PC industry leaders to forge ahead with the development of next-generation PC peripherals to complement existing high-performance PCs. The transmission speed of USB 2.0 also facilitates the development of next-generation PCs and applications. In addition to improving functionality and encouraging innovation, USB 2.0 increases the productivity of user applications and allows the user to run multiple PC applications at once or several high-performance peripherals simultaneously.

Wednesday, December 9, 2009

OPTICAL DISK DRIVE






What is an Optical Disc Drive?



Optical drives retrieve and/or store data on optical discs like CDs, DVDs, and BDs (Blu-ray discs).Some common types of optical drives include CD-ROM, CD-RW, DVD-ROM, DVD?RW, and Blu-ray drives. CD and DVD writers, such as CD-R and DVD-R drives use a laser to both read and write data on the discs. The laser used for writing the data is much more powerful than the laser that reads the data, as it "burns" the bumps and dips into the disc. While optical drives can spin discs at very high speeds, they are still significantly slower than hard drives, which store data magnetically.

Optical Disc Drive Description:
An optical drive is about the size of a thick soft cover book. The front of the drive has a small Open/Close button that ejects and retracts the drive bay door. This is how media like CDs, DVDs, and BDs are inserted into and removed from the drive.The sides of the optical drive have pre-drilled, threaded holes for easy mounting in the 5.25 inch drive bay in the computer case. The optical drive is mounted so the end with the connections faces inside the computer and the end with the drive bay faces outside.The back end of the optical drive contains a port for a cable that connects to the motherboard. The type of cable used will depend on the type of drive but is almost always included with an optical drive purchase. Also here is a connection for power from the power supply.Most optical drives also have jumper settings on the back end that define how the motherboard is to recognize the drive when more than one is present. These settings vary from drive to drive so check with your optical drive manufacturer for details.

Computer interfaces
Most internal drives for personal computers, servers and workstations are designed to fit in a standard 5.25" drive bay and connect to their host via an ATA or SATA interface. External drives usually have USB or FireWire interfaces. Some portable versions for laptop use power themselves off batteries or off their interface bus.
Drives with SCSI interface exist, but are less common and tend to be more expensive, because of the cost of their interface chipsets and more complex SCSI connectors.When the optical disc drive was first developed, it was not easy to add to computer systems. Some computers such as the IBM PS/2 were standardizing on the 3.5" floppy and 3.5" hard disk, and did not include a place for a large internal device. Also IBM PCs and clones at first only included a single ATA drive interface, which by the time the CDROM was introduced, was already being used to support two hard drives. Early laptops simply had no built-in high-speed interface for supporting an external storage device.
This was solved through several techniques:
Early sound cards could include a second ATA interface, though it was often limited to supporting a single optical drive and no hard drives. This evolved into the modern second ATA interface included as standard equipment
1. A parallel port external drive was developed that connected between a printer and the computer. This was slow but an option for laptops.
2. A PCMCIA optical drive interface was also developed for laptops .
3. A SCSI card could be installed in desktop PCs for an external SCSI drive enclosure, though SCSI was typically much more expensive than other options .