Re: [Linux-programlama] Setserial port programming

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Kenan Dogan (kndogan@yahoo.com)
Date: Mon 16 May 2005 - 17:57:29 EEST


Merhaba,

http://www.rtd.com/software_drivers.htm adresinde

Linux - RS485 kod ornegi olarak ;

http://www.rtd.com/software/CM/RS422-485_Linux_v1.0.tar.gz

dosyasi var. Hemen yaninda da bir PDF belge onerisi bulunuyor.
( SWM-640000012 )

Belki isinize yarayabilir.

Kolay gelsin.

> Merhaba,
>
> Bir süredir Şişecam'da veri toplama projeleri yapıyoruz. Şimdilik 100
> civarında endüstriyel veri toplama istasyonunda Linux kullanıyoruz. Bu
> sayı sene sonunda 200-300 arası bir yere oturacak. (3-4 proje
> tamamlanmış oluyor)
>
> Şu anda bir RS485 sorunumuz var.
> ttyS1 RS485. Özel bir sürücüye ihtiyacımız var mı sorusunu donanımcı
> firma aşağıdaki gibi yanıtladı.
>
> Debian Sarge. Setserial mevcut.
> Ayrıca bir sürücüye ihtiyacımız olmadığı söyleniyor ama C ve Java
ile
> yazdığımız test programlarında bir sonuca ulaşamadık.
>
> Bir önerisi olan?
>
> Örnek C kodunda port açma rutini:
>
> int
> tty_setup(char *dev, int baudrate)
> {
> int fd;
> struct termios newtio;
> fd = open(dev, O_RDWR);
> if (fd==0)
> return 0;
> memset(&newtio,0, sizeof(newtio));
> newtio.c_cflag = baudrate | CS8 | CLOCAL | CREAD; // | CRTSCTS
> - comment out;
> newtio.c_iflag = IGNPAR;
> newtio.c_oflag = 0;// | ONOCR | ONLRET;
> newtio.c_lflag = 0;
> newtio.c_cc[VTIME] = 10; // timeout = 1/10 sec
> newtio.c_cc[VMIN] = 0; // from read() call
> tcflush(fd, TCIFLUSH);
> tcsetattr(fd,TCSANOW,&newtio);
> return fd;
> }
>
>
>
>
> Mehmet K.
> TRINOKS
>
> The super I/O of PPC-103T is used W83877TF to provide UART signal (TX,
> RX, RTS) to ADM-485 transceiver to implement RS-485 function,
>
> so as driver view, Linux driver only take care of UART signal which is
> provided by W83877TF,
>
> as for RS-485 protocol (flow control), that has been performed by ADM-485
(H/W).
>
> PPC-103T originally can support RS-485 function without any extra Linux
driver.
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

_______________________________________________
Linux-programlama mailing list
Linux-programlama@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.