Академический Документы
Профессиональный Документы
Культура Документы
Serial Communication
The concept of serial communication is the process of
sending data one bit at a time, sequentially, over a
communication channel.
This is in contrast to parallel communication, where several
bits are sent as a whole, on a link with several parallel
channels.
Advantages of Serial Communication
Integrated circuits are more expensive when they have more
pins. To reduce the number of pins in a package, many ICs use
a serial bus to transfer data.
Serial communication is used for all long-haul communication to
reduce the cost of the cable.
Reference : Serial communication. (2010, July 12). In Wikipedia, The Free Encyclopedia. Retrieved 06:30, July 29, 2010, from
http://en.wikipedia.org/w/index.php?title=Serial_communication&oldid=373069241
Some form of communication needs to exist for the coherent operation of the
system.
Philips Semiconductors (now NXP Semiconductors) developed a simple
bidirectional 2-wire bus for efficient inter-IC control. This bus is called the
Inter IC or I2C-bus.
All I2C-bus compatible devices incorporate an on-chip interface which allows
them to communicate directly with each other via the I2C-bus.
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
Protocol
Transfers are byte oriented, MSB first
Start: SDA goes low while SCL is high
Master sends address of slave (7-bits) on next 7
clocks
Master sends read/write request bit
0-write to slave
1-read from slave
Slave ACKs by pulling SDA low on next clock
Data transfers now commence
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
The levels of the logical 0 (LOW) and 1 (HIGH) are set as 30%
and 70% of VDD; VIL is 0.3VDD and VIH is 0.7VDD.
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
Message protocols
IC defines three basic types of message, each of
which begins with a START and ends with a STOP:
Single message where a master writes data to a
slave;
Single message where a master reads data from a
slave;
Combined messages, where a master issues at
least two reads and/or writes to one or more
slaves.
Message protocols
In a combined message, each read or write begins
with a START and the slave address.
After the first START, these are also called
repeated START bits; repeated START bits are not
preceded by STOP bits, which is how slaves know
the next transfer is part of the same message.
I2C Bus
The number of I2C devices that can be connected
to a single I2C bus segment is limited only by a
maximum bus capacitance (400pF) and address
space.
Reference : UM10204 - I2C Bus Specification & User Manual from NXP Semiconductors
SPI Bus
The serial data transmission through SPI Bus is fully
configurable.
SPI devices contain certain set of registers for holding these
configurations.
The Serial Peripheral Control Register holds the various
configuration parameters like master/slave selection for the
device, baud rate selection for communication, clock signal
control etc.
The status register holds the status of various conditions for
transmission and reception.
Data Transmission
A typical hardware setup using two shift registers to form an
inter-chip circular buffer
the master first configures the clock, using a frequency less
than or equal to the maximum frequency the slave device
supports.
Such frequencies are commonly in the range of 1-70 MHz.
The master then pulls the slave select low for the desired chip
With the SPI interface you can communicate with a device
transmitting and receiving 8 bits of data at the same time and
it is suited to high speed streaming data transfers.
Data Transmission
During each SPI clock cycle, a full duplex data transmission
occurs:
the master sends a bit on the MOSI line; the slave reads it
from that same line
the slave sends a bit on the MISO line; the master reads it
from that same line
Not all transmissions require all four of these operations to be
meaningful but they do happen.
Data Transmission
Strengths of SPI
Weaknesses of SPI
No standards body governs SPI as an official
protocol
The more devices you have the more pins and
connections necessary
No hardware slave acknowledgment (the master
could be "talking" to nothing and not know it)
Does not support a multi-master architecture
Only handles relatively short distances (meant for
on-PCB communication mostly)
Applications
SPI is used to talk to a variety of peripherals,
such as:
Sensors: temperature, pressure, ADC,
touchscreens
Audio codecs, DAC
Communications: Ethernet, USB, USART, CAN,
IEEE 802.15.4, IEEE 802.11
Memory: flash and EEPROM
Real-time clocks
LCD displays, sometimes even for managing
image data
Any MMC or SD card (including SDIO variant)
UART Introduction
A Universal Asynchronous Receiver/Transmitter (UART) is a
type of "asynchronous receiver/transmitter", a piece of
computer hardware that translates data between parallel and
serial forms.
An example of UART communication is RS-232.
UARTs are commonly included in microcontrollers.
An UART is usually used for serial communications over a
computer or peripheral device serial port.
Serial ports are used as a control console for diagnostics &
configuration.
Many modern personal computers do not have a serial port
since this legacy port has been superseded by USB now.
Reference : Universal asynchronous receiver/transmitter. (2010, July 28). In Wikipedia, The Free Encyclopedia. Retrieved 15:14,
August 1, 2010, from http://en.wikipedia.org/w/index.php?title=Universal_asynchronous_receiver/transmitter&oldid=375909355
UART
The Universal Asynchronous Receiver/Transmitter (UART)
controller is the key component of the serial communications
subsystem of a computer.
The UART takes bytes of data and transmits the individual
bits in a sequential fashion. At the destination, a second
UART re-assembles the bits into complete bytes.
The serial communication settings (Baudrate, No. of bits per
byte, parity, No. of start bits and stop bit and flow control) for
both transmitter and receiver should be set as identical
The start and stop of communication is indicated through
inserting special bits in the data stream
Reference : Universal asynchronous receiver/transmitter. (2010, July 28). In Wikipedia, The Free Encyclopedia. Retrieved 15:14,
August 1, 2010, from http://en.wikipedia.org/w/index.php?title=Universal_asynchronous_receiver/transmitter&oldid=375909355
UART
While sending a byte of data, a start bit is added first and a
stop bit is added at the end of the bit stream. The least
significant bit of the data byte follows the start bit.
The Start bit informs the receiver that a data byte is about to
arrive. The receiver device starts polling its receive line as
per the baud rate settings
If parity is enabled for communication, the UART of the
transmitting device adds a parity bit
UART
The UART of the receiving device calculates the parity of the
bits received and compares it with the received parity bit for
error checking
The UART of the receiving device discards the Start, Stop
and Parity bit from the received bit stream and converts the
received serial bit data to a word
UART Features
Serial transmission of digital information (bits) through a
single wire or other medium is much more cost effective than
parallel transmission through multiple wires.
The UART usually does not directly generate or receive the
external signals used between different items of equipment.
Typically, separate interface devices are used to convert the
logic level signals of the UART to and from the external
signaling levels.
UART
Description
RXD
RTS
2
7
CTS
Clear To Send
DSR
GND
Signal Ground
DCD
DTR
RI
Ring Indicator
9600 bits/sec
19200 bits/sec
38400 bits/sec
57600 bits/sec
115200 bits/sec