Hardware Reference
In-Depth Information
Figure 7-1: An SPI network using several slaves
Comparison to RS-232
SPI is also simpler in design compared to RS-232 communications; RS-232
uses two wires (Tx and Rx), but it requires a set clock speed on both sides of
communication. The clock on both devices connected via RS-232 need to be in
agreement, preventing coni guration problems or desynchronization. SPI masters
generate their own clock signal and send that signal to every device. SPI devices
are therefore normally simpler to design, cheaper to fabricate, and easier to use.
Another difference between SPI and RS-232 is the way data is sent. RS-232
was designed for long distance communications; SPI is not. It does not need to
handle signal noise like RS-232 and therefore does not require checksum bits.
This has one major advantage; where RS-232 communications have to send 7-bit
or 8-bit data, SPI can select any length it wants. Some devices send 8-bit data,
some send 16-bits, even devices using nonstandard lengths like 12-bits can be
found on the market.
Confi guration
Although SPI does not require explicit coni guration like RS-232 devices, it does
require a form of coni guration. The clock signal is a digital signal, oscillating
between a logical one and a logical zero. Some devices will be active on a rising
edge (as the clock goes from low to high), and some will be active on a falling
edge (as the clock goes from high to low). Also, the clock can be coni gured to
be active low or active high.
 
Search WWH ::




Custom Search