Computing.Net > Forums > Programming > Input from Serial Port in Java/C++

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Input from Serial Port in Java/C++

Reply to Message Icon

Name: mossman2
Date: December 21, 2004 at 10:39:16 Pacific
OS: Win
CPU/Ram: x/y
Comment:

I've been asked to write a program that can take in input from a serial port, and then parse it.

I've no problem with parsing, but the input from serial port I could use help on.

Anyone have any advice/links for either Java or C++ as far as serial port communications go?

THanks.



Sponsored Link
Ads by Google

Response Number 1
Name: bamakhrama
Date: December 21, 2004 at 22:52:01 Pacific
Reply:

For Java, you can use Java Communications API which handles Serial and Parallel ports programming. You can get it from Sun website.
For C/C++, it depends on the platform & whether you are using Win or Linux. I have some programs for serial port. If you need them, you can contact me by email.

--
mohameda@ieee.org


0

Response Number 2
Name: secrets
Date: December 22, 2004 at 01:12:13 Pacific
Reply:

in c++ try function outport() and inport()


0

Response Number 3
Name: BraveStone
Date: December 22, 2004 at 01:24:35 Pacific
Reply:

Hi,
There are plenty of documents available on web talking about Serial Communication in Win32.You can find them on MSDN's webpage.Even source code can be found on websites such as code porject(I'm sure I've seen one)

outport()and inport()are good but they only can be used in 98/95.2000 and XP restrict your privilege to access the serial port directly.Instead of those two functions,you could try CreatFile()and WriteFile()

Good luck


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Loop Protection programming memory flags



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Input from Serial Port in Java/C++

how to program for serial port in C www.computing.net/answers/programming/how-to-program-for-serial-port-in-c/8494.html

Win NT Serial port interrupt prog. C++ www.computing.net/answers/programming/win-nt-serial-port-interrupt-prog-c/274.html

get input from keyboard with c++ www.computing.net/answers/programming/get-input-from-keyboard-with-c/7748.html