469,322 Members | 1,641 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,322 developers. It's quick & easy.

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
Nov 13 '05 #1
11 6670
sa***********@yahoo.ca (sarah) wrote in
<d5*************************@posting.google.com> :
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++?


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 DeathStation2000(tm) and SiriusCyberneticsCorp.'s(tm)
NasalDemonGenerator(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.
Nov 13 '05 #2


sarah wrote:
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


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
http://www.marshallsoft.com
--
Al Bowers
Tampa, Fl USA
mailto: xa*@abowers.combase.com (remove the x)
http://www.geocities.com/abowers822/

Nov 13 '05 #3
Irrwahn Grausewitz wrote:

<snip>
Anyway: if you'd read the c.l.c's charter and faq,
Charter? What charter?
--
Proofread carefully to see if you any words out.


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

--
Richard Heathfield : bi****@eton.powernet.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
Nov 13 '05 #4
sarah wrote:
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++?


Did you try the Altera web site?

http://www.altera.com/

Nov 13 '05 #5
I'm afraid you have the wrong newsgroup. Try comp.arch.embedded.
"sarah" <sa***********@yahoo.ca> wrote in message
news:d5*************************@posting.google.co m...
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

---
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
Nov 13 '05 #6
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

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

Nov 13 '05 #7
>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.
My hardware part: fpga can work well. Sorry, I do not know what FPGA is. My hardware always works well.
The data generated in fpga can
be sent to the serial port. Then... do it.
I need to have a file in pc to see what
the trasmitted data is . You could put a fprintf(logfile, "...") in your code after the data has been
transmitted.
then using matlab to plot the data. So, how
to read the data from serial port in pc is very important.

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
Nov 13 '05 #8
sarah wrote:
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

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.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html

Nov 13 '05 #9
sarah wrote:
I try to the other newsgroup such as comp.arch.fpga. They suggested me
try comp.lang.c/c++.


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.programmer.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
Nov 13 '05 #10
Sven Semmler wrote:
sarah wrote:
I try to the other newsgroup such as comp.arch.fpga. They
suggested me try comp.lang.c/c++.


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.programmer.win32

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


Try comp.arch.embedded.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 13 '05 #11
> Sven Semmler wrote:
sarah wrote:
I try to the other newsgroup such as comp.arch.fpga. They
suggested me try comp.lang.c/c++.


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.programmer.win32

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


Try comp.arch.embedded.

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.
Nov 13 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Andreas Horneff | last post: by
1 post views Thread by george jetson | last post: by
3 posts views Thread by carmen | last post: by
6 posts views Thread by Leandro Berti via DotNetMonster.com | last post: by
reply views Thread by Dhananjay | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.