Serial data communication or you can say serial communication in general uses two methods, that is, Synchronous method and Asynchronous method for data transmission and reception
Over the years, many serial protocols were made to meet certain needs of embedded systems. Ethernet and USB (universal serial bus), are a couple of the well-known computing serial interfaces.
Other common serial interfaces include SPI, I2C (pronounced as I 2 C or I squared C), and the serial standard we are here to talk about today. In general, these serial interfaces sorted into two categories –
SERIAL COMMUNICATION METHODS — SYNCHRONOUS & ASYNCHRONOUS
In Synchronous method
A synchronous serial interface always pairs its data line(s) with a clock signal, and all devices on a synchronous serial bus share a common clock. This makes for a more straightforward, even faster serial transfer, but it also requires at least one extra wire between communicating devices. In simple which interface required SCK, SCLK pin the synchronous.
In synchronous method, for example in SPI there are 4 pin used, 2 pins are for MISO & MOSI (Master In Slave Out & Master Out Slave In), 1 pin for fixed Clock (from single master device) and 1 Data pin for each slave device. Here SS1, SS2, SS3 are data pins for 3 slave devices.
Examples of synchronous interfaces include USART, SPI, and USB etc.
In Asynchronous method
This is also Serial communication but data transfer without any support from an external clock signal or in in other words in this you do not need clock for communicating with other device. For example UART, RS232 etc. are Asynchronous serial communication method.
Usually RS232, RS422 & RS485 have two wires RX and TX with pre-defined data rate (also called baud rate) and no pre-determined master or slave device.
A few Synchronous and Asynchronous communication protocols or interfaces are follows
- USART (Universal Synchronous-Asynchronous Receiver-Transmitter)
- USB (Universal Serial Bus)
- RS232 () : The RS-232 spec provides for both synchronous and asynchronous but PC’s use a UART chip such as a 16450, 16550A, or 16650 and can’t deal with sync.
- I2C or I2C (Inter-Integrated Circuit, pronounced as “I squared C” or “I two C”)
- SPI (Serial Peripheral Interface)
- UART (Universal Asynchronous Receiver-Transmitter) (used in Arduino)
- RS232 (used in PC)
- CAN (Control Area Network Bus) : According to Wikipedia, CAN does not include a clock in the data transmission. All nodes on the CAN network must operate at the same bit rate, and the error between each node’s internal clocks must be within tolerance, for the nodes on the network to communicate. This is the same as a PC’s RS-232 serial port which is considered as asynchronous.
Note : It is possible to write programs in our microcontroller to use either of these communication protocols/interfaces (SPI, UART etc.). But the programs will become tedious and lengthy. So it is better to use these special IC chips made by many manufacturers for serial communications.