


Most commonly, 9600bps are use with simple/older microcontrollers and 115200bps are used with modern day devices.įigure 1 taken from Wikipedia shows the timing diagram for a serial communications frame or one transaction. What is important is the duration of each bit since the higher the speed, the smaller the pulse. This speed is the bit rate, bits-per-second or baud rate and values range from 50bits/s to 460,800bits/s. It works by both the transmitter and receiver having pre-agreed speed of transmission. There is a long history behind the UART and RS232 but simply put, its one of most used standard for transmitting digital data over short distances. UART - Universal Serial Asynchronous Receive Transmit I will also try to simplify the explanation to accelerate the process and if something comes out ’not right’ please leave a comment and I shall do the needful. In the proceeding section, I will explain the protocols in brief and complete details can be read in their respective specification documentation. It is important to understand these existing standards before we start with our own experiment. Dedicated peripheral hardware blocks have been designed for these and are a part of modern microcontrollers like AVR, PIC and the list goes on. If you don’t already know the big names are UART, I2C/TWI, SPI, CAN, LIN are the most popular. Over the years, many big companies have come to create solutions for the communication problem. In this article, I talk about designing, implementing and testing a simple communication protocol for use with microcontrollers and single board computers. The same way electronic communication works and is the backbone of many systems today. We talk to each other by sound and sight where one looks towards the person or calls out the name and then starts speaking. DetailsĪ protocol is a predefined agreement and sequence of steps that is followed to send data from one point to the other over a medium of transmission. This tutorial is an implementation of the TLV Protocol in Embedded C meant to be deployed on devices with low resources. Implementing a protocol in different languages takes different methodologies. It can be used in microcontrollers or Single Board Computers Description In this article, I take a look at designing and implementing a simple serial protocol using C.
