For Newbie

Thursday, 27 October 2011

Serial Communication

RS232 for serial communication

Serial Communication
If any data parallel port with certain bit is sent simultaneously at one click, data serial port is sent one by one per one bit. The weakness of sending data by serial is that it is more complex rather than by interface parallel port. It is because the data is sent per bit in series, so that the data sending occurs slowly. Nevertheless, this condition can be overcome by high Bard Rate on data sending. Meanwhile, the strengths are:
1.      Cable for serial communication can be longer than parallel, the data in serial communication is sent for logic ‘1’ as tension -3 to -25 volt and for logic ‘0’ as tension +3 to +25 volt. Therefore, the tension in serial communication has maximum tension handle 50 volt. Whereas in parallel communication, it is only 5 volt. This case causes disturbance on long cables which is easier to overcome than parallel one.
2.      The number of serial cable needed is less than parallel one. You can connect two sets of computer equipment with only three cables to configure null modem, TxD (sending channel), RxD (receiving channel) and ground. Imagine! If it uses parallel technique, there will be 20-15 cables! However, in each computer with serial has to spend much more cost, for interface serial is more expensive than parallel one.
3.      Almost all equipments (palmtop, organizer, mobile phone, etc) recently use infra-red technology for data communication. In this context, data sending is conducted by serial IrDA-1 (the first infra-red specification) is able to send data in 115,2 kbps in speed and it is assisted by UART equipment. The charge length decrease 3/16 from standard RS-232 to economize the power
4.      For embadded system technology, there are a lot of microcontrollers completed with serial communication (both RISC and CISC) or serial communication interface (SCI). With the existing of integrated SCI on IC microcontroller, it will decrease the number of an output pin. Furthermore, it only needs 2 main pins : TxD and RxD (out of ground reference)
Data frame on sending serial data AVR AT mega 16 can be viewed through the picture below:
Picture. The Frame of Sending Serial Data for Letter A
In the condition without data (idle), signal is in a high logic. When data is started to send, it will begin by giving start bit signal (St) with low logic as initial sign of data sending, followed by data that is sent (5, 6, 7, 8, or 9 bit). Bit parity has optional character. At last, it is added by stop bit (Sb) which is 1 or 2 bit in number.
Additional Note:
Serial communication between PC and microcontroller can not occur direct by connecting pin Tx on PC with pin Rx on microcontroller and Rx on PC with pin Tx on microcontroller, and pin ground on PC with pin ground on microcontroller.

The level of work tension on serial communication on microcontroller is TTL (0-5 volt). Meanwhile, the level of work tension in PC serial port is from +15 V to -15 V. It happens because there is difference between tension level used for PC serial communication and microcontroller. The level of serial communication tension on microcontroller has to be adjusted with the level of serial communication tension on PC. To do that, it needs the series of converter RS 232. The series picture can be seen as follows:
Picture. Schematic of Converter Series RS 232

Share on Facebook
Share on Twitter
Share on Google+

Related : Serial Communication