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++
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?
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()
Summary: how to read serial port in C language. printf("%d", inport(0)); outportb(0, 65); delay(1000); printf("%d", inport(0)); supposing initial value at serial port is 64. Both printf's display 64 only. When...
Summary: Hi,i need to program the serial port in Win NT via interrupt programming but in a C++ program.Anybody know how to do it?or some place really good to begin?THanks! laura ...
Summary: hi all I need to get an input from the keyboard in my c++-prog. This can by done with getch(), cin or scanf, i know. The programm executs fine until i should enter the char. But then, NOTHING HAPPENS!...