Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I have a device that supplies 5 V signal each time a object passes through it, I want to detect this 5V signal through USB port of a PC and an application increments a variable each time it receives this signal. As a result this behaves as a counter. This is needed because later LPT port was available on systems on which pin 17 directly receives 5V signal and an application receives it. This is not possible with USB port. Thats why I need an ADC to convert this 5V to binary and this binary could be readed by USB port.
I'm not a senior member, but I'll tell you that it's a very odd way to do what you're after. It might only work if the LED is moving & you'd see the mouse cursor move. It's not practical by any stretch of the imagination though.Also Senior members tell me Will this idea work for me accurately?
I've already given you a suggestion in the other thread - use a USB-serial converter & connect the signal line to CTS, DSR or RXD. This has the effect that you seem to be after of the signal being "turned by the processor chip into binary data that our PCs understand and which is sent to the computer though a cord."Waiting for your suggestions......
Um.. thanks for the complement, but I've got something like 40 years before I'm eligible for retirement.Dougy,
For what its worth, I would consider you to be a 'senior member', in age, experience and contributions
CTS & DSR can be read through the serial port status bits, or can raise an event. Activity on RXD can be read by way of a character being received (if the pulse is short) or through the break condition (if the applied 5V pulse is extended).Now please tell me what type of signal is generated at USB port if I pass 5V signal to CTS,DSR or RXD pin.
You should open the serial port before using it, yes.If it is an interrupt signal then I have to open its serial port to detect that signal
You will also have to connect the GND pin appropriately.Also, can I pass 5V signal to only one pin of DB-9 doing nothing with rest eight.
I'm have a bit of trouble understanding what you're on about.
First of all @sissy the USB/RS232 appears as a serial port on the computer. So to find out what is going on at the db9 pin, you open the serial port and you can access the status of the db9 connector. The status passes from the pins of the db9 through the RS232/USB converter through the USB data lines into the computer. If this is not what you're after, then sorry I can't help you.
I can't help you with Java. C#/C/C++/VB.NET/VB6 would be a different story.
tried all the possibilities, this doesn't seems to work. please help me........Try the program I posted, and try connecting the 5V to the CTS or DSR (or CD) lines. If that doesn't seem to work, try connecting 0V to the CTS or DSR (or CD) lines instead.