Wednesday, December 10, 2008

Universal Serial Bus (III)



USB packets


USB communication taks the form of packets. Initially, all packets are sent from the host, via the root hub and possibly more hubs, to devices. Some of those packets direct a device to send some packets in reply.

After the sync field described above, all packets are made of 8-bit bytes, transmitted least-significant bit first. The first byte is a packet identifier (PID) byte. The PID is actually 4 bits; the byte consists of the 4-bit PID followed by its bitwise complement. This redundancy helps detect errors. (Note also that a PID byte contains at most four consecutive 1 bits, and thus will never need bit-stuffing, even when combined with the final 1 bit in the sync byte. However, the OUT PID byte ends with three consecutive 1 bits, so if the following USB device address begins with three 1 bits, bit-stuffing will be required.)

Packets come in three basic types, each with a different format and CRC (cyclic redundancy check):

Handshake packets

Handshake packets consist of nothing but a PID byte, and are generally sent in response to data packets. The three basic types are ACK, indicating that data was successfully received, NAK, indicating that the data cannot be received at this time and should be retried, and STALL, indicating that the device has an error and will never be able to successfully transfer data until some corrective action (such as device initialization) is performed.

USB 2.0 added two additional handshake packets, NYET which indicates that a split transaction is not yet complete, and an ERR handshake to indicate that a split transaction failed.

The only handshake packet the USB host may generate is ACK; if it is not ready to receive data, it should not instruct a device to send any.

Token packets

Token packets consist of a PID byte followed by 11 bits of address and a 5-bit CRC. Tokens are only sent by the host, never a device.-- IN and OUT tokens contain a 7-bit device number and 4-bit function number (for multifunction devices) and command the device to transmit DATAx packets, or receive the following DATAx packets, respectively.

An IN token expects a response from a device. The response may be a NAK or STALL response, or a DATAx frame. In the latter case, the host issues an ACK handshake if appropriate.

An OUT token is followed immediately by a DATAx frame. The device responds with ACK, NAK, or STALL, as appropriate.

SETUP operates much like an OUT token, but is used for initial device setup.

Every 1 ms (12000 full-speed bit times), the USB host transmits a special SOF (start of frame) token, containing an 11-bit incrementing frame number in place of a device address. This is used to synchronize isochronous data flows. High-speed USB 2.0 devices receive 7 additional duplicate SOF tokens per frame, each introducing a 125 µs "microframe".

USB 2.0 added a PING token, which asks a device if it is ready to receive an OUT/DATA packet pair. The device responds with ACK, NAK, or STALL, as appropriate. This avoids the need to send the DATA packet if the device knows that it will just respond with NAK.

USB 2.0 also added a larger SPLIT token with a 7-bit hub number, 12 bits of control flags, and a 5-bit CRC. This is used to perform split transactions. Rather than tie up the high-speed USB bus sending data to a slower USB device, the nearest high-speed capable hub receives a SPLIT token followed by one or two USB packets at high speed, performs the data transfer at full or low speed, and provides the response at high speed when prompted by a second SPLIT token. The details are complex; see the USB specification.

Data packets

There are two basic data packets, DATA0 and DATA1. Both consist of a DATAx PID field, 0–1023 bytes of data payload (up to 1024 in high speed, at most 8 at low speed), and a 16-bit CRC. They must always be preceded by an address token, and are usually followed by a handshake token from the receiver back to the transmitter. The two packet types provide the 1-bit sequence number required by Stop-and-wait ARQ. If a USB host does not receive a response (such as an ACK) for data it has transmitted, it does not know if the data was received or not; the data might have been lost in transit, or it might have been received but the handshake response was lost.

To solve this problem, the device keeps track of the type of DATAx packet it last accepted. If it receives another DATAx packet of the same type, it is acknowledged but ignored as a duplicate. Only a DATAx packet of the opposite type is actually received.

When a device is reset with a SETUP packet, it expects a DATA0 packet next.

USB 2.0 added DATA2 and MDATA packet types as well. They are used only by high-speed devices doing high-bandwidth isochronous transfers which need to transfer more than 1024 bytes per 125 µs "microframe" (8192 kB/s).

PRE "packet"

Low-speed devices are supported with a special PID value, PRE. This marks the beginning of a low-speed packet, and is used by hubs which normally do not send full-speed packets to low-speed devices. Since all PID bytes include four 0 bits, they leave the bus in the full-speed K state, which is the same as the low-speed J state. It is followed by a brief pause during which hubs enable their low-speed outputs, already idling in the J state, then a low-speed packet follows, beginning with a sync sequence and PID byte, and ending with a brief period of SE0. Full-speed devices other than hubs can simply ignore the PRE packet and its low-speed contents, until the final SE0 indicates that a new packet follows....... Continue










