943,708 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 6840
  • C++ RSS
Jul 27th, 2004
0

obtaining data info from device connected on com1 port

Expand Post »
Can sombody advise me or show me a semple code how I can obtain 10 bit data information from device connected to my com1 port?
Thank you very much in advance.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Kalitko is offline Offline
7 posts
since Jul 2004
Jul 28th, 2004
0

Re: obtaining data info from device connected on com1 port

Hello,

This one is going to be dependant on the OS. For example, in linux, I can read the raw data on the parallel port by doing some things with the hardware in C, and "read" the port. I take a look at the high (voltage up) and low (no volts) and determine an "answer".

BUT

You are trying to do serial information, so the data is going to be "organized". Your 10 bits might have 1 start bit, 8 data bits, and a stop bit. Your code will probably be OS dependant.

I would suggest doing a google search on this. For me, it would be Linux (as my Mac has USB and that is something else entirely) so I would search on "Linux Serial Port Programming" and I found this:

http://tldp.org/HOWTO/Serial-Program...WTO/index.html

If you do lift sample code, you should in your comments credit the source of the algorithm.

Christian
Team Colleague
Reputation Points: 121
Solved Threads: 57
Posting Virtuoso
kc0arf is offline Offline
1,629 posts
since Mar 2004
Jul 29th, 2004
0

Re: obtaining data info from device connected on com1 port

Thank you Christian. T'll try to find some info on internet.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Kalitko is offline Offline
7 posts
since Jul 2004
Jul 29th, 2004
0

Re: obtaining data info from device connected on com1 port

Hello,

Do check back here to see if others have input. And if you could, please post what you find, so that others can learn too.

Thanks,

Christian
Team Colleague
Reputation Points: 121
Solved Threads: 57
Posting Virtuoso
kc0arf is offline Offline
1,629 posts
since Mar 2004
Aug 3rd, 2004
0

Re: obtaining data info from device connected on com1 port

I couldn’t get to anything yet and probably will go in different direction: I was able to obtain the data from the port with Hyper Terminal. Now the question is how to obtain the data coming from 4 channels in a format of numbers from 0 to 1024 (10 bits), which changes every 0.25 seconds and to manipulate it with a C++ program?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Kalitko is offline Offline
7 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: RAW Packet Forwarding
Next Thread in C++ Forum Timeline: Can't Get Going with eVC++4.0





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC