What port do I use to send information to a piece of hardware?

brreaker

New member
Power User
Local time
11:46 PM
Messages
83
Location
Spain
This isn't really related to windows 7 (although I am using it and doing my programming based on it), I have a simple circuit consisting of a battery, a transistor and an LED.
I want to use the transistor to light up the LED by sending voltage to a cable. I tried using the USB port, however, it has a positive, negative and 2 data cables. Both cables are continuously sending data, so I cannot make the voltage 0 on any of them and stop the LED.
I've heard I must use a printer port, or an ATA connector, I am fairly unsure of what control software has over hardware. Any help is greatly appreciated!
Later edit: I mean other than using an USB interface
 

My Computer My Computer

At a glance

Windows 7 ultimate x64AMD Athlon II x2 2456 GB DDR3 1800 mhznVidia GeForce GT220
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build
OS
Windows 7 ultimate x64
CPU
AMD Athlon II x2 245
Motherboard
Asrock N68C-GS FX
Memory
6 GB DDR3 1800 mhz
Graphics Card(s)
nVidia GeForce GT220
Sound Card
Creative SB Audigy SE
Monitor(s) Displays
Acer V226HQL
Screen Resolution
1920x1080
Browser
Google Chrome
With a 16 bit OS or even Windows 9x this would be a relatively simple task. But with the NT platform direct access to hardware is the exclusive domain of system level code. Actually it is done by the HAL but that can only be called with system level code, or in other words a device driver. Writing a device driver is not a simple thing.

You really need to find a device driver that can do what you want.
 

My Computer My Computer

At a glance

Windows 7 Pro 64 bitXeon W35208 GBNvidia Geforce 210
Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP
OS
Windows 7 Pro 64 bit
CPU
Xeon W3520
Memory
8 GB
Graphics Card(s)
Nvidia Geforce 210
I see, thank you for the time you took to reply. However, I understand that using an ATA connector I can trick the pc into thinking it is sending data to the CDRom via VB. But I think the safest and easiest way is buying an USB interface that has a microchip and allows you to control hardware via programming. At 30 bucks they are fairly inexpensive. Thank you again for your time.
 

My Computer My Computer

At a glance

Windows 7 ultimate x64AMD Athlon II x2 2456 GB DDR3 1800 mhznVidia GeForce GT220
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build
OS
Windows 7 ultimate x64
CPU
AMD Athlon II x2 245
Motherboard
Asrock N68C-GS FX
Memory
6 GB DDR3 1800 mhz
Graphics Card(s)
nVidia GeForce GT220
Sound Card
Creative SB Audigy SE
Monitor(s) Displays
Acer V226HQL
Screen Resolution
1920x1080
Browser
Google Chrome
Back
Top