Data and source mostly taken from Wikipedia

Universal Serial Bus (IV)

The connectors specified by the USB committee were designed to support a number of USB's underlying goals, and to reflect lessons learned from the varied menagerie of connectors then in service

Usability

  • It is difficult to incorrectly attach a USB connector. Connectors cannot be plugged-in upside down, and it is clear from the appearance and kinesthetic sensation of making a connection when the plug and socket are correctly mated. However, it is not obvious at a glance to the inexperienced user (or to a user without sight of the installation) which way around the connector goes, so it is often necessary to try both ways. More often than not, however, the side of the connector with the "trident" logo should be on top.
  • Only a moderate insertion/removal force is needed (by specification). USB cables and small USB devices are held in place by the gripping force from the receptacle (without the need for the screws, clips, or thumbturns that other connectors require). The force needed to make or break a connection is modest, allowing connections to be made in awkward circumstances or by those with motor disabilities.
  • The connectors enforce the directed topology of a USB network. USB does not support cyclical networks, so the connectors from incompatible USB devices are themselves incompatible. Unlike other communications systems (e.g. RJ-45 cabling) gender-changers are almost never used, making it difficult to create a cyclic USB network.

Durability

  • The connectors are designed to be robust. Many previous connector designs were fragile, with pins or other delicate components prone to bending or breaking, even with the application of only very modest force. The electrical contacts in a USB connector are protected by an adjacent plastic tongue, and the entire connecting assembly is usually further protected by an enclosing metal sheath. As a result USB connectors can safely be handled, inserted, and removed, even by a small child.
  • The connector construction always ensures that the external sheath on the plug contacts with its counterpart in the receptacle before the four connectors within are connected. This sheath is typically connected to the system ground, allowing otherwise damaging static charges to be safely discharged by this route (rather than via delicate electronic components). This means of enclosure also means that there is a (moderate) degree of protection from electromagnetic interference afforded to the USB signal while it travels through the mated connector pair (this is the only location when the otherwise twisted data pair must travel a distance in parallel). In addition, the power and common connections are made after the system ground but before the data connections. This type of staged make-break timing allows for safe hot-swapping and has long been common practice in the design of connectors in the aerospace industry.
  • The newer USB micro receptacles are designed to allow up to 10,000 cycles of insertion and exertion between the receptacle and plug, compared to 500 for the standard USB and Mini-USB receptacle. This is accomplished by adding a locking device and by moving the leaf-spring connector from the jack to the plug, so that the most-stressed part is on the cable side of the connection. This change was made so that the connector on the (relatively inexpensive) cable would bear the most wear instead of the micro-USB device.

Compatibility

  • The USB standard specifies relatively loose tolerances for compliant USB connectors, intending to minimize incompatibilities in connectors produced by different vendors (a goal that has been very successfully achieved). Unlike most other connector standards, the USB specification also defines limits to the size of a connecting device in the area around its plug. This was done to prevent a device from blocking adjacent ports due to its size. Compliant devices must either fit within the size restrictions or support a compliant extension cable which does.

Two-way communication is also possible. In general, cables have only plugs, and hosts and devices have only receptacles: hosts having type-A receptacles and devices type-B. Type-A plugs only mate with type-A receptacles, and type-B with type-B. However, an extension to USB called USB On-The-Go allows a single port to act as either a host or a device — chosen by which end of the cable plugs into the socket on the unit. Even after the cable is hooked up and the units are talking, the two units may "swap" ends under program control. This facility targets units such as PDAs where the USB link might connect to a PC's host port as a device in one instance, yet connect as a host itself to a keyboard and mouse device in another instance.

Types of USB connector

There are several types of USB connectors, including some that have been added as the specification has progressed. The original USB specification detailed Standard-A and Standard-B plugs and receptacles. The first engineering change notice to the USB 2.0 specification added Mini-B plugs and receptacles. The data slots in the A - Plug are actually farther in the plug than the outside power wires to prevent data errors by powering the device first, then transferring data.

The Standard-A type of USB connectors takes on the appearance of flattened rectangles that plugs into downstream-port sockets on the USB host or a hub. This kind of connector is most frequently seen on cables that are permanently attached to a device, such as one on a cable that connects a keyboard or mouse to the computer. Standard-B connectors looks square with beveled corners, and plugs into upstream sockets on devices and hubs. The Standard-B connector is mainly used only for the device end of a removable cable, such as between a hub and a printer. This two-connector scheme prevents a user from accidentally creating a loop.

The non-standard Mini-USB's, official Mini-B, Micro-A, and Micro-B connectors are used for smaller devices such as PDAs, mobile phones or digital cameras. The Standard-A plug is approximately 4 by 12 mm, the Standard-B approximately 7 by 8 mm, and the Mini-A and Mini-B plugs approximately 2 by 7 mm.

The Micro-USB connector, was announced by the USB-IF on January 4, 2007. It is intended to replace the Mini-USB plugs used in many new smartphones and Personal digital assistants. This Micro-USB plug is rated for 10,000 connect-disconnect cycles. It is about half the height of the mini-USB connector, but features a similar width. In the Universal Serial Bus Micro-USB Cables and Connectors Specification, details have been laid down for Micro-A plugs, Micro-AB receptacles, and Micro-B plugs and receptacles, along with a Standard-A receptacle to Micro-A plug adapter. The carrier led group OMTP have recently endorsed micro-USB as the standard connector for data and power on mobile devices




Data and source mostly taken from Wikipedia

Universal Serial Bus (II)


In the version 1.x age, there were two competing HCD implementations, Open Host Controller Interface (OHCI) and Universal Host Controller Interface (UHCI). OHCI was developed by Compaq, Microsoft and National Semiconductor; UHCI was by Intel.

VIA Technologies licensed the UHCI standard from Intel; all other chipset implementers use OHCI. UHCI is more software-driven, making UHCI slightly more processor-intensive than OHCI but cheaper to implement. The dueling implementations forced operating system vendors and hardware vendors to develop and test on both implementations, which increased cost.

HCD standards are out of the USB specification's scope, and the USB specification does not specify any HCD interfaces. In other words, USB defines the format of data transfer through the port, but not the system by which the USB hardware communicates with the computer it sits in.

During the design phase of USB 2.0, the USB-IF insisted on only one implementation. The USB 2.0 HCD implementation is called the Enhanced Host Controller Interface (EHCI). Only EHCI can support hi-speed (480 Mbit/s) transfers. Most of PCI-based EHCI controllers contain other HCD implementations called 'companion host controller' to support Full Speed (12 Mbit/s) and may be used for any device that claims to be a member of a certain class. An operating system is supposed to implement all device classes so as to provide generic drivers for any USB device. Device classes are decided upon by the Device Working Group of the USB Implementers Forum.

USB implements connections to storage devices using a set of standards called the USB mass storage device class (referred to as MSC or UMS). This was initially intended for traditional magnetic and optical drives, but has been extended to support a wide variety of devices, particularly flash drives. This generality is because many systems can be controlled with the familiar idiom of file manipulation within directories (The process of making a novel device look like a familiar device is also known as extension).

Though most newer computers are capable of booting off USB Mass Storage devices, USB is not intended to be a primary bus for a computer's internal storage: buses such as ATA (IDE), Serial ATA (SATA), and SCSI fulfill that role. However, USB has one important advantage in that it is possible to install and remove devices without opening the computer case, making it useful for external drives. Originally conceived and still used today for optical storage devices (CD-RW drives, DVD drives, etc.), a number of manufacturers offer external portable USB hard drives, or empty enclosures for drives, that offer performance comparable to internal drives. These external drives usually contain a translating device that interfaces a drive of conventional technology (IDE, ATA, SATA, ATAPI, or even SCSI) to a USB port. Functionally, the drive appears to the user just like another internal drive. Other competing standards that allow for external connectivity are eSATA and FireWire.

Another use for USB Mass Storage devices is the portable running of software applications without the need of installation on the host computer, eg. Web Browser, VoIP, etc.

Human-interface devices (HIDs)

Mice and keyboards are frequently fitted with USB connectors, but because most PC motherboards still retain PS/2 connectors for the keyboard and mouse as of 2007, they are often supplied with a small USB-to-PS/2 adaptor, allowing usage with either USB or PS/2 interface. There is no logic inside these adaptors: they make use of the fact that such HID interfaces are equipped with controllers that are capable of serving both the USB and the PS/2 protocol, and automatically detect which type of port they are plugged into. Joysticks, keypads, tablets and other human-interface devices are also progressively migrating from MIDI, PC game port, and PS/2 connectors to USB.

Apple Macintosh computers have been using USB exclusively for all external wired mice and keyboards since January 1999. The original iMac raised public awareness of USB considerably in August 1998, as it discarded legacy ports to use only USB. PCs had USB ports prior to the iMac's introduction, but they were included with a full complement of traditional ports which slowed down USB's adoption. The iMac's influence can be seen in the number of USB peripherals with matching translucent, colored plastic enclosures that were available in the late '90s and early '00s.

USB signaling

