I'd like to interface a USB mouse to an FPGA. Does anyone have any advice regarding how best to go about doing this. I suspect the use of some form of bridge chip or uC is the way to go but all these seem dominated by the assumption that a PC is involved. Has anyone had any experience in doing this kind of thing please?
You could try using the Maxim 3421E which is driven through an SPI interface. I've used one of these and they are quite straightforward to program (a simple register interface). As others have remarked the FTDI and Cypress chips are alternative possibilities.
My advice would be: don't try. It may be possible, but it's almost certainly not practical.
Unless that FPGA is really very big, and doing a heck of a lot of things already, the USB implementation would probably end up an order of magnitude bigger than the entire rest of the the project. It takes a rather powerful CPU and a good deal of extra code/builtin libraries to implement USB host-side. Doing that in an FPGA would be like mounting your bed-side alarm-clock on an 18-wheeler in order to move it long distances.
That's because the whole *idea* of USB is that a PC should be involved. The move towards USB can be interpreted as a nifty marketing plan to keep PCs alive and present in households for the foreseeable future.
I do not know how complex (in matters of FPGA cells) a USB host is, but I think it could be easily placed into one.
I guess you have some kind of soft-core on the FPGA, so you might pull lot of the protocol into software. Also limiting it to USB mouse only might simplify the design.
Anyway, an (fullblown) USB host stack takes about 8K Code on an ColdFire.
--
42Bastian
Do not email to bastian42@yahoo.com, it's a spam-only account :-)
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.