Basic UART Tutorial
Basic UART Tutorial
Register
News
Contact Us
Reviews
More
FOLLOW US
OCFreaks.com
1.7Klikes
LikePage
Bethefirstofyourfriendstolikethis
Email Address
Subscribe
Introduction
Whenever we want to communicate between PC and MCU or between two MCUs , the simplest way to
achieve that is using UART. UART stands for Universal Asynchronous Receiver/Transmitter.
UART communication basically uses 2 pins for Data transfer and these are :
1. TxD (or Tx) which is the Transmit Data Pin used to send data
2. RxD (or Rx) which is the Receive Data Pin used to get data
UART sends & receives data in form of chunks or packets. These chunks or packets are also referred to
as transmission characters. The structure of a data packets is as shown below:
Uart data packet begins with a 0. This bit is also called as Start Bit which signies incoming data. Next
comes the actual data which can be 5 to 8 bits in length. After the data an optional parity bit can be
used for error checking. Lastly comes the Stop Bit(s) which is a 1 and this signies end of current data
packet. Note that either 1 or 2 stop bits can be used and the parity bit can be : Even , Odd , forced to 1
i.e. Mark parity , forced to 0 i.e. Space parity or None. (In UART/RS232 context a MARK means 1 and
SPACE means 0 , hence Marking state means a stream(series) of 1s and Spacing state means a
stream of 0s)
Here is an example of a packet having 8 data bits , odd parity bit and 2 stop bits :
Posted By Umang Gajera Posted date: November 26, 2013 in: Embedded 1 Comment
Search ...
In my case I am using a USB to Serial TTL module which is available as COM3 in windows. Finally you
need to congure your terminal software with baud rate and other information. For example, in
PuttyTel this done as shown below :
You can get PuttyTel from Here. Direct download link : Here.
Note : Both the communication ends must have same packet conguration and baud rate else it
wont work properly! For e.g. if one end is using [9600 bauds , 8 data bits , no parity , 1 stop
bit] then other end also must use this conguration.
LPC2148 Uart Tutorial is posted @ Here , Later on LPC1768 Uart Tutorial will be posted depends on
how much time I get
Share this:
Share
Tags:
tutorial
Like
UART
Tweet
Share
Share
Share
Previous
Rumor:GTX Titan about to get a refresh?
Next
LPC2148 UART Programming Tutorial
1Comment
Recommend
OCFreaks!
Share
Login
SortbyNewest
Jointhediscussion
pandey.ketan3yearsago
Siristartedlearninguartbasicswithyourtutorialswhichhaveprovedtobeveryuseful.Asihaveto
designauartdriverfromscratchasmyprojectsoineedafeasibleprogrammingcodewithyour
explanationsandsuggestionsasearlyaspossibleforwhichiwillbehighlyobliged.
Reply Share
Subscribe d AddDisqustoyoursiteAddDisqusAdd
Privacy
Community
Register
Contact Us