USB supports three data rates:

  • The Full Speed rate of 12 Mbit/s (1.5 MB/s) is the basic USB data rate defined by USB 1.0. All USB hubs support Full Speed.
  • A Low Speed rate of 1.5 Mbit/s (187.5 kB/s) is also defined by USB 1.0. It is very similar to full speed operation except that each bit takes 8 times as long to transmit. It is intended primarily to save cost in low-bandwidth Human Interface Devices (HID) such as keyboards, mice, and joysticks.
  • A High-Speed (USB 2.0) rate of 480 Mbit/s (60 MB/s) was introduced in 2001. All high-speed devices are capable of falling back to full-speed operation if necessary.

Experimental data rate:

  • A Super-Speed (USB 3.0) rate of 4.8 Gbit/s (600 MB/s). The USB 3.0 specification was released by Intel and its partners in August 2008, according to early reports from CNET news. Products using the 3.0 specification are likely to arrive in 2009 or 2010.

USB signals are transmitted on a twisted pair data cable with 90Ω ±15% impedance, labeled D+ and D−. These collectively use half-duplex differential signaling to combat the effects of electromagnetic noise on longer lines. Transmitted signal levels are 0.0–0.3 volts for low and 2.8–3.6 volts for high in Full Speed (FS) and Low Speed (LS) modes, and -10–10 mV for low and 360–440 mV for high in High Speed (HS) mode. In FS mode the cable wires are not terminated, but the HS mode has termination of 45Ω to ground, or 90Ω differential to match the data cable impedance.

A USB connection is always between a host or hub at the "A" connector end, and a device or hub's upstream port at the other end. The host includes 15 kΩ pull-down resistors on each data line. When no device is connected, this pulls both data lines low into the so-called "single-ended zero" state (SE0 in the USB documentation), and indicates a reset or disconnected connection.

A USB device pulls one of the data lines high with a 1.5 kΩ resistor. This overpowers one of the pull-down resistors in the host and leaves the data lines in an idle state called "J". The choice of data line indicates a device's speed support; full-speed devices pull D+ high, while low-speed devices pull D− high.

USB data is transmitted by toggling the data lines between the J state and the opposite K state. USB encodes data using the NRZI convention; a 0 bit is transmitted by toggling the data lines from J to K or vice-versa, while a 1 bit is transmitted by leaving the data lines as-is. To ensure a minimum density of signal transitions, USB uses bit stuffing; an extra 0 bit is inserted into the data stream after any appearance of six consecutive 1 bits. Seven consecutive 1 bits is always an error.

A USB frame begins with an 8-bit synchronization sequence 00000001. That is, after the initial idle state J, the data lines toggle KJKJKJKK. The final 1 bit (repeated K state) marks the end of the sync pattern and the beginning of the USB frame proper.

A USB frame's end, called EOP (end-of-packet), is indicated by the transmitter driving 2 bit times of SE0 (D+ and D- both below Vil max) and 1 bit time of J state. After this, the transmitter ceases to drive the D+/D− lines and the aforementioned resistors hold it in the J (idle) state. A receiver may take extra time to decode the SE0 state, and will see the first bit time as a repetition of the last data bit. Since USB frames are always a multiple of 8 bits long, this extra "dribble bit" can be detected and ignored.

A USB bus is reset using a prolonged (10 to 20 milliseconds) SE0 signal.

USB 2.0 devices use a special protocol during reset, called "chirping", to negotiate the High-Speed mode with the host/hub. A Device that is HS capable first connects as an FS device (D+ pulled high), but upon receiving a USB RESET (both D+ and D- driven LOW by host for 10 to 20 mS) it pulls the D- line high. If the host/hub is also HS capable, it chirps (returns alternating J and K states on D- and D+ lines) letting the device know that the hub will operate at High Speed.

Clock tolerance is 480.00 Mbit/s ±500ppm, 12.000 Mbit/s ±2500 ppm, 1.50 Mbit/s ±15000 ppm.

Though Hi-Speed devices are commonly referred to as "USB 2.0" and advertised as "up to 480 Mbit/s", not all USB 2.0 devices are Hi-Speed. The USB-IF certifies devices and provides licenses to use special marketing logos for either "Basic-Speed" (low and full) or Hi-Speed after passing a compliance test and paying a licensing fee. All devices are tested according to the latest spec, so recently-compliant Low-Speed devices are also 2.0 devices.

The actual throughput currently (2006) attained with real devices is about two thirds of the maximum theoretical bulk data transfer rate of 53.248 MB/s. Typical hi-speed USB devices operate at lower speeds, often about 3 MB/s overall, sometimes up to 10–20 MB/s.


.... Continue





Data and source mostly taken from Wikipedia

