E-Note 25839 Content Document 20241010020519PM
E-Note 25839 Content Document 20241010020519PM
E-Note 25839 Content Document 20241010020519PM
Data Transmission: In data transmission if the data can be transmitted and received,
it is a duplex transmission.
Simplex: Data is transmitted in only one direction i.e. from TX to RX only one TX
and one RX only
Half duplex: Data is transmitted in two directions but only one way at a time i.e. two
TX's, two RX’s and one line
Full duplex: Data is transmitted both ways at the same time i.e. two TX's, two RX’s
and two lines
UART COMMUNICATION
In UART communication, two UARTs communicate directly with each other. The
transmitting UART converts parallel data from a controlling device like a CPU into serial form,
transmits it in serial to the receiving UART, which then converts the serial data back into parallel
data for the receiving device. Only two wires are needed to transmit data between two UARTs.
Data flows from the Tx pin of the transmitting UART to the Rx pin of the receiving UART:
UARTs transmit data asynchronously, which means there is no clock signal to synchronize
the output of bits from the transmitting UART to the sampling of bits by the receiving UART.
Instead of a clock signal, the transmitting UART adds start and stop bits to the data packet being
transferred. These bits define the beginning and end of the data packet so the receiving UART
knows when to start reading the bits.
When the receiving UART detects a start bit, it starts to read the incoming bits at a
specific frequency known as the baud rate. Baud rate is a measure of the speed of data
transfer, expressed in bits per second (bps). Both UARTs must operate at about the same baud
rate. The baud rate between the transmitting and receiving UARTs can only differ by about 10%
before the timing of bits gets too far off.
Both UARTs must be configured to transmit and receive the same data packet structure.
HOW UART WORKS
The UART that is going to transmit data receives the data from a data bus. The data bus
is used to send data to the UART by another device like a CPU, memory, or microcontroller.
Data is transferred from the data bus to the transmitting UART in parallel form. After the
transmitting UART gets the parallel data from the data bus, it adds a start bit, a parity bit, and a
stop bit, creating the data packet. Next, the data packet is output serially, bit by bit at the Tx pin.
The receiving UART reads the data packet bit by bit at its Rx pin. The receiving UART then
converts the data back into parallel form and removes the start bit, parity bit, and stop bits.
Finally, the receiving UART transfers the data packet in parallel to the data bus on the receiving
end:
UART transmitted data is organized into packets. Each packet contains 1 start bit, 5 to 9
data bits (depending on the UART), an optional parity bit, and 1 or 2 stop bits:
START BIT
The UART data transmission line is normally held at a high voltage level when it’s
not transmitting data. To start the transfer of data, the transmitting UART pulls the transmission
line from high to low for one clock cycle. When the receiving UART detects the high to low
voltage transition, it begins reading the bits in the data frame at the frequency of the baud rate.
DATA FRAME
The data frame contains the actual data being transferred. It can be 5 bits to 9 bits long if
a parity bit is used. If no parity bit is used, the data frame can be 8 bits long. In most cases, the
data is sent with the least significant bit first.
PARITY
Parity describes the evenness or oddness of a number. The parity bit is a way for the
receiving UART to tell if any data has changed during transmission. Bits can be changed
by electromagnetic radiation, mismatched baud rates, or long distance data transfers. After the
receiving UART reads the data frame, it counts the number of bits with a value of 1 and checks if
the total is an even or odd number. If the parity bit is a 0 (even parity), the 1 bits in the data frame
should total to an even number. If the parity bit is a 1 (odd parity), the 1 bits in the data frame
should total to an odd number. When the parity bit matches the data, the UART knows that the
transmission was free of errors. But if the parity bit is a 0, and the total is odd; or the parity bit is a
1, and the total is even, the UART knows that bits in the data frame have changed.
STOP BITS
The Stop Bit, as the name suggests, marks the end of the data packet. It is usually two
bits long but often only on bit is used. In order to end the transmission, the UART maintains the
data line at high voltage (1).
2. The transmitting UART adds the start bit, parity bit, and the stop bit(s) to the data frame:
3. The entire packet is sent serially from the transmitting UART to the receiving UART. The
receiving UART samples the data line at the pre-configured baud rate:
4. The receiving UART discards the start bit, parity bit, and stop bit from the data frame:
5. The receiving UART converts the serial data back into parallel and transfers it to the data bus
on the receiving end:
ADVANTAGES AND DISADVANTAGES OF UARTS
No communication protocol is perfect, but UARTs are pretty good at what they do. Here are
some pros and cons to help you decide whether or not they fit the needs of your project:
ADVANTAGES
• Only uses two wires
• No clock signal is necessary
• Has a parity bit to allow for error checking
• The structure of the data packet can be changed as long as both sides are set up for it
• Well documented and widely used method
DISADVANTAGES
• The size of the data frame is limited to a maximum of 9 bits
• Doesn’t support multiple slave or multiple master systems
• The baud rates of each UART must be within 10% of each other
UART is one of the most simple and most commonly used Serial Communication
techniques. Today, UART is being used in many applications like GPS Receivers, Bluetooth
Modules, GSM and GPRS Modems, Wireless Communication Systems, RFID based applications
etc.
*In practice, the number of slaves is limited by the load capacitance of the system, which reduces the
ability of the master to accurately switch between voltage levels.
SLAVE SELECT
The master can choose which slave it wants to talk to by setting the slave’s CS/SS line to
a low voltage level. In the idle, non-transmitting state, the slave select line is kept at a high
voltage level. Multiple CS/SS pins may be available on the master, which allows for multiple
slaves to be wired in parallel. If only one CS/SS pin is present, multiple slaves can be wired to
the master by daisy-chaining.
MULTIPLE SLAVES
SPI can be set up to operate with a single master and a single slave, and it can be set up
with multiple slaves controlled by a single master. There are two ways to connect multiple slaves
to the master. If the master has multiple slave select pins, the slaves can be wired in parallel like
this:
If only one slave select pin is available, the slaves can be daisy-chained like this:
2. The master switches the SS/CS pin to a low voltage state, which activates the slave:
3. The master sends the data one bit at a time to the slave along the MOSI line. The slave reads
the bits as they are received:
4. If a response is needed, the slave returns data one bit at a time to the master along the MISO
line. The master reads the bits as they are received:
DISADVANTAGES
• Uses four wires (I2C and UARTs use two)
• No acknowledgement that the data has been successfully received (I2C has this)
• No form of error checking like the parity bit in UART
• Only allows for a single master
I2C combines the best features of SPI and UARTs. With I2C, you can connect multiple
slaves to a single master (like SPI) and you can have multiple masters controlling single, or
multiple slaves. This is really useful when you want to have more than one microcontroller
logging data to a single memory card or displaying text to a single LCD.
IIC protocol uses two wires for data transfer between devices: Serial Data Line (SDA)
and Serial Clock Line (SCL). The reduction in number of pins in comparison with parallel data
transfer is evident. This reduces the cost of production, package size and power consumption.
IIC is also best suited protocol for battery operated devices. IIC is also referred as two wire serial
interface (TWI).
SDA (Serial Data) – The line for the master and slave to send and receive data.
SCL (Serial Clock) – The line that carries the clock signal.
I2C is a serial communication protocol, so data is transferred bit by bit along a single wire
(the SDA line).
Like SPI, I2C is synchronous, so the output of bits is synchronized to the sampling of bits
by a clock signal shared between the master and the slave. The clock signal is always controlled
by the master.
ADDRESSING
I2C doesn’t have slave select lines like SPI, so it needs another way to let the slave know
that data is being sent to it, and not another slave. It does this by addressing. The address frame
is always the first frame after the start bit in a new message.
The master sends the address of the slave it wants to communicate with to every slave
connected to it. Each slave then compares the address sent from the master to its own address.
If the address matches, it sends a low voltage ACK bit back to the master. If the address doesn’t
match, the slave does nothing and the SDA line remains high.
READ/WRITE BIT
The address frame includes a single bit at the end that informs the slave whether the
master wants to write data to it or receive data from it. If the master wants to send data to the
slave, the read/write bit is a low voltage level. If the master is requesting data from the slave, the
bit is a high voltage level.
2. The master sends each slave the 7 or 10 bit address of the slave it wants to communicate
with, along with the read/write bit:
3. Each slave compares the address sent from the master to its own address. If the address
matches, the slave returns an ACK bit by pulling the SDA line low for one bit. If the address from
the master does not match the slave’s own address, the slave leaves the SDA line high.
6. To stop the data transmission, the master sends a stop condition to the slave by
switching SCL high before switching SDA high:
ADVANTAGES
• Only uses two wires
• Supports multiple masters and multiple slaves
• ACK/NACK bit gives confirmation that each frame is transferred successfully
• Hardware is less complicated than with UARTs
• Well known and widely used protocol
DISADVANTAGES
• Slower data transfer rate than SPI
• The size of the data frame is limited to 8 bits
• More complicated hardware needed to implement than SPI
The major goal of USB was to define an external expansion bus to add peripherals to a
PC in easy and simple manner.
USB offers users simple connectivity. It eliminates the mix of different connectors for
different devices like printers, keyboards, mice, and other peripherals. That means USB-bus
allows many peripherals to be connected using a single standardized interface socket. It supports
all kinds of data, from slow mouse inputs to digitized audio and compressed video.
USB also allows hot swapping. The "hot-swapping" means that the devices can be
plugged and unplugged without rebooting the computer or turning off the device. That means,
when plugged in, everything configures automatically. Once the user is finished, they can simply
unplug the cable out; the host will detect its absence and automatically unload the driver. This
makes the USB a plug-and-play interface between a computer and add-on devices.
USB is now the most used interface to connect devices like mouse, keyboards, PDAs,
game-pads and joysticks, scanners, digital cameras, printers, personal media players, and flash
drives to personal computers.
USB sends data in serial mode i.e. the parallel data is serialized before sends and de-
serialized after receiving.
The benefits of USB are low cost, expandability, auto-configuration, hot-plugging and
outstanding performance. It also provides power to the bus, enabling many peripherals to
operate without the added need for an AC power adapter.
USB1.0: USB 1.0 is the original release of USB having the capability of transferring
12Mbps, supporting up to 127 devices. This USB 1.0 specification model was introduced in
January 1996.
USB1.1: USB 1.1 came out in September 1998. USB 1.1 is also known as full-speed
USB. This version is similar to the original release of USB; however, there are minor
modifications for the hardware and the specifications. USB version 1.1 supported two speeds, a
full speed mode of 12Mbits/s and a low speed mode of 1.5Mbits/s.
USB2.0: Hewlett-Packard, Intel, LSI Corporation, Microsoft, NEC, and Philips jointly led
the initiative to develop a higher data transfer rate than the 1.1 specifications. The USB 2.0
specification was released in April 2000 and was standardized at the end of 2001.
Supporting three speed modes (1.5, 12 and 480 Mbps), USB 2.0 supports low-bandwidth
devices such as keyboards and mice, as well as high-bandwidth ones like high-resolution Web-
cams, scanners, printers and high-capacity storage systems.
USB 2.0, also known as hi-speed USB. This hi-speed USB is capable of supporting a
transfer rate of up to 480 Mbps, compared to 12 Mbps of USB 1.1. That's about 40 times as fast!
Wow!
USB3.0: USB 3.0 is the latest version of USB release. It is also called as Super-Speed
USB having a data transfer rate of 4.8Gbps (600 MB/s). That means it can deliver over 10x the
speed of today's Hi-Speed USB connections.
The USB 3.0 specification was released by Intel and its partners in August 2008.
Products using the 3.0 specifications are come out in 2010.
The USB "tiered star" topology:
The USB system is made up of a host, multiple numbers of USB ports, and multiple
peripheral devices connected in a tiered-star topology.
The host is the USB system's master, and as such, controls and schedules all
communications activities. Peripherals, the devices controlled by USB, are slaves responding to
commands from the host. USB devices are linked in series through hubs. There always exists
one hub known as the root hub, which is built in to the host controller.
Connecting a USB device to a computer is very simple -- you find the USB connector on
the back of your machine and plug the USB connector into it. 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.
The baud-rate divisor (BRD) has the following relationship to the system clock,
where BRDI is the integer part of the BRD and BRDF is the fractional part, separated by a
decimal place.
TI Tiva Launchpad system clock is 16 MHz so desired Baud Rate can be calculated as:
Example:
System clock of TI Tiva Launchpad is16 MHz 16MHz is divided by 16 and it is fed
into UART. So UART operates at 1MHz frequency. So ClkDiv = 1MHz.
To generate a baud rate of 4800: 1MHz/4800 = 208.33
(a) 1MHz/4800 = 208.33, UARTIBRD=208 & UARTFBRD = (0.33×64) + 0.5 = 21.83 =21
(b) 1MHz/9600 = 104.166666, UARTIBRD = 104 & UARTFBRD = (0.16666×64) +0.5=11
(c) 1MHz/57600 = 17.361, UARTIBRD = 17 and UARTFBRD = (0.361 × 64) + 0.5 =23
(d) 1MHz/115200 = 8.680, UARTIBRD = 8 and UARTFBRD = (0.680 × 64) +0.5=44
Serial IR (SIR):
UART includes an IrDA (Infrared) serial IR encoder-decoder block. SIR block
converts the data between UART and half-duplex serial SIR interface. The SIR block
provides a digitally encoded output and decoded input to UART. SIR block uses UnTx and
UnRx pins for SIR interface. These pins are connected to IrDA SIR physical layer link. SIR
block supports half-duplex communication. The IrDA SIR physical layer specifies a
minimum 10-ms delay between transmission and reception. The SIR block has two modes of
operation normal mode and low power mode.
ISO 7816 Support: UART support ISO 7816 smartcard communication. The UnTx signal is
used as a bit clock and the UnRx signal is used as the half-duplex communication line
connected to the smartcard. Any GPIO signal can be used to generate the reset signal to the
smartcard.
UART Control Register (UARTCTL):
This is a 32-bit register. The most important bits are RXE, TXE, HSE, and UARTEN.
Data should be placed in data register before transmission. Only lower 8 bits are used.
In a similar way, the received byte should be read and saved in memory before it gets
overwrite by next byte. During reception, we use other four bits (8, 9, 10 and 11) to detect
error, parity etc. Another set of registers are used to check the source of error.
(UARTRSR/UARTRCR)
• TXFE (TX FIFO Empty): Transmitter loads one byte for transmission from the FIFO
buffer.
• When FIFO becomes empty, the TXFE is raised. The transmitter then frames the byte
and sends it out via TxD pin bit by bit serially.
• RXFF (RX FIFO Full): When a byte of data is received, byte is placed in Data
register and RXFF (RX FIFO full) flag bit is raised after receiving the complete byte.
• TXFF (TX FIFOI Full): When the transmitter is not busy, it loads one byte from the
FIFO buffer and the FIFO is not full anymore and the TXFF is lowered. We can
monitor TXFF flag and upon going LOW we can write another byte to the Data
register.
UART Transmission
Step to perform UART Transmission:
Clock should be enabled to IIC module and system control register (SYSCTL) RCGCI2C
needs to be programmed.
To enable the clock SYSCTL ->RCGCI2C | = 0x0F will enable clock to all four modules.
Clock Speed: I2CMTPR (I2C Master Timer Period) register is programmed to set the clock
frequency for SCL.
Slave Address:
In a master device, the slave address is stored in I2CMSA. Addresses in I2C
communication is 7-bits. I2CMSA stores D7 to D1 bits and LSB of D0 indicate master is
receiver of transmitter.
Data Register:
In transmit mode, a byte of data will be placed in I2CMDR (I2C Master Data
Register) for transmission.
(a) (b)
Figure: Data transmission using (a) Master Single Transmit, (b) Single Master Receive
Implementing and Programming SPI:
Serial peripheral interface (SPI) is a serial communication interface originally
designed by Motorola in late eighties. SPI and I2C came into existence almost at the same
time. Most of the modern day microcontrollers will support SPI protocol. Both SPI and I2C
offer good support for communication with low-speed devices, but SPI is better suited to
applications in which devices transfer data streams. Some devices use the full-duplex mode to
implement an efficient, swift data stream for applications such as digital audio, digital signal
processing, or telecommunications channels, but most off-the-shelf chips stick to half-duplex
request/response protocols.
SPI is used to talk to a variety of peripherals, such a
• Sensors: temperature, pressure, ADC, touchscreens, video game controllers
• Control devices: audio codecs, digital potentiometers, DAC
• Camera lenses: Canon EF lens mount
• Memory: flash and EEPROM
• Real-time clocks
• LCD, sometimes even for managing image data
• Any MMC or SD card
Description: SPI is a synchronous serial communication protocol like I2C, where master
generates clock and data transfer between master and slave happens with respect to clock.
Both master and slave devices will have shift registers connected to input (MISO for master
and MOSI for slave) and output (MOSI for master and MISO for slave) as shown in figure.
Clock to SSI: RCGCSSI register is used to enable the clock to SSI modules. We need
to write RCGSSI = 0x0F to enable the clock to all SSI modules.
Figure: Synchronous Serial Interface Run Mode Clock Gating Control CRCG (SSI) Register
Configuring the SSI:
SSICR0 (SSI control register 0) is used to configure the SSI. The generic SPI is used
to transfer the byte size of data, the SSI in Tiva microcontroller allows transfer of data
between 4 bits to 16bits.
Bit Rate:
SSI module clock source can be either from System Clock or PIOSC (Precision
Internal Oscillator). The selected frequency is fed to pre-scaler before it is used by the Bit
Rate circuitry. The CPSDVSR (CPS Divisor) value comes from the pre-scaler divisor
register. The lower 8 bits of SSICPSR (SSI Clock Prescale) register are used to divide the
CPU clock before it is fed to the Bit Rate circuitry. Only even values can be used for the pre-
scaler since the D0 must be 0. For the pre-scaler register, the lowest value is 2 and the highest
is 254.
The SSICR0 (SSI Control register 0) allows the Bit Rate selection among other
things. The output of clock pre-scaler circuitry is divided by 1 + SCR and then used as the
SSI baud rate clock. The value of SCR can be from 0 to 255. The below formula is used to
calculate the bit rate.
Bit Rate (BR): BR=SysClk/(CPSDVSR × (1 + SCR))
History
ISA stands for Industry standard architecture. It was the original IBM expansion
bus and initially no standard was assigned to it. Its first version was the 8 bit bus
and it ran at the speed of about 7 MHz.
In 1984, with the advent of PCAT (Intel 286), the bus width is increased to 16bits
and the frequency successively 6 to 8 MHz, 8.33 MHz and finally, providing
a theoretical maximum of 16MB /s (in practice only 8 MB/ s as a cycle of two was
used for addressing).
The second generation of PC's used 16 bit ISA expansion bus which also ran at the
same speed i.e. 7 MHz initially. The later cards allow speed of 8.33 MHz for the 16
bit ISA bus. Nowadays the I/O devices are much faster than their speed but still
the ISA connectors are usually included in PC's to make them backward
compatible with the slower ISA cards.
Current motherboards no longer include ISA bus, PCI bus replaced by the faster
and Plug & Play.
ISA bus architecture
ISA bus architecture is the basis of personal computer. 8-bit ISA bus is used in
single user systems with 80386 and 80486 processors. There are 24 address lines
and '16 data lines in it. It operates at 8 MHz and 2 to 8 clock cycles are needed to
transfer data. The data transfer rate of the system is less when 8-bit ISA bus is
used with 32 bit processor having 32 bit address and data bus. So, 16 bit ISA bus is
used to transfer data. Many peripherals such as disk controller, printer, and
scanner can be connected to ISA bus.
Introduction to PCI protocol
Today’s computer systems, with their emphasis on high resolution graphics, full
motion video, high bandwidth networking, and so on, go far beyond the
capabilities of the architecture that ushered in the age of the personal computer
in 1982. Modern PC systems demand high performance interconnects that also
allow devices to be changed or upgraded with a minimum of effort by the end
user.
In response to this need, PCI (peripheral component interconnect) has emerged
as the dominant mechanism for interconnecting the elements of modern, high
performance computer systems. It is a well thought out standard with a number
of forward looking features that should keep it relevant well into the next
century. Originally conceived as a mechanism for interconnecting peripheral
components on a motherboard, PCI has evolved into at least a half dozen
different physical implementations directed at specific market segments yet all
using the same basic bus protocol. In the form known as Compact PCI, it is having
a major impact in the rapidly growing telecommunications market.
PCI offers a number of significant performance and architectural advantages over
previous busses:
Speed: The basic PCI protocol can transfer up to 132 Mbytes per second, well
over an order of magnitude faster than ISA. Even so, the demand for bandwidth is
insatiable. Extensions to the basic protocol yield bandwidths as high as 512
Mbytes per second and development currently under way will push it to a
gigabyte.
Configurability: PCI offers the ability to configure a system automatically,
relieving the user of the task of system configuration. It could be argued that PCI’s
success owes much to the very fact that users need not be aware of it.
Multiple Masters: Prior to PCI, most busses supported only one “master,” the
processor. High bandwidth devices could have direct access to memory through a
mechanism called DMA (direct memory access) but devices, in general, could not
talk to each other. In PCI, any device has the potential to take control of the bus
and initiate transactions with any other device.
Reliability: “Hot Plug” and “Hot Swap,” defined respectively for PCI and Compact
PCI, offer the ability to replace modules without disrupting a system’s operation.
This substantially reduces MTTR (mean time to repair) to yield the necessary
degree of up-time required of mission-critical systems such as the telephone
network.
History of ISA
The ISA (Industry Standard Architecture) port has been nearly as long as the PC
itself. Created in 1981 and updated in 1983, the ISA standard served as an
interface between add-on cards and motherboards. ISA proved to be a harbinger
of an explosion in consumer add-on component demand. While other standards
were produced, e.g., AGP and VLB, ISA endured as the most supported and
utilized I/O standard. This was helped along due heavy investment by industry
and military institutions. Consequently, though practically extinct on PCs and
laptops, motherboards are still produced with ISA. Many specialized industry and
military situations still require the old standby, ISA. ISA has also proven to be a
reliable standard that has been leveraged by subsequent technologies. All
modern internal hard drives use some variant of the specifications.
History of PCI
For many years, ISA and PCI were equivalents. Because PCI was introduced as a
complement to, rather than a direct competitor to ISA, it is not uncommon for
motherboards to have both ISA and PCI ports. ISA, at least for a time, was
concurrent with the PCI standard. ISA would give better performance in some
areas, while PCI yielded better performance in other areas.
In physical appearance the ISA and PCI ports are vastly different. The ISA is longer
(by about two inches), and thus the I/O cards that connect via ISA tend to be
bulkier as well. Their differences do not stop there. PCI is a significantly faster (in
theory) bus. PCI has double (or in rare instances, quadruple) the bit-width,
resulting in faster data transfer.
When placed head-to-head, PCI is definitely the better and faster option. Which is
to be expected, considering PCI is a full ten years newer. While, in 2010, ISA is
practically obsolete and PCI is well on its way to extinction as PCI-E and Mini-PCI-E
gain steam, they are still in use by many consumers and industries. ISA and PCI
made a significant impact on the computer industry.
ISA: The 16-bit ISA interface is defined by the IBM PC/AT and it is also called the
AT Bus. Its data transfer rate is only 8.33MHz which is 16.66Mbytes/s (8.33MHz *
2 bytes). And the most significant feature of the ISA interface is that it cannot
support PnP (Plug and Play) function, so we have to configure the setting in the
software to make sure it is corresponding to the setting on the hardware. By the
way, since the performance and transfer quality of the ISA bus are worse than the
PCI bus, it is replaced by the PCI, AGP, and USB interface gradually.
PCI: The “Peripheral Component Interconnect” interface which means PCI is the
most common interface in modern computer. It had displaced the ISA bus as the
standard expansion bus. Compare to the ISA bus, there are several superiorities
for the PCI bus. For instance, the data transfer rate for the 32-bit PCI standard bus
can be as high as 133Mbytes/s (33MHz), and the PCI bus can support PnP function
so that the system will configure the device setting automatically. Besides, most
of the PCI bus can support either 5V or 3.3V power suppliers (lower than ISA bus)
which we usually call the “Universal Bus”.
What is FireWire?
Let's say you have your digital camcorder connected to your home computer.
When your computer powers up, it queries all of the devices connected to the bus
and assigns each one an address, a process called enumeration. FireWire is plug-
and-play, so if you connect a new FireWire device to your computer,
the operating system auto-detects it and asks for the driver disc. If you've already
installed the device, the computer activates it and starts talking to it. FireWire
devices are hot pluggable, which means they can be connected and disconnected
at any time, even with the power on.
FireWire Specifications
The original FireWire specification, FireWire 400 (1394a), was faster
than USB when it came out. FireWire 400 is still in use today and features:
In the next section, we'll get deeper into the FireWire vs. USB debate.
The key difference between FireWire and USB is that FireWire is intended for
devices working with a lot more data -- things like camcorders, DVD players and
digital audio equipment. FireWire and USB share a number of characteristics but
differ in some important ways.
Implementing FireWire costs a little more than USB, which led to the adoption of
USB as the standard for connecting most peripherals that do not require a high-
speed bus.
Speed aside, the big difference between FireWire and USB 2.0 is that USB 2.0
is host-based, meaning that devices must connect to a computer in order to
communicate. FireWire is peer-to-peer, meaning that two FireWire cameras can
talk to each other without going through a computer.
FireWire 800 cables use a 9-pin configuration. Six of those pins are the same as
the six pins in the 1394a connector (shown above). Two of the added pins provide
a "grounded shield" to protect the other wires from interference, and the third
added pin does nothing at this time [ref].
FireWire uses 64-bit fixed addressing, based on the IEEE 1212 standard. There are
three parts to each packet of information sent by a device over FireWire:
A 10-bit bus ID that is used to determine which FireWire bus the data came
from
A 6-bit physical ID that identifies which device on the bus sent the data
A 48-bit storage area that is capable of addressing 256 terabytes of
information for each node
The bus ID and physical ID together comprise the 16-bit node ID, which allows for
64,000 nodes on a system. Data can be sent through up to 16 hops (device to
device). Hops occur when devices are daisy-chained together. Look at the
example below. The camcorder is connected to the external hard drive connected
to Computer A. Computer A is connected to Computer B, which in turn is
connected to Computer C. It takes four hops for Computer C to access the
camera.
Assuming all of the devices in this setup are equipped with FireWire 800, the
camcorder can be up to 400 meters from Computer C.
Now that we've seen how FireWire works, let's take a closer look at one of its
most popular applications: streaming digital video.
FireWire really shines when it comes to digital video applications. Most digital
video cameras or camcorders now have a FireWire plug. When you attach a
camcorder to a computer using FireWire, the connection is amazing.
An important element of FireWire is the support of isochronous devices.
In isochronous mode, data streams between the device and the host in real-time
with guaranteed bandwidth and no error correction. Essentially, this means that a
device like a digital camcorder can request that the host computer allocate
enough bandwidth for the camcorder to send uncompressed video in real-time to
the computer. When the computer-to-camera FireWire connection enters
isochronous mode, the camera can send the video in a steady flow to the
computer without anything disrupting the process.