82
F. Firouzi et al.
Fig. 2.23 The signaling mechanism in I2C between one master and one slave
upper bound on the number of data frames that can be transmitted between master
and slave. Finally, when all data frames have been dispatched, the master creates a
stop condition.
I2C has its own advantages and drawbacks. The main benefits of I2C are:
• Minimal Wires – I2C needs only two wires.
• Greater Flexibility – Unlike SPI, several masters can be connected to the same
I2C bus concurrently.
• ACK/NACK Bit – This bit can be used to confirm the successful transfer of each
frame.
• Simplicity – Hardware is not as complicated as with UART.
• Universality – It is widely used by vendors to connect peripherals to microcontrollers.
The main drawbacks of I2C can be summarized as below:
• Slower Data Transfer – Data transmits at a slower rate than SPI.
• Smaller Data Frames – Data frame size is limited to no more than 8 bits.
• Complicated Hardware – I2C requires more complex hardware than SPI.
2.5.3.8 Universal Synchronous Asynchronous Receiver Transmitter
(USART)
USARTs can function asynchronously in the same manner as a UART (asynchronously) as well as acting synchronously. The main difference between a
USART and a UART is the manner in which serial data is clocked. In UARTs each
counter generates its own data clock internally. Since there is not any incoming clock
signal to the receiver, it must know what the communication baud rate is in advance
of receiving the data stream. On the other hand, a USART can run synchronously. A
sending peripheral creates a clock that the receiver can obtain from the data stream
without advance knowledge of the baud rate. An external clock enables the USART
data rate to be much higher (up to 4 Mbps) than the data rate of a UART.
Précédent

- 91/647

Suivant