Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: USB3, I2C, SPI
Description: This document is a brief introduction for hardware communication protocols using three of the most commonly used buses I2C, SPI, and USB3, it describes what three buses consists of, and describes the three busses protocol of communication with computer and other devices.
Description: This document is a brief introduction for hardware communication protocols using three of the most commonly used buses I2C, SPI, and USB3, it describes what three buses consists of, and describes the three busses protocol of communication with computer and other devices.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Hardware Communication Protocols
(USB3, I2C, SPI)
...
com
mido_ads201011@yahoo
...
elmashed@Hotmail
...
I
...
Each message has an exact meaning
intended to elicit a response from a range of possible
responses pre-determined for that particular situation
...
A
protocol can therefore be implemented as hardware, software,
or both
...
To reach agreement, a protocol may be
developed into a technical standard
...
This paper takes a look at the I2C, SPI and USB3
communication protocol with computers and other devices
II
...
Standard I2C devices operate up to 100Kbps, while fastmode devices operate at up to 400Kbps
...
2
...
4Mbps
...
Fig
...
I2C POWERFUL FEATURES
The I2C bus has a lot of features that makes him a powerful
communicating tool in IC circuits
1- MASTER–SLAVE HIERARCHY
I2c device can be a master or slave or switch between
master and slave according to application requires
...
(Figure 1)
...
(Figure 2)
...
microprocessor/microcontroller peripheral chips that enables
the controllers and peripheral devices to communicate each
other
...
The SPI bus, which operates at full duplex (means, signals
carrying data can go in both directions simultaneously), is a
synchronous type data link setup with a Master / Slave
interface and can support up to 1 mega baud or 10Mbps of
speed
...
But the multi-master bus is rarely used and
look awkward, and are usually limited to a single slave
...
Data and control lines of the SPI and the basic connection:
Fig
...
1-
B
...
3- Then it sends the eight bit which is read or write bite
(‘0’ slave read, ‘1’ slave transmit)
...
5- Then the transmitter (slave or master, as indicated by
the bit) transmits a byte of data starting with the
MSB
...
7- This 9-bit pattern is repeated if more bytes need to be
transmitted
...
9- In a read transaction (slave transmitting), the master
does not acknowledge the final byte it receives
...
The
master then issues the stop condition
...
Master In Slave Out (MISO) - Slaves generate MISO
signals and recipient is the Master
...
Slave Select (SS) from master to Chip Select (CS) of
slave - SS signal is generated by Master to select
individual slave/peripheral devices
...
Fig
...
3 Basic I2C message
III
...
Micro wire of National
Semiconductor is same as SPI
...
The Serial Peripheral Interface or SPI-bus is a simple 4wire serial communications interface used by many
B
...
2- The master then select the desired slave for
communication by pulling the chip select (SS) line of
that particular slave-peripheral to "low" state
...
4- Other inactivated slaves will refuse the master clock
...
Data transfer is organized by using Shift register with some
given word size such as 8- bits (remember, it’s not limited to
8-bits), in both master and slave
...
While master shifts register value out through MOSI line, the
slave shifts data in to its shift register
...
Different types of configuration
1- Daisy-chained slave configuration:
In cascaded slave configuration, all the clock lines
(SCLK) are connected together
...
The data
flows out the microcontroller, through each peripheral
in turn, and back to the microcontroller
...
So the cascaded slave-devices are evidently looked at
as one larger device and receive therefore the same
chip select signal
...
(Figure 5)
Fig
...
In this
independent or parallel slave configuration, all the
clock lines (SCLK) are connected together, All the
MISO data lines are connected together, All the MOSI
data lines are connected together, but the Chip Select
(CS) pin from each peripheral must be connected to a
separate Slave Select (SS) pin on the mastermicrocontroller
...
Fig
...
USB 3
...
0 specifications were released on November
2008
...
0, it has an increased data transfer rate
(up to 5Gbps), decreased power consumption, increased
power output and most importantly, USB 3
...
0
...
0 consists of a new
higher speed bus known as Super Speed that is in parallel with
the USB 2
...
A
...
2- USB hub
It connects the USB host with other USB devices, it
also allows multiple USB devices to attach to a single
USB port on a USB host
...
At any one time, only a maximum of
5 external hubs can be connected in series and up to a
total of 127 peripherals and hubs including the root
hub
...
Despite having multiple devices connected at one time,
only one device at a time can communicate with a
host controller
...
A function is typically implemented as a
separate peripheral device that plugs into a port on a
hub using a cable
...
USB Data Communication:
In USB data communication, the USB encodes the data by
using the Non- Return-to-Zero Inverted (NRZI)
transmission scheme
...
In
addition, in order to ensure a minimum density of signal
transitions that remains in the bit stream, an additional “0”
bit is injected onto the data bus after the occurrence of 6
consecutive “1” bits
...
All this is done to ensure the
presence of sufficient signal transitions for clock recovery
...
Communication using USB port
1- Detecting a device has connected
The host detects a device has connected to one of
USB ports and starts to identify the connected device,
The device communicates with the host using the
default address of 00h, The host will receive first
packet of 8 bytes of device which will describe the
device class and its function
2- Data transfer
Most USB transactions consist of three packets:
A token packet indicates the type and direction of the
transaction, the device address, and an endpoint
number
...
The receiving device responds with a handshake
packet to indicate if the transfer was successful
...
A single pipe supports only (and exactly) one
transfer type for any given device configuration
...
The host "polls" the input device periodically, for example
every 10 ms, which is quick enough for reflecting keyboard
inputs to the screen without irritating the user
...
e
...
Isochronous transfer: The most important requirement for
"Isochronous transfers" is to transfer a constant amount of
data over each time period
...
Note that speakers and
other audio/video devices also require the use of Control
transfers
...
They are essential to set up a USB device with all
enumeration functions being performed using control transfers
...
The packet length of
control transfers in low speed devices must be 8 bytes, high
speed devices allow a packet size of 8, 16, 32 or 64 bytes and
full speed devices must have a packet size of 64 bytes
...
The Setup
Stage is where the request is sent
...
The setup token is sent first which contains the
address and endpoint number
...
The last packet is a
handshake used for acknowledging successful receipt or to
indicate an error
...
Functions cannot issue a STALL or NAK packet in
response to a setup packet
...
Transaction transfer
In all 4 different transfers of Control, Bulk,
Interrupt and Isochronous, these 4 transfers consist of 3
types of packets namely the
1- Token packet
It consists of the following elements: sync
sequence, Package identifier, device address,
endpoint number and 5-bit Cyclic Redundancy
Check (CRC)
...
2- Data transfer packet
It consists of the following elements: sync
sequence, package identifier, data and 16-bit Cyclic
Redundancy Check (CRC)
...
3- Handshake
...
It consists of the following elements: sync
sequence and Package identifier
...
7 NRZI transmission scheme
E
...
Microcontrollers can communicate with I2C
devices even if it has no special I2C interface
...
The SPI bus is a simple 4 wired bus
...
It can be connected to many devices (slaves),
but as the number of slaves increases the number of wires
will increase which will increase the area of the circuit, so
this is an undesired property
...
S
REFERENCES
[1] Bollam Eswari, N
...
Preethi, S
...
Sreejeesh
“Implementation of I2C Master Bus Controller on FPGA”
IEEE’s paper, April 2013
...
ieee
...
jsp?tp&arnu
mber=6577229&sortType%3Ddesc_p_Publication_Year
%26searchField%3DSearch_All%26queryText%3Di2c
[2] Peter Corcoran “Two Wires and 30 Years: A tribute and
introductory tutorial to the I²C two-wire bus” IEEE’s
paper, July 2013
...
ieee
...
jsp?tp&arnu
mber=6556004&sortType%3Ddesc_p_Publication_Year
%26searchField%3DSearch_All%26queryText%3Di2c+
bus
[3] Shumit Saha, Md
...
Available:
http://ieeexplore
...
org/xpl/articleDetails
...
0 Bus”
Available:
http://en
...
org/wiki/USB_3
...
wikipedia
...
wikipedia
Title: USB3, I2C, SPI
Description: This document is a brief introduction for hardware communication protocols using three of the most commonly used buses I2C, SPI, and USB3, it describes what three buses consists of, and describes the three busses protocol of communication with computer and other devices.
Description: This document is a brief introduction for hardware communication protocols using three of the most commonly used buses I2C, SPI, and USB3, it describes what three buses consists of, and describes the three busses protocol of communication with computer and other devices.