Serial Communication plays important role within the communication system. All micro-controller should have serial communication port.Serial communication provides a text-user-interface(TUI). One will use serial port of microcontroller to send data serially to laptop/PC or receive data serially from laptop/PC.Here we use arduino board to communicate with the laptop. Arduino board have a minimum of one serial port to communicate known as UART and USART. It communicates with digital pin 0 and 1 of arduino refer to as RX and TX pin as well as with the computer via USB.
Virtual Terminal |
Arduino has a built-in function for serial port thus there is no need to go into register detail. In Arduino IDE, one can easily call the serial function for the serial port and job is finished. A simple connection for serial communication is shown below
Connection For Serial Communication |
For serial communication with arduino, we have to use three function known as Serial.begin(), Serial.print(),Serial.println(). Their function is as follows
1: Serial.begin()
To initialize the serial port for the communication we use this function.In this function baud rate is used to initialize the serial port. Here we have used 9600 baud rate for the communication.
2: Serial.print()
This function helps to send serial data to the device connected to the serial port of arduino board. Using this function we are able to send both ASCII and string to the device.
3: Serial.println()
This function is used to print the send data into a new line and all the function is same as the previous function.
Circuit diagram:
Circuit Diagram |
Download the hex file from below.this image is just for showing. we connected a led to pin no 5 of arduino board therefore whenever data is sent to laptop/PC led can blink.
Serial Port file download have a problem..
ReplyDeletehttp://www.mediafire.com/download/fudgh1njp847r8d/serial_display.rar
File Blocked for Violation.
Okkk i will solve this problem very soon keep visiting.
Deletenow you can download the required file :) keep visiting
DeleteThank you for sharing transfer data between two Laptop using wi-fi
DeleteIf you plug the arduino (TTL) into the PC (RS-232) you will blow the Arduino. You need a TTL to RS-232, or a TTL to USB converter.
ReplyDeleteHii steve,
ReplyDeleteYou are right if anybody wants to exchange data between pc and arduino a logic level converter must be needed. But in this article i only concern in proteus simulation for rough idea of it soon i post an article on ttl to rs232 converion. Keep visiting :)