C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-15-2006, 10:41 PM   #1
Registered User
 
Join Date: Sep 2005
Posts: 92
Writing data to serial port

Hello

I want to wirte code that will be able to send data to a serial port(RS232) but I never did such thing before. Can anyone give me some pointers on how this can be done. How to send a simple data like "hello" through the serial port.
HAssan is offline   Reply With Quote
Old 10-16-2006, 01:54 AM   #2
and the hat of Destiny
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 22,495
I've got an interesting game to play.
It's called guess the OS and compiler.

Nah, I'm bored of that game, you'll just have to tell us.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Old 10-16-2006, 06:24 AM   #3
Registered User
 
Join Date: Sep 2005
Posts: 92
Opearting syatem and compiler

My operating system is windows XP and the compiler i'am using is turbo C. I would really appriciate any hepl anyone can give me because I have no idea how this is done. It would be nice if someone can point out the structure of the program.
HAssan is offline   Reply With Quote
Old 10-16-2006, 11:04 AM   #4
and the hat of Destiny
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 22,495
Is there a real reason as to why you're using a 16-bit fossil compiler on a 32-bit OS?

Vista is nearly here - are you still gonna try and use that compiler?
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Old 10-16-2006, 12:07 PM   #5
{Jaxom,Imriel,TBD}'s Dad
 
Kennedy's Avatar
 
Join Date: Aug 2006
Location: Alabama
Posts: 1,035
What Salem is trying to tell you is that you need to download and install Code::Blocks, Dev-C++, or some other IDE that has the compiler with it. . . those that I mentioned include GCC.

As far as writing to the serial port, Google is your friend. Try this search string:
"C programming" Windows XP "serial port"
Experts Exchange was the first thing I got. There was a complete example in that listing.
Kennedy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial Port Questions valaris Tech Board 2 05-22-2009 08:26 AM
sending data over UDP from serial port forumguy Linux Programming 0 04-25-2009 02:10 PM
xor linked list adramalech C Programming 23 10-14-2008 10:13 AM
Passing serial settings from pseudoterminal to physical port djinn Linux Programming 2 05-22-2008 11:43 PM
gcc problem bjdea1 Linux Programming 13 04-29-2002 06:51 PM


All times are GMT -6. The time now is 12:04 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22