타겟과 컴관에 로직 데이터를 주고 받을려는데요

문준호의 이미지

제가 프로젝트를 하고 있는데요 2주밖에 남지 않아서 미치겠네요

정말 어트게 해야 할까요?

정말 답답합니다.

우선 어떻게 된거냐면요

우선 64포인트 13데이터의 FPGA를 만들어서 로직의 웨이브 파형을

PXA255-pro3에 시리얼로 데이터를 전송 시켜서 램이나 롬에 저장을 시킨다음

PXA보드에 달려있는

cyclone칩에 그 웨이브 파형을 넘겨줘서 FFT처리를 한다음에

다시 그 데이터를 컴퓨터로 넘겨주는 작업을 하고 있습니다.

구체적인 거는요....

제가 맡은 부분이 시리얼로 웨이브 파형을 받아서 기억 장치에 일단 저장 시켜서

다시 cyclone칩에 데이터를 넘겨서 다이 컴터로 넘겨주는 부분인데요

제 개발 환경을 리눅스(vmwara)고 일단 리눅스에서는 com1으로 pxa255-pro3으류 연결 시키고

com2로는 윈도우와 PXA255를 연결시켜서 웨이브 파형을 com2로 보내면 그 신호를 pxa255에 넘겨주는 것이네요 그래서 그 신호를 받아 다시 cyclone칩에 넘겨줘서 FFT처리를 한후 그 데이터를 com2 윈도우 시리얼로 넘겨 주는 겁니다.

이 소스는 com2 포트를 통해서 타겟보드와 호스트 컴퓨터(hyper 터미널, minicom)간에 메시지를 주고받는 프로그램입니다. 이것을 응용해서 하라는데 아무것도 모른 저로서는 감을 잡지 못하겠네요 제발 좀 자세히 알려주세요

#include
#include
#include
#include
#include
#include

#define LINESPEED B115200

int main (void)
{
int fd, i;
struct termios oldterm, newterm;
char buf[255];

fd= open ("/dev/ttyS2", O_RDWR | O_NOCTTY );
if (fd < 0) {
perror ("/dev/ttyS2");
exit (-1);
}

tcgetattr (fd, &oldterm);

bzero (&newterm, sizeof (newterm));
newterm.c_cflag= LINESPEED | CS8 | CLOCAL | CREAD;
newterm.c_cc[VTIME]= 0;
newterm.c_cc[VMIN]= 1;

newterm.c_iflag = IGNPAR;
newterm.c_oflag = 0;

tcflush (fd, TCIFLUSH);
tcsetattr (fd, TCSANOW, &newterm);

sprintf (buf, "This is Test Program for Com2 Port\n\r");
write (fd, buf, strlen (buf));

while (1) {
i= read (fd, buf, 255);
buf[i]= 0;
printf ("%s", buf);
fflush (stdout);
write (fd, buf, strlen (buf));

if (buf[0] == '\r') {
printf ("\n");
sprintf (buf, "\n");
write (fd, buf, strlen (buf));
}
}

tcsetattr (fd, TCSANOW, &oldterm);
exit (1);
}

추가된 질문 (2006-12-30 16:46 추가)
보드는 휴인스꺼 사용합니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.