basic 2 stamp and usb...
dottedquad
Posts: 11
I would like to create a project that connects to my computer VIA usb using the basic stamp 2. Then I would like to create a C# program to send and receive commands. Is this possible and what type of hardware would I need to use? The only hardware I thought of is a usb cable and usb port for the hardware end.
-Thanks
-Thanks
Comments
The PC C# program (or whatever) treats the USB adapter as a "COM" serial port. It would be possible to purchase a DB-9 plug, solder some wires to it, and plug those wires into the BOE breadboard. You could then use the USB to Serial adapter with other pins than the BS2 programming port.
However, as Mike says, the 'native' USB protocol is quite involved. There's a 'slave' device, a 'master' device, an identification phase, the 'master' needs to load a 'driver' for the particular 'slave' involved. Unlike RS-232, there's a lot of signalling and communication going on to establish the link. Fortunately, a simple $20 or so USB to Serial adapter handles all of this for you.
So that's the easy way to go. I believe Jan Axelson has written a complete "USB Interfacing" book which covers all the complexities if you really want to go that way. But you could easily spend $3,000 on hardware to get your simple $20 interface working.