USB Flash Drive (II)

File system

Most flash drives ship preformatted with the FAT or FAT 32 File system. The ubiquity of this file system allows the drive to be accessed on virtually any host device with USB support. Also, standard FAT maintenance utilities (e.g.ScanDisk ) can be used to repair or retrieve corrupted data. However, because a flash drive appears as a USB-connected hard drive to the host system, the drive can be reformatted to any file system supported by the host operating system.

Flash drives can be defragmented, but this brings little advantage as there is no mechanical head slowed down by having to move from fragment to fragment (flash drives often have very large internal sector size, especially when erasing so defragmenting means accessing fewer sectors to erase a file). Defragmenting shortens the life of the drive by making many unnecessary writes.

Some file systems are designed to distribute usage over an entire memory device without concentrating usage on any part (e.g., for a directory); this prolongs life of simple flash memory devices. USB flash drives, however, have this functionality built into the controller to prolong device life, and use of such a file system brings less advantage

Uses

Personal data transport

The most common use of flash drives is to transport and store personal files such as documents, pictures and videos. Individuals also store medical alert information on MedicTag flash drives for use in emergencies and for disaster preparation.

Secure storage of data, application and software files

With wide deployment(s) of flash drives being used in various environments (secured or otherwise), the issue of data and information security remains of the utmost importance. The use of biometrics and encryption is becoming the norm with the need for increased security for data; OTFE systems such asFreeOTFE and TrueCrypt are particularly useful in this regard, as they can transparently encrypt large amounts of data. In some cases a Secure USB Drive may use a hardware-based encryption mechanism that uses a hardware module instead of software for strongly encrypting data.

System administration

Flash drives are particularly popular among system and network administrators, who load them with configuration information and software used for system maintenance, troubleshooting, and recovery.

Computer repair

Flash drives enjoy notable success in the PC repair field as a means to transfer recovery and antivirus software to infected PCs, while allowing a portion of the host machine's data to be archived in case of emergency. As the drives have increased in storage space, they have also replaced the need to carry a number of CD ROMs and installers which were needed when reinstalling or updating a system.

Application carriers

Flash drives are used to carry applications that run on the host computer without requiring installation. While any standalone application can in principle be used this way, many programs store data, configuration information, etc. on the hard drive and registry of the host computer

The U3 company works with drive makers (parent company SanDisk as well as others) to deliver custom versions of applications designed for Microsoft Windows from a special flash drive; U3-compatible devices are designed to autoload a menu when plugged into a computer running Windows. Applications must be modified for the U3 platform and not to leave any data on the host machine. U3 also provides a software framework for ISVs interested in their platform.

Ceedo is an alternative product with the key difference that it does not require Windows applications to be modified in order for them to be carried and run on the drive.

Similarly, other application virtualization solutions, such as VMware ThinApp can be used to run software from a flash drive without installation.

A range of portable applications which are all free of charge and able to run off a computer running Windows without storing anything on the host computer's drives or registry is available from portableapps.com; unlike U3 programs which run from a special U3-compatible USB stick, the PortableApps menu will run from a standard device, but does not use the WindowsAutoRun feature.

Computer forensics and law enforcement

A recent development for the use of a USB Flash Drive as an application carrier is to carry the Computer Online Forensic Evidence Extractor (COFEE) application developed by Microsoft. COFEE is a set of applications designed to search for and extract digital evidence on computers confiscated from suspects. Forensic software should not alter the information stored on the computer being examined in any way; other forensic suites run from CD-ROM or DVD-ROM, but cannot store data on the media they are run from (although they can write to other attached devices such as external drives or memory sticks).

Booting operating systems

Most current PC firmware permits booting from a USB drive, allowing the launch of an operating system from a bootable flash drive. Such a configuration is known as a Live USB.

While a Live USB could be used for general-purpose applications, size and memory wear make them poor choices compared to alternatives. They are more suited to special-purpose or temporary tasks, such as:

  • Loading a minimal, hardened kernel for embedded applications (e.g. network router, firewall).
  • Bootstrapping an operating system install or disk cloning operation, often across a network.
  • Maintenance tasks, such as virus scanning or low-level data repair, without the primary host operating system loaded.

Audio players

Many companies make small solid-state digital audio players, essentially producing flash drives with sound output and a simple user interface. Examples include the Creative MuVo and the iPod shuffle. Some of these players are true USB flash drives as well as music players; others do not support general-purpose data storage.

Many of the smallest players are powered by a permanently fitted rechargeable battery, charged from the USB interface.




Data and source mostly taken from Wikipedia

Sound Card (II)

