This Blog paves a way to understand how Microcontrollers are able to transfer data i.e communicate and it also lays a strong foundation for the upcoming series of blogs which are all related to the specific protocols through which any two MCU’s transfer Information between them.
An Embedded system may contain many Mcu’s and hence it becomes very necessary for them to communicate for sharing different information. This blog is a general introduction to various protocols which are involved in the process and in the subsequent blogs we will be focusing on the use of them to communicate our device with many standard devices such as the Sd-Card and the TFT displays.
As we know that transfer of Information Requires a transmitter, receiver and a common language. Here the transmitter and the receiver are the microcontrollers. The common language for such Mcu’s is nothing but the Binary language. There can be two ways in which data is transferred, In the first approach we can connect different lines in which 1 bit will be transferred each time, So there can be 8,16 or 32 lines according to the data and the bits can be transferred in parallel fashion but this is not practiced most of the times due to the number of lines required to transmit data.S o we move on to the other way that is serial communication in which the bits are transmitted serially on the same line and the only Hindrance now is to Sync the devices i.e to make one receive and analyze the data at the same speed at which the other is sending.
This can be accomplished in two ways:-
- By predefining the rate at which one is sending and make the other one to listen at the same rate OR
- By providing a reference stream consisting of Logic High’s and Low’s and sending the data in sync with the stream and decoding the data with the stream on receiving.this reference stream is often termed as a Clock.
Both of the above ways are practiced in MCU related communication protocols. The first one is often referred to as Asynchronous Communication as no sync clock is provided hence there are only 2 line Tx/Rx. The Universal Synchronous/Asynchronous Reciever Transmitter(USART) can be used in such fashion.
The UART is one of the simplest protocols and is used in many sensors such as Ultrasonic, optical fingerprint etc. This has a limited speed of transferring data and then it will go out of sync due to non-availability of any reference. In the case of Transferring data at a high speed, we need other protocols. Moreover, there are plenty of resources available online on this and so we will be shifting our focus to more frequently used SPI protocol in the next blog.

Comments
Post a Comment