USB Specification (Don't hit me!)

I just had a really freaky idea.

Suppose, using a few of the digital IO ports on the robot controller, one was able to implement the USB specification, which is outlined at http://en.wikipedia.org/wiki/USB#Technical_details and written in detail at http://www.usb.org/developers/docs/

Besides being wicked cool, it may serve as an interesting method for new input devices (imagine dead-reckoning with a mouse?)

As far as I know, a USB port would only take up 4 DigIO ports, so if you were to add a non-powered USB Hub in there you could have… man, that would just be cool.

Just throwing ideas out there. What do you guys think? Doable on the hardware provided, or would the requirements be too large?

The USB interface is too fast to be processed using digital IO pins on the RC. The USB chicklet is a good basis for what you want to do, but you need the chicklet software to be able to expand its capabilities.

Hmm… Well, for one, I actually wanted to just be able to say I did something so random, and for two, I actually wanted to have the USB port on the Robot controller, rather than on the OI. Specifically for the sake of using a) using a webcam, or b) using two mice for dead-reckoning.

Practical purpose? Perhaps not, but you gotta admit, it’d be pretty awesome just to say you did :wink:

What about interrupts? Those are polled in the fast loop, are they not?

What about using an outboard processor from the PIC18F4550 family. It includes the much of the USB h/w needed. Use a Tx/Rx bus between the two processors either the standard 232 ttl port or using digital pins.

Well, USB has a “device” and a “host”. Making a “device” is easy, but still non-trivial without hardware support. To plug in a mouse though, you’d need a host. This is NOT trivial, and is in fact quite hard.

The USB chicklet is a host. So no, you can’t bit bang a USB port from the RC. Nice try though :slight_smile:

It’d be better to take those mice apart and use the pieces.

ttyl,

–buddy

The suggestion to disassemble the mouse and tap the output from the CCD chip or the bridge chip is a good one. Also, you could put a computer onboard and use its USB ports to talk to the mouse, and its other ports (e.g. serial) to talk to the RC.

Indeed. We did exactly that a couple of years ago, bypassing the USB device hardware and achieving direct communication with an optical mouse’s sensor chip. (We had some success in using that communication to track how much carpet was going by the sensor, as long as the height above the carpet was absolutely constant. The slightest variation – a millimeter one way or the other – changed the pixel-to-distance relationship, and threw off the tracking accuracy to the point where it was no longer useful. We gave up on the concept, but perhaps someone else can come up with a solution that we didn’t think of.)

The Chicklet does support a mouse and can connected to the R/C. The mouse outputs on the x and y axes. These axes could be connected to the R/C analog ports. You will only get .5 to 5 volts but that is enough to do what you are asking. What you need and what will be available shortly is the USBeak. The USBeak is an HID to RS232 converter. In streams the raw data from the device into any USART. Unfortunately it won’t be available until after this season.

I was looking up parts for an unrelated project and cam across MAX3421. It’s a USB controller that can act as a host. I didn’t really read it in detail, but the datasheet specifically mentions using bit banging methods for its SPI interface. It’s effectively a USB to SPI adapter. I have a feeling that the software will still be a challenge though.

I think it said that it only comes in QFN though (surface mount with pads on the bottom rather than leads). It might be hard to work with.