• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 318
  • Last Modified:

reading data from serial port

i'm trying to connect an external device to the COM1 serial port and have a program to read the data from it and store it as a file.

Storing as a file is the easy bit, but i don't have a clue how to read from the serial port.

Any suggestions??
0
sweenster
Asked:
sweenster
1 Solution
 
peter_sheynkmanCommented:
0
 
AlexFMCommented:
If you are working in Win32, read MSDN article:

Serial Communications in Win32 by Allen Denver

(MSDN - Technical Articles - Windows Platform - Base Services). It contains sample application MTTTY, one of it's functions is saving information from port to file.

Online version of this article:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp
0
 
KocilCommented:
Yeah, a low level programming question like this should describe the platform (hardware, OS, compiler).
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
MartinGreenCommented:
We will need to know

1) Operating system you are using

2) Level you are programming at. For example if you are using windows, then I would suggest using the windows API functions to perform overlapped IO to the serial port. If you are programming for an embedded system then you will probably be programming at UART level which I can help with but need more info for!!

Regards

Martin Green
0
 
sweensterAuthor Commented:
I'm using windows, but am just going to create a DOS application using C. (using Borland C++3.1 for DOS).

The pereipheral I am connecting to it is an ADAM-5510 unit (don't know if any of you guys have heard of it or not). It's basically a ROM-DOS PLC data logger.

My existing DOS application (runningon ADAM) logs data and saves it to a file - dead easy. Next step is to send the data back to a PC that can be plugged in to ADAM's RS-232 serial port.

Soooo... if you could recommend an easy way of doing this it would be cool. Have never done any serial port-related programming before...
0
 
havman56Commented:
just open hyperterminal
programs->accessories->hyperterminal which comes with windows

just set baudrate and port number read it
u need not have any progarm foir it
it is available in all windows osfwtare use it

0
 
jmcgOwnerCommented:
Nothing has happened on this question in more than 9 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by havman56.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now