Since digital sound playback has become available and provided better performance than synthesis, modern soundcards with hardware polyphony don't actually use DACs with as many channels as voices, but rather perform voice mixing and effects processing in hardware (eventually performing digital filtering and conversions to and from the frequency domain for applying certain effects) inside a dedicated DSP. The final playback stage is performed by an external (in reference to the DSP chip(s)) DAC with significantly fewer channels than voices (e.g., 8 channels for 7.1 audio, which can be divided among 32, 64 or even 128 voices).

Sound cards for computers compatible with the IBM PC were very uncommon until 1988, which left the single internal PC speaker as the only way early PC software could produce sound and music. The speaker hardware was typically limited to square waves, which fit the common nickname of "beeper". The resulting sound was generally described as "beeps and boops". Several companies, most notably Access Software, developed techniques for digital sound reproduction over the PC speaker; the resulting audio, while baldly functional, suffered from distorted output and low volume, and usually required all other processing to be stopped while sounds were played. Other home computer models of the 1980s included hardware support for digital sound playback, or music synthesis (or both), leaving the IBM PC at a disadvantage to them when it came to multimedia applications such as music composition or gaming.

It is important to note that the initial design and marketing focuses of sound cards for the IBM PC platform were not based on gaming, but rather on specific audio applications such as music composition (AdLib Personal Music System, Creative Music System, IBM Music Feature Card) or on speech synthesis (Digispeech DS201, Covox Speech Thing, Street Electronics Echo). Only until Sierra and other game companies became involved in 1988 was there a switch toward gaming.

One of the first manufacturers of sound cards for the IBM PC was AdLib, who produced a card based on the Yamaha YM3812 sound chip, aka the OPL2. The AdLib had two modes: A 9-voice mode where each voice could be fully programmed, and a less frequently used "percussion" mode with 3 regular voices producing 5 independent percussion-only voices for a total of 11. (The percussion mode was considered inflexible by most developers; it was used mostly by AdLib's own composition software.)

Creative Labs also marketed a sound card about the same time called the Creative Music System. Although the C/MS had twelve voices to AdLib's nine, and was a stereo card while the AdLib was mono, the basic technology behind it was based on the Philips SAA 1099 chip which was essentially a square-wave generator. It sounded much like twelve simultaneous PC speakers would have, and failed to sell well, even after Creative renamed it the Game Blaster a year later, and marketed it through Radio Shack in the US. The Game Blaster retailed for under $100 and included the hit gameSlipheed.

A large change in the IBM PC compatible sound card market happened with Creative Labs' introduced the Sound Blaster card. The Sound Blaster cloned the AdLib, and added a sound coprocessor for recording and play back of digital audio (likely to have been an Intel microcontroller relabeled by Creative). It was incorrectly called a "DSP" to suggest it was a digital signal processor), a game port for adding a joystick, and capability to interface to MIDI equipment (using the game port and a special cable). With more features at nearly the same price, and compatibility as well, most buyers chose the Sound Blaster. It eventually outsold the AdLib and dominated the market.

The Sound Blaster line of cards, together with the first inexpensive CD-ROM drives and evolving video technology, ushered in a new era of multimedia computer applications that could play back CD audio, add recorded dialogue to computer games, or even reproduce motion video (albeit at much lower resolutions and quality in early days). The widespread decision to support the Sound Blaster design in multimedia and entertainment titles meant that future sound cards such as Media Vision's Pro Audio Spectrum and the Gravis Ultrasound had to be Sound Blaster compatible if they were to sell well. Until the early 2000s (by which the AC'97 audio standard became more widespread and eventually usurped the SoundBlaster as a standard due to its low cost and integration into many motherboards), Sound Blaster compatibility is a standard that many other sound cards still support to maintain compatibility with many games and applications released.




Data and source mostly taken from Wikipedia

Keyboard (II)

Key types

Alphanumeric keys

Alphabetical, numeric, and punctuation keys are used in the same fashion as a typewriter keyboard to enter their respective symbol into a word processing program, text editor, data spreadsheet, or other program. Many of these keys will produce different symbols when modifier keys or shift keys are pressed. The alphabetic characters become uppercase when the shift key or Caps Lock key is depressed. The numeric characters become symbols or punctuation marks when the shift key is depressed. The alphabetical, numeric, and punctuation keys can also have other functions when they are pressed at the same time as some modifier keys.

The Space bar is a horizontal bar in the lowermost row, which is significantly wider than other keys. Like the alphanumeric characters, it is also descended from the mechanical typewriter. Its main purpose is to enter the space between words during typing. It is large enough so that a thumb from either hand can use it easily. Depending on the operating system, when the space bar is used with a modifier key such as the control key, it may have functions such as resizing or closing the current window, half-spacing, or backspacing. In computer games and other applications the key has myriad uses in addition to its normal purpose in typing, such as jumping and adding marks to check boxes. In certain programs for playback of digital video, the space bar is used for pausing and resuming the playback.

Special keys

Modifier keys are special keys on a computer keyboard that modify the normal action of another key when the two are pressed in combination. For example, + in Microsoft Windows will close the program in an active window. In contrast, pressing just will probably do nothing unless assigned a specific function in a particular program. By themselves, modifier keys usually do nothing. The most widely-used modifier keys include the Control key, Shift key, and the Alt key. The AltGr key is used to access additional symbols for keys that have three symbols printed on them. On the Macintosh and Apple keyboards, the modifier keys are the Option key and Command key, respectively. On MIT computer keyboards, the Meta key is used as a modifier, and for Windows keyboards, there is a Windows key. Compact keyboard layouts often use a Fn key. "Dead keys" allow placement of diacritic mark such as an accent) on the following letter (e.g., the Compose key).

The Return key / Enter key (rarely "Execute") typically causes a command line, window form or dialog box to operate its default function, which is typically to finish an "entry" and begin the desired process. In word processing applications, pressing the enter key ends a paragraph and starts a new one.

Navigation and typing mode keys

Navigation keys include a variety of keys which move the cursor to different positions on the screen. Arrow keys are programmed to move the cursor in a specified direction; Page scroll keys, such as Page up key and the Page down key, scroll the page up and down. The Home key is used to return the cursor to the beginning of the line where the cursor is located; the End key puts the cursor at the end of the line. The Tab key advances the cursor to the next tab stop.

The Insert key is mainly used to switch between overtype mode, in which the cursor overwrites any text that is present on and after its current location, and insert mode, where the cursor inserts a character at its current position, forcing all characters past it one position further. The Delete key discards the character ahead of the cursor's position, moving all following characters one position "back" towards the freed place. On many notebook computer keyboards the key labeled Delete (sometimes Delete and Backspace are printed on the same key) serves the same purpose as a Backspace key. The Backspace key deletes the preceding character.

Lock keys lock part of a keyboard, depending on the settings selected. The lock keys are scattered around the keyboard. Most styles of keyboards have three LEDs indicating which locks are enabled, in the upper right corner above the numpad. The lock keys include Scroll lock, Num lock (which allows the use of the numeric keypad), and Caps lock.

System command keys

The SysRq / Print screen commands often share the same key. SysRq was used in earlier computers as a "panic" button to recover from crashes. The Print screen command typically captures the entire screen and sends it to the printer. The Break/Pause key no longer has a well-defined purpose. Its origins go back to teletype users, who wanted a key that would temporarily interrupt the communications line. The Break key can be used by software in several different ways, such as to switch between multiple login sessions, to terminate a program, or to interrupt a modem connection. In programming, especially old DOS-style BASIC, Pascal and C, Break is used (in conjunction with Ctrl) to stop program execution. In addition to this, Linux and variants, as well as many DOS programs, treat this combination the same as Ctrl+C. On modern keyboards, the break key is usually labeled Pause/Break. In most Windows environments, the key combination Windows key+Pause brings up the system properties.

The Escape key (often abbreviated Esc) is used to initiate an escape sequence. As most computer users no longer are concerned with the details of controlling their computer's peripherals, the task for which the escape sequences were originally designed, the escape key was appropriated by application programmers, most often to mean Stop. This use continues today in Microsoft Windows's use of escape as a shortcut in dialog boxes for No, Quit, Exit, Cancel, or Abort. A common application today of the Esc key is as a shortcut key for the Stop button in many web browsers. On machines running Microsoft Windows, prior to the implementation of the Windows key on keyboards, the typical practice for invoking the "start" button was to hold down the control key and press escape. This process still works in Windows XP and Windows Vista.

The Menu key or Application key is a key found on Windows-oriented computer keyboards. It is used launch a context menu with the keyboard rather than with the usual right mouse button. The key's symbol is a small icon depicting a cursor hovering above a menu. This key was created at the same time as the Windows key. This key is normally used when the right mouse button is not present on the mouse. Some Windows public terminals do not have a Menu key on their keyboard to prevent users from right-clicking (however, in many windows applications, a similar functionality can be invoked with the Shift+F10 keyboard shortcut).

Miscellaneous keys

Many, but not all computer keyboards have a numeric keypad to the right of the alphabetic keyboard. On Japanese/Korean keyboards, there may be Language input keys. Some keyboards have power management keys (e.g., Power key, Sleep key, and Wake key); Internet keys to access a web browser or E-mail; and/or multimedia keys such as volume controls.





