Both, Parallel and Serial modes of communication have certain advantages and disadvantages over one another. The serial communication is a preferred option due [[wysiwyg_imageupload::]]to its ability of long distance communication with error detection capability. The microcontrollers consist of an inbuilt hardware unit known as USART (Universal Synchronous Asynchronous Reception and Transmission) to facilitate serial transfer of data. Before starting USART, some general terms related to communication need to be understood. These terms are explained below.Asynchronous Communication: In this type of communication, both Transmitter (Tx) and Receiver (Rx) work on different clocks which means that they are not synchronized. Start and Stop bits are also sent with each Data byte to identify the data. Synchronous Communication: In this type of communication, both Tx and Rx are synchronized with the same clock and no Start or Stop bits are used.Full-duplex Communication: When either of the devices can send and receive data at the same instant, they are said to have full-duplex communication.
The previous article explains serial communication using 8-bit data transfer. AVR microcontroller also supports serial data transfer with frame size of 5, 6, 7 and 9 [[wysiwyg_imageupload::]]data bits. The size of data frame can be adjusted according to application. For example, consider a system that needs to transmit only ASCII codes as data. In this case data frame size of 7-bits is sufficient because data length of ASCII code is equal to 7-bit. This will makes system more efficient by saving time of one clock period in each data frame transmission. This article explains serial transfer of data with different frame size. A test program is written for 6-bit data communication between Microcontroller and PC. In this experiment the input is taken from the user through a keyboard. The corresponding data is sent to microcontroller via PC’s COM port. The microcontroller receives data and returns it again to PC’s COM port. The HyperTerminal is used to configure COM port to make it compatible for this experiment.
This article covers data transmission using 8 bit USART. The readers should have a basic understanding of serial communication and how to receive the serial [[wysiwyg_imageupload::]]data output. More details on these topics are available on Serial communication using AVR Microcontroller USART. The registers of USART system are already explained in previous article. Before transmitting the data, it must be stored in UDR register. The HyperTerminal software is used to show received data. A sequential process can be followed to transmit the data to COM port of computer. Continue reading to find out how interfacing and transmission through 8 bit USART can be done with the help of AVR microcontroller.
Communication between two entities is important for the information flow to take place. In general the information transport system can be parallel in which the [[wysiwyg_imageupload::]]complete byte of data is sent at a time, with each bit having a separate dedicated line or it can be serial where only one communication line is available which is shared by all the bits sequentially. The pros and cons of these two systems are equivalent and selection between the two depends on the application.Data can be exchanged using parallel or serial techniques. Setup for parallel data transfer is not cost effective but is a very fast method of communication. Serial communication is cost effective because it requires only a single line of connection but on the other hand is a slow process in comparison to parallel communication. This article explains serial communication of AVR microcontroller (ATmega16) with PC. The data is transmitted from the controller using RS232 standard and displayed on the PC using Hyper Terminal.