USB Scopes, Analyzers and Signal Generators.*Note: Both the communicating devices should have a common ground (GND). This is how exchange of data takes place. TX pin of one device transmits data to the RX pin of another device and similarly TX of latter transmits data to RX of former device. UART/USART has a big limitation that only two devices can communicate using this protocol at once. Baud rate refers to the number of data bits transmitted per second, so both devices should work on same baud rate in order to maintain its proper functioning. Yet there is a term called baud rate which helps these devices to remain in sync by fixing the speed of data exchange. Since no clock is needed here, both the devices have to make use of their independent internal clocks to work.
The difference between them is that UART performs only asynchronous serial communication while USART can perform both synchronous as well as asynchronous serial communication process.įor Asynchronous mode, this protocol makes use of only two wires i.e. UART stands for Universal Asynchronous Receiver and Transmitter while USART stands for Universal Synchronous and Asynchronous Receiver and Transmitter. It is slower as compared to SPI because a lot of framing work is done within this protocol Only two wires are required for this communicationġ. Multiple masters and multiple slaves can be interfaced togetherĢ. Pull-up resistors with SDA and SCL are necessary in order to run this protocol.ġ. A single message can hold multiple data bytes, each having an acknowledge (ACK) or negative acknowledge (NACK) bit in between them. Every message initiates with a start condition and ends with a stop condition. Every slave matches this address with its own and the one whose address gets matched responds to the master. Whenever master wants to send data it first generates a request which has particular address of that slave. Here is an illustration of SPI:Įach slave has its own unique 7 to 10 bit address which master uses to identify them. SS (slave select) is used to make a particular slave awake with who master wants to communicate. In the entire process SCK (serial clock) plays a very important role, every slave device depends on this clock to read data from MOSI and respond through MISO. Master sends data via MOSI while slaves respond via MISO line. The entire communication is handled by master itself no slave can send data on its own will. In a SPI, at any given time there could be only one master device and several other slaves under it who only respond to master’s call. SS – Slave Select (line used to select slave to which master wants to communicate) SCK – Serial Clock (clock provided by master device) MISO – Master In Slave Out (line though which salves responds back to the master) MOSI – Master Out Salve In (line though which master sends data to its slaves) Slave – Device other than master which utilises master’s clock to communicate Master – Device which provides clock for communication Before moving ahead here are some terms that you should be aware of: This is a synchronous type serial communication protocol which consists of two data lines (MOSI and MISO), one clock line (SCK) and a slave select line (SS). PART 2 - SPI (Serial Peripheral Interface) Types of Serial Communication Protocols: There are various types of serial communication protocols being used in embedded industry. Asynchronous serial communication: This type of serial communication does not require any common clock source between the transmitter and receiver, both the sides work according to their independent clocks. Synchronous serial communication: In this type of communication both transmitter and receiver share a common clock to remain in sync with each other. Serial communication can be further categorized into synchronous and asynchronous type. In Serial Communication, only communication is done serially rest everything, like processing of the data etc., happens in a parallel fashion i.e.