User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,434 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,643 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 4937 | Replies: 4
Reply
Join Date: Jul 2004
Posts: 7
Reputation: Kalitko is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Kalitko Kalitko is offline Offline
Newbie Poster

obtaining data info from device connected on com1 port

  #1  
Jul 27th, 2004
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2004
Posts: 1,514
Reputation: kc0arf is a jewel in the rough kc0arf is a jewel in the rough kc0arf is a jewel in the rough 
Rep Power: 10
Solved Threads: 49
Colleague
kc0arf kc0arf is offline Offline
Posting Virtuoso

Re: obtaining data info from device connected on com1 port

  #2  
Jul 28th, 2004
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
Reply With Quote  
Join Date: Jul 2004
Posts: 7
Reputation: Kalitko is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Kalitko Kalitko is offline Offline
Newbie Poster

Re: obtaining data info from device connected on com1 port

  #3  
Jul 29th, 2004
Thank you Christian. T'll try to find some info on internet.
Reply With Quote  
Join Date: Mar 2004
Posts: 1,514
Reputation: kc0arf is a jewel in the rough kc0arf is a jewel in the rough kc0arf is a jewel in the rough 
Rep Power: 10
Solved Threads: 49
Colleague
kc0arf kc0arf is offline Offline
Posting Virtuoso

Re: obtaining data info from device connected on com1 port

  #4  
Jul 29th, 2004
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
Reply With Quote  
Join Date: Jul 2004
Posts: 7
Reputation: Kalitko is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Kalitko Kalitko is offline Offline
Newbie Poster

Re: obtaining data info from device connected on com1 port

  #5  
Aug 3rd, 2004
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?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 1:35 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC