ts-7000
[Top] [All Lists]

[ts-7000] Re: TS-7500 rs-485

To:
Subject: [ts-7000] Re: TS-7500 rs-485
From: "nxtcomputing" <>
Date: Fri, 08 Jan 2010 22:42:05 -0000
I got it working with the code I had before...
I didn't have the pins isolated from the connection to my pc.
I isolated the RS-485+ / RS-485- lines and it is working.

Thanks again for your help Peter.

-Rob


--- In  "nxtcomputing" <> wrote:
>
> I tried setting dio pin 27 using:
> $setdiopin 27 1
> 
> That didn't seem to make any difference...
> Are there specific port settings for RS-485 that I may have missed?
> 
> Thanks for any help,
> Rob
> 
> --- In  "PeterElliot" <egroups@> wrote:
> >
> > Hi,
> > 
> > I don't have a TS-7500, so take this with a pinch of salt.
> > 
> > Looking at the TS-752 schematic, the RS485 TX Enable is connected to DIO_27 
> > on the 40 pin connector.
> > 
> > From the code below, I can't see the control of the TX enable pin being 
> > specified, which would result in the data being sent to the chip, but not 
> > being sent out into the world.
> > 
> > I don't know how you'd control the TX Enable, but setting DIO_27 high prior 
> > to sending and setting it low afterwards may help - but I expect the FPGA 
> > would automatically control this line if it was told that the port were 
> > RS485...
> > 
> > Hope this helps,
> > 
> > PJE
> > 
> > 
> > 
> > --- In  "nxtcomputing" <rwright@> wrote:
> > >
> > > I am trying to communicate over the RS-485 port on a TS-7500 with TS-752 
> > > board. I have connected pins 1 and 6 on the DB-9M port of the TS-752 
> > > board to a RS-458 device. I have tried to configure the ports using the 
> > > following...
> > > 
> > > #xuartctl --port 0 --server --speed 9600
> > > ttyname=/dev/pts/0
> > > #xuartctl --port 1 --server --speed 9600
> > > ttyname=/dev/pts/1
> > > 
> > > then in a program i tried to send over the both of the ports with no 
> > > luck...
> > > 
> > > #include <iostream>
> > > #include <stdio.h>
> > > #include <stdlib.h>
> > > #include <string>
> > > #include "convert.h"
> > > using namespace std;
> > > #include <sys/types.h>
> > > #include <sys/stat.h>
> > > #include <fcntl.h>
> > > #include <termios.h>
> > > #define BAUDRATE B9600            
> > > #define _POSIX_SOURCE 1
> > > #define FALSE 0
> > > #define TRUE 1
> > > volatile int STOP=FALSE;
> > > 
> > > int main(void) {  
> > >   int fd;
> > >   struct termios oldtio, newtio;
> > >   fd = open("/dev/pts/0", O_RDWR | O_NOCTTY);
> > >   if (fd <0) {
> > >           perror("/dev/pts/0");
> > >           exit(-1);
> > >   }
> > > 
> > >   tcgetattr(fd, &oldtio); //save current settings
> > >   bzero(&newtio, sizeof(newtio)); //clear new port settings
> > > 
> > >   newtio.c_cflag = BAUDRATE | CS8 | CLOCAL | CREAD | PARENB; 
> > >   newtio.c_iflag = IGNPAR | IGNBRK;
> > >   newtio.c_oflag = OPOST;
> > > 
> > >   newtio.c_lflag = 0;
> > >   tcflush(fd, TCIFLUSH);
> > >   tcsetattr(fd, TCSANOW, &newtio);
> > >   
> > >   char data[50];
> > >   sprintf(data,"%c0101%cAC11R1C1A1P%c",0x02,0x1b,0x04);
> > >   
> > >   write(fd,&data[0],18);
> > >   printf("sent on serial line: %s\n",&data[0]);   
> > >   tcsetattr(fd, TCSANOW, &oldtio); //restore old setting
> > > }
> > > 
> > > any ideas?
> > >
> >
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU