UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
2,328 Views
Registered: ‎06-11-2010

tranfering data to ttyUSB0 and then reading it from FPGA using

Hello Everyone I am trying to send data to ttyUSB0 by using some system calls.

here is the code

 

 

#include<fcntl.h>
#include<stdlib.h>
#include<sys/stat.h>
#include<unistd.h>
#include<stdio.h>
#include <termios.h>
#include <sys/signal.h>
#include <sys/types.h>
#include <string.h>

int main(void){
int fd1;
fd1=open("/dev/ttyUSB0",O_RDWR);
printf(" the file discription value is = %d \n\r",fd1);
char buf[40]="Computer System Architecture Group";// this is the string of length 34
write(fd1,buf,34);      
return 1;
}

 

 

now this is throwing data onto  ttyUSB0 . Now in FPGA there is one application running

 

which uses

XUartLite_Recv(&uart,buff,34 );

 

but when i tried to print this " buff " . I am getng unreadable values. 

Can any one please help me.

Thank you

 

Regards,

Abhinav Pundir

Email ID : abhinavpundir@ymail.com

0 Kudos
1 Reply
Highlighted
2,302 Views
Registered: ‎06-11-2010

Re: tranfering data to ttyUSB0 and then reading it from FPGA using

Finally I waz able to send data from the Uart port(ttyUSB0) to the board.

But nobody helped me.

So strange??

 

 

abhinavpundir@ymail.com

Tags (1)
0 Kudos