Skip to main content

Understanding Communication in MCU’s.



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:-
  1. By predefining the rate at which one is sending and make the other one to listen at the same rate OR
  2. 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

Popular posts from this blog

Let's Build a Music Player!

Digital Music Player's are one of the many sensational devices that were developed in the 20th century. They have been around for a while now and have become a part of our life. In the last few years, they have been integrated within Smart Phones and hence, have reached the masses. Now, Let us try to dive into knowing how these devices work and I guarantee that we all would be fascinated by the kind of engineering which goes into making these magic boxes. There are various topics which must be covered in order to build our own music player and so there will be several blogs to build a SOUND foundation. Now let us make a list of the required components and then we will walk through each of them in the upcoming blogs. There are 3 basic parts which are required to build a device which can output Audio:- Storage Medium. Micro-controller. Audio Output device. We will store the required music file onto a storage medium as the onboard memory on a microcontroller is low...

SD-CARD

This Post marks the beginning of our quest to develop a simple Music player. SD stands for Secure digital and these small devices have been around for a while now. They contain flash memory and a memory controller which is given instruction by the main MCU. So our main objective here is to understand how sd cards work and how to interface them with a microcontroller. As to understand the working of SD card we need to dive into the world of transistors and bits! The Sd card contains solid-state memory also known as the flash memory which is a type of EEPROM i.e  Electronically Erasable Programmable Read Only Memory .  Flash memory stores information in an array of memory cells made from  floating-gate transistors . These transistors are used in different topologies as to store each bit. We will not program each bit individually as it will be time-consuming as well as an inefficient way to store the data. As to move to a higher level of abstraction, we need a way to ...

Automated Outdoor Lighting

This Project enables a person to make any Outdoor Lighting Automated i.e to switch On/Off according to the sunlight outside. If it is dark outside then the light will turn On and if it is daytime then it will automatically switch Off. This can be very useful for all Outdoor Lighting of various commercial buildings as well as for residential buildings. This can also be implemented in Vehicles which will automatically turn their lights On.  Our aim can be achieved by designing a proper transistor circuit and using a relay with it to control the high voltage network. T he Requirements Are: 1:- Bipolar Transistor(Bc 547) 2:-5/6v Spdt Relay 3:-Resistors(Around 4.5k And 3k Ohm) 4:-Light Dependent Resistor 5:-5v Power Supply 6:-Pcb For Soldering Things Together 7:-Multimeter          CIRCUIT AND EXPLANATION The project involves the use of a transistor as a switch to make the outdoor light on/off. As we know that transistor can be used in three diffe...