Data and source mostly taken from Wikipedia





Bluetooth (II)


Bluetooth protocol stack

“Bluetooth is defined as a layer protocol architecture consisting of core protocols, cable replacement protocols, telephony control protocols, and adopted protocols”.

Mandatory protocols for all bluetooth stacks are: LMP, L2CAP and SDP

Additionally, these protocols are almost universally supported: HCI and RFCOMM

LMP (Link Management Protocol)

Used for control of the radio link between two devices. Implemented on the controller.

HCI (Host/Controller Interface)

Standardised communication between the Host stack (e.g. a PC or mobile phone OS) and the Controller (the bluetooth I.C.) This standard allows the host stack or controller I.C. to be swapped with minimal adaptation.

There are several HCI transport layer standards, each using a different hardware interface to transfer the same command, event and data packets. The most commonly used are USB (in PCs) and UART (in mobile phones and PDAs).

In bluetooth devices with simple functionality, e.g. headsets, the host stack and controller can be implemented on the same microprocessor. In this case the HCI is optional, although often implemented as an internal software interface.

L2CAP (Logical Link Control & Adaptation Protocol)

Used to multiplex multiple logical connections between two devices using different higher level protocols. Provides segmentation and reassembly of on-air packets. In basic mode, L2CAP provides reliable sequenced packets with a payload configurable up to 64kB, with 672 bytes as the minimum mandatory supported size. In retransmission & flow control modes, L2CAP can be configured for reliable or isochronous data per channel by configuring the number of retransmissions and flush timeout.

The EL2CAP specification adds an additional "enhanced mode" to the core specification, which is an improved version of retransmission & flow control modes.

SDP (Service Discovery Protocol)

Used to allow devices to discover what services each other support, and what parameters to use to connect to them. For example, when connecting a mobile phone to a bluetooth headset, SDP will be used to determine which bluetooth profiles are supported by the headset (Headset Profile, Hands Free Profile, Advanced Audio Distribution Profile etc) and the protocol multiplexor settings needed to connect to each of them. Each service is identified by a Universally Unique Identifier (UUID), with official services (Bluetooth profiles) assigned a short form UUID (16 bits rather than the full 128)

RFCOMM (Cable replacement protocol)

Radio frequency communications (RFCOMM) is the cable replacement protocol used to create a virtual serial port used to make replacement of cable technologies transparent through minimal modification of existing devices. RFCOMM provides for binary data transport and emulates EIA-232 (formerly RS-232) control signals over the Bluetooth baseband layer.

RFCOMM provides a simple reliable data stream to the user, similar to TCP. It is used directly by many telephony related profiles as a carrier for AT commands, as well as being a transport layer for OBEX over bluetooth.

Many bluetooth applications use RFCOMM because of its widespread support and publicly available API on most operating systems. Additionally, applications that used a serial port to communicate can be quickly ported to use RFCOMM.

BNEP (Bluetooth Network Encapsulation Protocol)

BNEP is used to transfer another protocol stack's data via an L2CAP channel. Its main purpose is the transmission of IP packets in the Personal Area Networking Profile. BNEP performs a similar function to SNAP in Wireless LAN.

AVCTP (Audio/Visual Control Transport Protocol)

Used by the remote control profile to transfer AV/C commands over an L2CAP channel. The music control buttons on a stereo headset use this protocol to control the music player

AVDTP (Audio/Visual Data Transport Protocol)

Used by the advanced audio distribution profile to stream music to stereo headsets over an L2CAP channel. Intended to be used by video distribution profile.

Telephony control protocol

Telephony control protocol-binary (TCS BIN) is the bit-oriented protocol that defines the call control signaling for the establishment of voice and data calls between Bluetooth devices. Additionally, “TCS BIN defines mobility management procedures for handling groups of Bluetooth TCS devices”

TCS-BIN is only used by the cordless telephony profile, which failed to attract implementers. As such it is only of historical interest.

Adopted protocols

Adopted protocols are defined by other standards-making organizations and incorporated into Bluetooth’s protocol stack, allowing Bluetooth to create protocols only when necessary. The adopted protocols include:

Point-to-Point Protocol (PPP) – Internet standard protocol for transporting IP datagrams over a point-to-point link

TCP/IP/UDP – Foundation Protocols for TCP/IP protocol suite

Object Exchange Protocol (OBEX) – Session-layer protocol for the exchange of objects, providing a model for object and operation representation

Wireless Application Environment / Wireless Application Protocol (WAE/WAP) – WAE specifies an application framework for wireless devices and WAP is an open standard to provide mobile users access to telephony and information services.



Data and source mostly taken from Wikipedia.