The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: seaview on December 20, 2007, 08:32:06 PM

Title: How to control an external device.
Post by: seaview on December 20, 2007, 08:32:06 PM
I would like to be able to send a signal to the computer via a USB cable, have MASM read the signal then perform an action such as operate a relay. Can anybody help me or tell where I can learn how to do this.

Regards Seaview.
Title: Re: How to control an external device.
Post by: zooba on December 20, 2007, 08:41:11 PM
You'll need a driver, firmware and some USB hardware. I recommend searching around for USB development kits that come with all of this - you'll need to pay for it, but there really isn't much alternative with USB. You (should) get sample code (in C probably) for how to use it, which you can then translate to MASM.

Of course, something like this will be much simpler if you use the parallel or serial port, due to the protocols being simpler. Again, Google is your friend.

Cheers,

Zooba :U
Title: Re: How to control an external device.
Post by: dsouza123 on December 21, 2007, 10:41:11 AM
The webpage http://www.lvr.com/usb.htm by the author of the book USB COMPLETE
has hundreds of links that seem to cover anything USB.

Included are sections on hardware, utilities, drivers, protocol analysers and much more.
Title: Re: How to control an external device.
Post by: dsouza123 on December 22, 2007, 01:34:20 PM
For the  send a signal  part you could use, to simulate or for the final device,
a usb gamepad and write a program in MASM to check for a button press.