| | |
obtaining data info from device connected on com1 port
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2004
Posts: 1,620
Reputation:
Solved Threads: 51
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
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
•
•
Join Date: Jul 2004
Posts: 7
Reputation:
Solved Threads: 0
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?
![]() |
Similar Threads
- "ReadFile" problem through COM1 port (C++)
- Get the name of Serial Port to which a Device is Connected (C#)
- Difficulty in reading data thru Com port (Visual Basic 4 / 5 / 6)
- How to check what COM port a device is connected to? (IT Professionals' Lounge)
- manually dumping data to a printer connected to a USB port (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: RAW Packet Forwarding
- Next Thread: Can't Get Going with eVC++4.0
| Thread Tools | Search this Thread |
api array based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






