?
Solved

reading data from serial port

Posted on 2003-03-13
8
Medium Priority
?
313 Views
Last Modified: 2013-11-15
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
Comment
Question by:sweenster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 8127733
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
 
LVL 5

Expert Comment

by:Kocil
ID: 8127982
Yeah, a low level programming question like this should describe the platform (hardware, OS, compiler).
0
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
LVL 1

Expert Comment

by:MartinGreen
ID: 8142688
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
 

Author Comment

by:sweenster
ID: 8147702
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
 
LVL 4

Accepted Solution

by:
havman56 earned 200 total points
ID: 8195390
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
 
LVL 20

Expert Comment

by:jmcg
ID: 10131900
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question