April 5, 2012

Interfacing a Microcontroller With a Pc Using Rs232 and the Pc Serial Port

Serial Communication

Serial communication is a technique of transmitting data in the middle of 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 in the middle of two pieces of hardware, the bits are sent one at a time. The hardware sends these bits by sending varying voltages over 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 spoton clocks they can send a series of voltage levels in the middle of each other and then reassmble these voltage levels into bytes.




The question Communicating in the middle of 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 recite some logic level translation is necessary.

Using a Ttl / Cmos To Rs232 Converter

There are many companies that establish modules that take care of the required logic level translation. The Ttl / Cmos To Rs232 Converter is one such module. Typically, these modules associate to the Rs232 port on the Pc and associate to the microcontroller's transmit and receive pins. provide 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.

Interfacing a Microcontroller With a Pc Using Rs232 and the Pc Serial Port

Calcio Serie A Blog News Belkin Wireless Router