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.
Serial Port Help in C++
Name: megadith Date: July 2, 2002 at 13:11:42 Pacific
Comment:
I'm creating this code that will operate a scale. I'm using a 9pin serial cable and operating at 7-O-1 at a baudrate of 1200. I want to receive and send information using inp and outp. I was using ProComm, a terminal progrom for DOS, to send commands to the scale by using the keyboard but used a shell to go back to DOS. We using Borland C++ in DOS through this shell my program works fine, it receives and sends perfectly, but when I'm not in this ProComm DOS shell, it will send all right but nothing will be recieved. Any Ideas on why? I think something has to be with the fact that the COM port is not open but I don't know why. Any help will be great.
Do you know what the Procomm port settings are? eg RTS/CTS or Xon/Xoff, DSR/DTR etc.
I'm just guessing here. It is possible that Procomm changes the settings when it is communicating with your keyboard but it reverts on exit from procomm. If you make sure those signals are the same, it might magically start working.
It may also be that you are getting an overrun because the data is not taken off the input port fast enough.
Check the settings first and make sure your program is doing the same.
0
Response Number 2
Name: borelli33 Date: July 6, 2002 at 06:37:14 Pacific
Reply:
Just another thought guys....
Does the COMM app for DOS call the port by resource name or address? i.e. COM1 or 3F8?
0
Response Number 3
Name: megadith Date: July 8, 2002 at 07:12:39 Pacific
Reply:
I call the port by using 3f8. I talk directly to the UART I check the data recieved port (com_port+5)and it says that there is nothing there when I see a signal coming back to the computer. Thanks for all your help.
Summary: Hello Sandysan, I am also in the same situation. I have a serial port program in Linux but the same program is not working for ARM based board. I don't have any issues with 'tty' or 'COM port'. You go...
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 wanna do some work in c++ using port of computer(port communication), as i have just the knowledge of c++ . plz guide me anyone . How i can write the first code ? Thanx ...