Friday, August 27, 2010

Interfacing a Microcontroller With a PC Using RS232 and the PC Serial Port

By Sidney Kantor
Serial Communication
Serial communication is a technique of transmitting data between two pieces of hardware. The smallest piece of data that is transmitted is the byte. A byte is made up of 8 bits. When data is transmitted between two pieces of hardware, the bits are sent one at a time. The hardware sends these bits by sending varying voltages across the wires connecting the devices. The sender and the receiver agree on how often a bit (or voltage level) will be sent.
How often a bit will be sent is referred to as baud rate or bits per second (bps). Then with the help of very precise clocks they can send a series of voltage levels between each other and then reassmble these voltage levels into bytes.
The Problem Communicating Between a PC and a Microcontroller
The RS232 serial port on a PC uses +3 to +25 volts to signify a logic level of 0, and -3 to -25 volts to signify a logic level of 1.
Most microcontrollers use TTL / CMOS logic levels which use 0 to some threshold voltage to signify a logic level of 0, and some threshold voltage to 5 volts to signify a logic level of 1.
In order for the PC and a microcontroller to successfully communicate some logic level translation is necessary.
Using a TTL / CMOS To RS232 Converter
There are many companies that manufacture modules that take care of the required logic level translation. The TTL / CMOS To RS232 Converter is one such module. Typically, these modules connect to the RS232 port on the PC and connect to the microcontroller's transmit and receive pins. Supply 5 volts and ground and you are ready to communicate.
Applications Ideas
Once you have your microcontroller communicating with your PC it opens up all kinds of possible applications ranging from data loggers, pc based oscilloscopes, controlling your pc from your microcontroller, controlling your microcontroller from your pc, etc.
For more information please visit http://www.m5controlsystems.com/
Article Source: http://EzineArticles.com/?expert=Sidney_Kantor
http://EzineArticles.com/?Interfacing-a-Microcontroller-With-a-PC-Using-RS232-and-the-PC-Serial-Port&id=1122653

2 comments:

Anonymous said...

@Joshua -- I was attempting to deliver a communication however i can’t believe
that it is on your own site. Is it possible to
please check out my website?
Review my homepage - Public Record

Anonymous said...

I personally don’t even know how I ended up right here, nonetheless believe this post is astonishing.
I don’t recognize your identiity nonetheless unquestionably you are going to be a well known tumblr,
discover already.
Stop by my blog http://freehost.com.ua/forum/index.php?action=profile;u=8277;Sa=summary

Post a Comment