Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Parralle, Com or USB??

Posted on 2002-05-16
9
Medium Priority
?
175 Views
Last Modified: 2010-04-02
Hi Guys.

I'm very new to C++ infact I'm still doing the course, but I have a question I hope you can help me with.

I want to write a programm that will recognise a posative signal from a probe i want to make. the probe will simple be a light sensor, and i want that sensor to start a in the program and another sensor in the probe will stop the timer.

What i would like to know is how easy is it to get a port to recognise a simple signal??

Hope you can help and hope you dont mind helping a compleate novice (at the moment)

Andy
0
Comment
Question by:MrNov
[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
  • 4
  • 3
  • 2
9 Comments
 
LVL 2

Expert Comment

by:mirtol
ID: 7013376
Very easy on a serial port if your circuit is right. You need only push one of the handshake lines high and low. Similarly on a parallel port. USB isn't worth looking at for what you wnat to do.

You can then read the handshake line status directly from the appropriate IO port

Technicalitites for RS232:
http://www.beyondlogic.org/serial/serial.htm
0
 
LVL 2

Expert Comment

by:mirtol
ID: 7013384
For example, if you used the CTS handshake line and drive it high and low with respect to ground (-5v to +5v will do) you can simply read the status of that line from [bit 4] of your [serial port base address]+6
0
 

Author Comment

by:MrNov
ID: 7014227
Thats great, Thank you for you help, On the same basis how easy would it be to read a resistance change in the same probe and get that info back throught the ports??
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Expert Comment

by:mirtol
ID: 7014248
If you mean actually measure the resistance change - alot harder, all the ports are digital so you would need to digitize the information (A/D converter).

0
 

Author Comment

by:MrNov
ID: 7014266
Well my idea is to write a programe to check a cameras exposure and shutter speeds, from what you have told me so far the shutter speeds shouldn't be a problem, its the exposure i am going to have fun with.
0
 
LVL 2

Expert Comment

by:mirtol
ID: 7015169
It's not really something you would write a program for, it's far more hardware based...

But if you want to persist, you could probably wire something to your soundcard (it does A/D conversion on sound signal) instead as that will give you a 16-bit 48kHz sample rate (if your soundcard isn't ancient).
0
 
LVL 4

Expert Comment

by:havman56
ID: 7021567
MRNOV
what mirtol says is absolutely correct....

i feel u can go for microcontroller based one very easy and really helpfor all such activities best is buy some 8051 kit and work on it!!


u can really play waht ever u want ..


0
 
LVL 4

Accepted Solution

by:
havman56 earned 200 total points
ID: 7021571
if u need any help i may help u out

playing with PC for such kind of activities may not be intresting so go for embedded systems
0
 

Author Comment

by:MrNov
ID: 7045036
thanks for your help and advise guys, will try and stick with it and see what the outcome is...lol
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

636 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