|
-
May 20th, 2002, 03:54 PM
#1
Thread Starter
Addicted Member
Reading from Hardware??
Ok, i know this is kind of a longshot, but i'll go ahead and ask... I want to try to rig up something so that my computer can read from 1 or more variable resistors (like a volume switch on a radio) through an USB or serial cable. I am clueless about 2 things... Mostly, how do i get the computer to look through the serial or usb and read the current going through the variable resistor. The second is problably more for a electronics forum (lol) but while i'm at it, does anyone have any ideas or experience on making home-made hardware devices for computers to read from. Well, thanx for your help...
To protect time is to protect everything...
-
May 20th, 2002, 06:12 PM
#2
Frenzied Member
Are you using some kind of specially made serial-interfaced board with the inputs all sorted out already and you just want to read from the serial port? Or are you looking to create the whole thing yourself including the serial interface?
If you have some kind of 3rd party serial-interfaced board for playing around with electronics, I would say look at the documentation for the product. There is probably an API for it.
If you want to make the whole thing from scratch, or you can't find any kind of API, I would suggest you read up on the serial interface and how to read/write to/from it. There are probably libraries out there that abstract it out a bit and make life easier with a higher-level API, if you look around a bit.
If it helps, I think the standard serial interface's code is RS232. That might help if you're searching.
Harry.
"From one thing, know ten thousand things."
-
May 20th, 2002, 06:57 PM
#3
PowerPoster
your ports will not read a resistor setting directly, regardless of whether you are using a USB, a standard serial port, or the parallel port. That's because they all read digital signals and you're looking to generate an analog signal. You'll have to convert the analog serial into digial. A parallel analog-to-digital converter is your best bet, then you can read it from the parallel port. It is conceptually trivial, but if you don't know what you're doing, it will make you pull your hair out.
-
May 20th, 2002, 08:17 PM
#4
Thread Starter
Addicted Member
Is there any type of connection on your computer that is analog? The line-In port maybe?
To protect time is to protect everything...
-
May 20th, 2002, 09:59 PM
#5
Thread Starter
Addicted Member
Also, i have thought of buying an ADC from radioshack or something... would that work?, and if it would, what would i need?
To protect time is to protect everything...
-
May 21st, 2002, 12:03 AM
#6
Addicted Member
Dial up Modems are analog. Midi or Joystick might be analog.
-
May 21st, 2002, 01:56 PM
#7
Frenzied Member
Modems are DACs, they're digital as far as the computer is concerned but they communicate over an analogue telephone line. The word 'modem' is like 'codec' (coder decoder) derived from 'modulator demodulator', which mean to convert from digital to analogue and from analogue to digital.
The standard line-in on a sound card is analogue. I think most old game controllers (like joysticks) are analogue too.
Harry.
"From one thing, know ten thousand things."
-
May 22nd, 2002, 01:52 PM
#8
Junior Member
Everything passing through your computer it digital. You'll have to use an A/D converter and seperate it into different channels... the more channels the closer you are to analog.
I'd give my right arm to be ambidextrous.
2B | D4
-
Sep 5th, 2002, 03:16 AM
#9
New Member
-
Sep 8th, 2002, 06:47 PM
#10
Maybe take a look at this
USB link
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|