Look RS232 > RS232C Hardware  
fCoder SIA
fCoder SIA Look RS232 Download Order Support Cookie Policy
Look RS232
Download
Order
Support
Testimonials
FAQ
Online help
Modem Programming
Serial port
RS232 Hardware
Programming
  Microcontrollers

Today it is possible to use microcontrollers for sending and receiving serial data. Most MCU's (Micro Controller Units) already have built-in UART's. Let's have a look at the application used above. E.g. we want to control analog voltages using an ADC and then send them serially to the PC. If the Microcontroller also has a built-in ADC along with the UART or SCI, then it is possible to simply program the device and connect a RS-232 Line Driver. This would minimize your chip count and make your PCB much smaller.

The second example displays the serial data to a common 16 character x 2 line LCD display. A common problem with the LCD modules is they don't accept cartridge returns, line-feeds, form-feeds etc. By using a microcontroller, you can emulate the UART as well as program it to clear the screen in case of a form-feed being sent or advance to the next line if a Line-feed is sent.

The LCD example also required some additional logic (An Inverter) to clear the data receive line on the UART, and provide a -ve edge on the enable of the LCD to display the data present on the pins. This can be done using the Microcontroller and thus reducing the chip count and the cost of the project.

As to chip count, most Microcontrollers have internal oscillators thus you don't need the 74HC4060 14 Bit Binary Counter and Oscillator. Many Microcontrollers such as the 68HC05J1A and PIC16C84 have a smaller pin count than the 40 Pin UART, and this not only makes the project smaller in size, it makes the PCB less complicated.

But Microcontroller also has many disadvantages. The major one is that you have to program it. As you may not have a development system for a Microcontroller or a method of programming it, then you have to learn the micro's code and work out how to tackle the problem. At least with the UART, it is necessary to only plug it in, wire it up and it worked. It can't be much simpler that that.

So far we have only discussed Full Duplex Transmission, that is that we can transmit and receive at the same time. If our Microcontroller doesn't have a SCI then we can Emulate a RS-232 port using a Parallel line under software control. However Emulation has it's disadvantages. It only supports slow transmission rates, usually 2400, 9600 or maybe even 19,200 BPS (in this case some luck is required). The other disadvantage is that it's only effective in half duplex mode. That is, it can only communicate in one direction at any given time. However this is not a problem for many applications.

As there are many different types of Micro-Controllers with their different instruction sets, it is next to impossible to give examples here which will suit everyone. Just know that you can use them for serial communications. Some other examples may be available later

 
  Contact us
© fCoder SIA