Вы находитесь на странице: 1из 7

32 Communication RS

RS-232 is quite famous term in telecommunications, RS-232 stands for Recommended


Standard 232. RS-232 is a standard used for serial binary data signals which connects
DCE (Data Circuit-terminating Equipment) to DTE (Data Terminal Equipment), most
commonly used in computer serial ports. In today’s computers RS-232 is replaced with
USB for local communications. RS-232 is slower than USB. USB is simple to use with
its easy connectors and also it use very less energy. RS-232 and USB both have software
support for all the famous operating systems. USB make it easy for device drivers to
communicate with hardware, but there is no provision for direct analog to the terminal
programs used which will allow users communicate directly with serial ports. Because of
a protocol for transferring data to device USB is more complex than RS-232. This
includes an extra software to support protocol to be used. RS-232 on the other hand only
regulate voltage of signals and the functions of the physical interface pins. Nowadays
application of RS 232 is gone beyond the original use of connect a terminal with modem
and its successors are showing some disadvantages. Few of the limitations associated
with RS 232 are:
 Noise immunity and transmission distance are limited because of the single ended
signaling
 Power consumptions are increased because of large voltage swings for positive
and negative supplies. Upper speed of a compatible interface is also gets limited
due to the voltage swing.
 There is no specific method of sending power to device, RS232 is only suitable
for low power devices like mice.
 Between two devices multi-drop connection is not defined. When multi drop
works it still lacks in compatibility and speed.
 Assignment of the role of newly developed device becomes problematic because
of the asymmetrical definition of the two ends of the link.

Sygnały w PC [edytuj]
Widok gniazda PC (męskiego) typu DE-9 od strony wtyczki
Numer
Kierunek Oznaczenie Nazwa angielska Nazwa polska
9 pin 25 pin
DCE – > Data Carrier sygnał wykrycia
1 8 DCD
DTE Detected nośnej
DCE – >
2 3 RxD Receive Data odbiór danych
DTE
DCE < –
3 2 TxD Transmit Data transmisja danych
DTE
DCE < – Data Terminal
4 20 DTR gotowość terminala 1)
DTE Ready
5 7 DCE – DTE GND Signal Ground masa
DCE – > gotowość "modemu"
6 6 DSR Data Set Ready
DTE 1)
DCE < – Request to Send
7 4 RTS żądanie wysyłania
DTE Data
DCE – >
8 5 CTS Clear to Send Data gotowość wysyłania
DTE
DCE – >
9 22 RING Ring indicator wskaźnik dzwonka
DTE
9-19; 21; 23-
    NC   nie wykorzystane 2
25
Make a program free:
Make an Electronics Project ,Contact:
hardikbrainmaster@yahoo.com
hardiksimpleec@gmail.com
hardik_2711@yahoo.com
RS232 COMUNICATION PC TO PC
PROGRAMM

#include<stdio.h>
#include<conio.h>
#include<bios.h>
#include<process.h>
void main()
{
bioscom(0,0xeb,0);
char inf[25];
int i,x;
printf("\n 1:Sender \n 2:Receiver \n 3:exit");
printf("Select the data flow from: ");
scanf("%d",&x);
if(x==1)
{ printf("Enter information");
inf[0]=' ';
for(i=1;inf[i-1]!=0x1b;i++)
{
inf[i] = getch();
outport(0x3f8,inf[i]);
printf("%c",inf[i]);
}
}
else if(x==2)
{ int status;
l1 : status = bioscom(3,0,0);
if(status & 0x100)
{
inf[0]=' ';
for(i=1;inf[i-1]!=0x1b;i++)
{
inf[i]=inport(0x3f8);
printf("%c",inf[i]);
}
printf("Information has been Received");
}
else
goto l1;
}
else
exit(0);
}

Вам также может понравиться