USB
Markysparky
Posts: 21
Is it possible to use the USB2SER Development Tool to take a usb signal and put it through the BS2 and out onto the debug menu (would this be USB packets or Serial packets?) to determine the packets sent from a device and then send data back through the USB2SER Development Tool? I guess I would have to use the serin and serout commands?
mark
mark
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
Jim
"The USB2SER provides an easy way to interface a PC to a microcontroller. It bridges the PC's USB port to logic-level RX and TX signals that can connect directly to a microcontroller's I/O pins."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
USB looks so simple to the user _because_ it's so complex (and rather nicely designed).
Steve
The USB1 spec (you really, really don't want to be thinking about USB2) is here:
http://www.usb.org/developers/docs/usbspec.zip
along with more information than you can shake a really big stick at.
It's faintly possible that, with extreme cunning and an SX running at 100MHz, you could build a truly simple master, as long as you compiled in all the constants. Handing off some of the bitshifting, CRCing, line-driving (and turning-around), to a CPLD or FPGA would help - should make it possible, although still not trivial. Banning hubs, and abandoning any pretence of being USB compliant, would give you some more slack time. At least, by being a host, you shouldn't have to worry about clock recovery.
It's a hard project, and because the end result would likely be limited, end users would be perpetually dissapointed. I wouldn't touch it with a bargepole [noparse]:)[/noparse]
Anybody hoping to hang a USB host connector on the side of a Stamp just gets the simple 'no'. Serial is so much simpler.
Steve
It might be possible to build a low-speed interface that fakes being a hub port, rather than a host. There don't seem to be any sequence counters, at the lower layers anyway, which would have precluded precalculating the CRCs, and since the hub strips out any full speed transitions before they make it to the low speed device, you've got a _lot_ more time to think about things on an SX. Maybe even enough to deal with frames on the fly, rather than precalculating everyting. Memory will be tight though - it deends how chatty the device wants to be.
Dunno if any useful devices speak low-speed, though. Anyone?
HID devices, which I guess are the most likely (only?) candidates are described here:
http://www.usb.org/developers/devclass_docs/HID1_11.pdf
Still tricky, and it'd not be a generic host, more a bodge to use a specific device, but it's looking slightly more possible.
Steve
I know I will have to use the serout command but what would the command look like if i were to use the "A" button? or the joystick?
mark
Just because "USB" contains the word "Serial" does not mean that it has anything in commmon with, or interoperability with, RS232.
You can _NOT_ attach a USB device directly to a Stamp. Stop trying.
(The converter I described earlier is a seriously tricky piece of work. A hundred hours or so, with serious development tools, for somebody who knows what they're doing, and I'm still not sure it's possible. Right now, you don't know what you're doing, so it's not going to be you. It's not going to be me, either).
If you really want to use your controller on a Stamp, then hack it open and attach the switches to the pins on the Stamp, and ignore the USB completely.
Steve
Jim
Steve
Jim