serial communication between PC and altera FPGA in C or c++

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sarah

    serial communication between PC and altera FPGA in C or c++

    hI,

    I have a project. I need to realise serial communication between PC
    and Altera FPGA in c or c++. The function of FPGA is working well. it
    can send data to uart.

    Does anybody know how to realise it in c or c++?

    Thanks

    sarah
  • Irrwahn Grausewitz

    #2
    Re: serial communication between PC and altera FPGA in C or c++

    sarahshen2003@y ahoo.ca (sarah) wrote in
    <d51c0c2.030817 0713.586b5b2f@p osting.google.c om>:
    [color=blue]
    >hI,
    >
    >I have a project. I need to realise serial communication between PC
    >and Altera FPGA in c or c++. The function of FPGA is working well. it
    >can send data to uart.
    >
    >Does anybody know how to realise it in c or c++?[/color]

    Please, would you mind to take this question to a more
    appropriate NG (I'm almost sure there is a suitable
    comp.<your OS or hardware>.* group somewhere), as the
    C language (as it is discussed here) does not know
    anything about things like "serial communication
    between DeathStation200 0(tm) and SiriusCyberneti csCorp.'s(tm)
    NasalDemonGener ator(tm)" at all.

    As a matter of fact, posting questions like this in c.l.c
    may invoke some very serious communication.. . :-)

    Anyway: if you'd read the c.l.c's charter and faq, or at
    least spent some time reading here, you'd already know.

    Good luck,


    Irrwahn

    --
    Proofread carefully to see if you any words out.

    Comment

    • Al Bowers

      #3
      Re: serial communication between PC and altera FPGA in C or c++



      sarah wrote:
      [color=blue]
      > hI,
      >
      > I have a project. I need to realise serial communication between PC
      > and Altera FPGA in c or c++. The function of FPGA is working well. it
      > can send data to uart.
      >
      > Does anybody know how to realise it in c or c++?
      >
      > Thanks
      >
      > sarah[/color]

      I can not comment on C++ but C language does not have these
      functions in its Standard Library. You can use C language with
      an extended library. I have used MarshallSoft. I believe they
      have demo versions of their libraries that you can dowload and
      test. The web address is
      SMTP POP3 IMAP email, Personalized email, AES encryption, RS232 serial, client server TCP UDP, GPS and FTP software component libraries for Windows for Developers



      --
      Al Bowers
      Tampa, Fl USA
      mailto: xal@abowers.com base.com (remove the x)
      Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!


      Comment

      • Richard Heathfield

        #4
        Re: serial communication between PC and altera FPGA in C or c++

        Irrwahn Grausewitz wrote:

        <snip>
        [color=blue]
        > Anyway: if you'd read the c.l.c's charter and faq,[/color]

        Charter? What charter?
        [color=blue]
        > --
        > Proofread carefully to see if you any words out.[/color]

        Proofread carefully to see if you included the word "charter". :-)

        --
        Richard Heathfield : binary@eton.pow ernet.co.uk
        "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
        C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
        K&R answers, C books, etc: http://users.powernet.co.uk/eton

        Comment

        • E. Robert Tisdale

          #5
          Re: serial communication between PC and altera FPGA in C or c++

          sarah wrote:
          [color=blue]
          > I have a project. I need to realize serial communication
          > between PC and Altera FPGA in C or C++.
          > The function of FPGA is working well.
          > it can send data to uart.
          >
          > Does anybody know how to realize it in C or C++?[/color]

          Did you try the Altera web site?

          Altera empowers innovators with scalable FPGA solutions, from high-performance to power- and cost-optimized devices for cloud, network, and edge applications.


          Comment

          • Jason Bennett

            #6
            Re: serial communication between PC and altera FPGA in C or c++

            I'm afraid you have the wrong newsgroup. Try comp.arch.embed ded.


            "sarah" <sarahshen2003@ yahoo.ca> wrote in message
            news:d51c0c2.03 08170713.586b5b 2f@posting.goog le.com...[color=blue]
            > hI,
            >
            > I have a project. I need to realise serial communication between PC
            > and Altera FPGA in c or c++. The function of FPGA is working well. it
            > can send data to uart.
            >
            > Does anybody know how to realise it in c or c++?
            >
            > Thanks
            >
            > sarah[/color]


            ---
            Outgoing mail is certified Virus Free.
            Checked by AVG anti-virus system (http://www.grisoft.com).
            Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/03


            Comment

            • sarah

              #7
              Re: serial communication between PC and altera FPGA in C or c++

              hi,

              I try to the other newsgroup such as comp.arch.fpga. They suggested me
              try comp.lang.c/c++.

              My hardware part: fpga can work well. The data generated in fpga can
              be sent to the serial port. I need to have a file in pc to see what
              the trasmitted data is . then using matlab to plot the data. So, how
              to read the data from serial port in pc is very important.

              Can anybody give solution?

              Thanks.

              Sarah

              [color=blue]
              > I'm afraid you have the wrong newsgroup. Try comp.arch.embed ded.
              >
              >[/color]

              Comment

              • Jan Engelhardt

                #8
                Re: serial communication between PC and altera FPGA in C or c++

                >Subject: Re: serial communication between PC and altera FPGA in C or c++

                Before, apart from the subject i donot understand this message.
                clc/clc++ is not the right place for hardware things (try asking comp.arch.fpga
                or some general HW group).
                However, if you want to talk about C/C++, be welcome.
                [color=blue]
                >My hardware part: fpga can work well.[/color]
                Sorry, I do not know what FPGA is. My hardware always works well.
                [color=blue]
                >The data generated in fpga can
                >be sent to the serial port.[/color]
                Then... do it.
                [color=blue]
                >I need to have a file in pc to see what
                >the trasmitted data is .[/color]
                You could put a fprintf(logfile , "...") in your code after the data has been
                transmitted.
                [color=blue]
                >then using matlab to plot the data. So, how
                >to read the data from serial port in pc is very important.[/color]
                Reading data from the serial port is HW specific stuff.
                Other than that I might suggest taking a look at the inportb()/outportb(),
                _inp()/_outp() or inb()/outb() function and its relatives. Possibly
                http://www.beyondlogic.org/serial/serial.htm might help you.

                --
                - Jan Engelhardt

                Comment

                • Thomas Matthews

                  #9
                  Re: serial communication between PC and altera FPGA in C or c++

                  sarah wrote:
                  [color=blue]
                  > hI,
                  >
                  > I have a project. I need to realise serial communication between PC
                  > and Altera FPGA in c or c++. The function of FPGA is working well. it
                  > can send data to uart.
                  >
                  > Does anybody know how to realise it in c or c++?
                  >
                  > Thanks
                  >
                  > sarah[/color]
                  As others have stated, serial ports are a platform specific issue.
                  I highly suggest you ask in a Windows or MSDOS newsgroup. They
                  will have better knowledge about how to program _their_ serial
                  port.

                  Some platforms require a program to use operating specific
                  functions. Others can access the port directly. Of those,
                  some platforms map the port as an address others require
                  special I/O port instructions. I've worked on both kinds
                  of platforms and I prefer the memory mapped devices.

                  Also, serial ports are very common. Somebody, somewhere, has
                  already written code for the serial port. If you don't get
                  any responses from the Windows or MSDOS newsgroups, try
                  searching the web for serial port libraries.

                  Read the documents below. At least one has a list of
                  newsgroups that would benefit you.

                  --
                  Thomas Matthews
                  C Faq: http://www.eskimo.com/~scs/c-faq/top.html
                  alt.comp.lang.l earn.c-c++ faq:


                  Comment

                  • Sven Semmler

                    #10
                    Re: serial communication between PC and altera FPGA in C or c++

                    sarah wrote:
                    [color=blue]
                    > I try to the other newsgroup such as comp.arch.fpga. They suggested me
                    > try comp.lang.c/c++.[/color]

                    Nope, you are wrong here too, since reading the "serial port" is a matter
                    of your OS. So I suggest you try the folks in ...

                    news:comp.os.ms-windows.program mer.win32

                    .... or the group which is appropriate for your OS (if you happen to use
                    e.g. Unix).

                    /Sven

                    --
                    Sven Semmler http://www.semmlerconsulting.com/
                    GPG Fingerprint: 72CA E26D C2A3 1FEB 7AFC 10EA F769 A9A4 937F 5E67

                    Comment

                    • CBFalconer

                      #11
                      Re: serial communication between PC and altera FPGA in C or c++

                      Sven Semmler wrote:[color=blue]
                      > sarah wrote:
                      >[color=green]
                      > > I try to the other newsgroup such as comp.arch.fpga. They
                      > > suggested me try comp.lang.c/c++.[/color]
                      >
                      > Nope, you are wrong here too, since reading the "serial port"
                      > is a matter of your OS. So I suggest you try the folks in ...
                      >
                      > news:comp.os.ms-windows.program mer.win32
                      >
                      > ... or the group which is appropriate for your OS (if you
                      > happen to use e.g. Unix).[/color]

                      Try comp.arch.embed ded.

                      --
                      Chuck F (cbfalconer@yah oo.com) (cbfalconer@wor ldnet.att.net)
                      Available for consulting/temporary embedded and systems.
                      <http://cbfalconer.home .att.net> USE worldnet address!


                      Comment

                      • Will

                        #12
                        Re: serial communication between PC and altera FPGA in C or c++

                        > Sven Semmler wrote:[color=blue][color=green]
                        > > sarah wrote:
                        > >[color=darkred]
                        > > > I try to the other newsgroup such as comp.arch.fpga. They
                        > > > suggested me try comp.lang.c/c++.[/color]
                        > >
                        > > Nope, you are wrong here too, since reading the "serial port"
                        > > is a matter of your OS. So I suggest you try the folks in ...
                        > >
                        > > news:comp.os.ms-windows.program mer.win32
                        > >
                        > > ... or the group which is appropriate for your OS (if you
                        > > happen to use e.g. Unix).[/color]
                        >
                        > Try comp.arch.embed ded.[/color]
                        They are like bad doctors. They keep refering you to other doctors if
                        they don't now what the hell is going on with a patient.

                        Comment

                        Working...