News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to control an external device.

Started by seaview, December 20, 2007, 08:32:06 PM

Previous topic - Next topic

seaview

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.

zooba

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

dsouza123

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.

dsouza123

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.