•
•
•
•
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
![]() |
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:
Rep Power: 0
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?
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- manually dumping data to a printer connected to a USB port (Windows NT / 2000 / XP / 2003)
- send/received data (C#)
- Driver help Needed!! (Windows 9x / Me)
- Dell Inspiron 3500 com port not working (Motherboards, CPUs and RAM)
- QB compiled communication applications (Visual Basic 4 / 5 / 6)
Other Threads in the C++ Forum
- Previous Thread: RAW Packet Forwarding
- Next Thread: Can't Get Going with eVC++4.0



Linear Mode