Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 03-25-2008, 09:36 PM   #1
In Runtime
kostonbleeds's Avatar
Join Date: Dec 2007
Posts: 391
Default using a parallel port

i want to setup a circuit that will use push buttons to read voltages through the parallel port. does anyone know how to do this? i've got the dll and some code written but im not sure how to get it to read incoming and then display a voltage. im trying to do this through visual basic. also i would like to be able to use those voltages as a way of varying RGB on screen. basically this is what im given.

read the voltage state of a push button or switch through the parallel port. a minimum of 3 buttons should be used.
use the push buttons to adjust the RGB colors of the comp screen
Use an 8 pin dip switch to turn the voltages of each switch to on and off. read the input from the dip switch to the computer screen.

My setup: AMD Athlon 64 X2 Dual-Core 4000+, 2Gb A-data ddr800, MSI K9A2 CF 790X, MSI 2600XT T2D512EZ, Samsung DVD-RW, Ultra 500W PS Vseries, Maxtor 80Gb, Aspire Mid-tower case, Windows xp Home, Westinghouse 19" LCD
kostonbleeds is offline   Reply With Quote
Old 03-27-2008, 08:00 AM   #2
Site Team
root's Avatar
Join Date: Mar 2004
Posts: 7,872
Default Re: using a parallel port

there are no a-d converters in the parallel port.

you'll need to build an A-D converter which you can then plug into your parallel port.

this could be done in 2 ways.

either a simple op-amp comparator this will however limit your range of voltage you can read to 8 steps.

or you could use a converter that you could buy.

or program your own converter using PIC chips.

or use a large op-amp circuit with a lot of logic circuits after it to make a proper 8 bit A-D converter this will give you 256 steps in your readings.

Personally however, I think that if you are going to do this then the best way is to buy or make a thing to read the voltage and transform the analogue signal (voltage) into a binary data signal.

you'll find most of these shop bought ones will use a serial link rather than a parallel link as parallel ports are getting rarer and rarer now!

also using the serial port in VB is easier than using the parallel.
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 03:46 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0