stamp controlled USB?????
Velvet Leopard
Posts: 47
Can a basic stamp control a USB device such as a three button scrolling optical mouse????· Just wish to know.· I was rambling through the parallax home page and saw the ads for FTDI.· Will these FTDI chips and adapters allow the stamp to use USB???!!!
Post Edited (Velvet Leopard) : 8/15/2004 4:52:33 AM GMT
Post Edited (Velvet Leopard) : 8/15/2004 4:52:33 AM GMT
Comments
The wire that plugs into your USB port is made of 4 small wires and one slightly larger wire. The wire colors are as follows (small wires) red, black, white, green (large wire) black.
I checked out the circuit board and found that the small red wire and the small black wire are apperently positive and negative, I guess they supply power/ground the circuit. the larger black wire is apperently another ground wire as it it conected to the smaller black wire.
The green and white must be the output wires.
we are geting ready to leave but when we get back Ill check out the circuit board some more and see if I can figure out what the green and white wires do.
Anyways, I plugged in the usb cable into my pc and tested it with my voltmeter, it put out 5 volts. Perfect for interface with the basic stamp.
So... aparently if you hooked up the mouses + pin to the stamps VDD and the mouses - pin to the Stamps VSS it should get adaquate power to run it.
Im sorry but I just couldnt figure out the exact useage of the green/white wires. This circuit board has some sort of microcontroller (model # CY7C63001A- brand name unknown) and although I could trace which pins the green/white wires going to (on the micrcontoller that is) I couldnt figure out where the leads coming off the buttons/wheel were going because some of the printing went under the microcontroller and without actually removing it I cant tell whats going to what.
My best guess would be that they are both outputs, one being for the left/right buttons (and posibly the 3rd button under the wheel) and one being for the scroll wheel (and possibly the 3rd button).
My guess is this mouse could easily be interfaced with the BS2, but you would have to figure out how to decode everythign the mouse sends to the PC when movement is detected.
Hopefully somone else knows more about this as I would like to get this project working. It would be neat to be able to control my BOE-bot with a mouse.
If you want pics of the "guts" of my mouse let me know.
Upon further inspection of the USB "plug" (if you will) it apears to have 4 contacts inside of it, I suspect these are connected to the 4 smaller wires inside of the lead wire that goes into the mouse, and I beleive the larger black wire is connected to the metal casing of the USB "plug".
I now beleive that since all male USB "plugs" have these same 4 contacts inside that one must be +, one -, one input, and one output. Thus making the green/white wires inputs/output NOT two outputs as I had orignally thought.
Now heres the kicker, if the green/white wires are infact input/ouput why in the world would a mouse need input??? What would the PC need to tell a mouse? Seems like they would have just left it out and saved money on the extra wire needed.
One more question arises, which wire is output and which input? For some reason my gut tells me that the white would be output, but I dont know for shure.
Anyways, I strongly think its possible to interface an optical mouse with the BS2, if a playstation remote can do it I dont see why soemthing made for a computer cant.
Post Edited (jakjr) : 8/15/2004 9:37:04 AM GMT
You may find many of these pinouts and diagrams helpful for your present investigations, as well as those in the future:
http://www.networktechinc.com/technote.html
Regards,
Bruce Bates
Thanks for that link, now I just need to figure out what data +/- means, I guess + would be output?
Post Edited (jakjr) : 8/15/2004 9:35:30 AM GMT
Jan Axelson's 'USB Central'· http://www.lvr.com/usb.htm
USB 2.0 Specification· http://www.usb.org/developers/docs
Also keep in mind that the USB mice can operate either as USB devices or as serial devices [noparse][[/noparse]edit: that is,·as PS/2 connected devices].
HTH,
Daniel
Post Edited (daniel) : 8/15/2004 12:16:11 PM GMT
The CY7C63001A chip is a Cypress Semiconductor Corporation USB controller.· You can check out the (very scary) specs at:
http://www.cypress.com/products/datasheet.cfm?partnum=CY7C63101A
These are not your pop's MAX232 chips- they are complete MCU's with multiple I/O, ram, FLASH and a monster double-pumping ALU.· That being said, once the firmware is in, they are pretty easy to use.· For more info, check out (as usual) Jan Axelson's amazing "USB Complete V2."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dr. Peter C. Charles
Director, Research and Technology
CyberBiota, Incorporated
Peter.charles@cyberbiota.com
http://www.cyberbiota.com
Also, does anyone have any idea's of what kind of code to use to decode what the mouse normally outputs to the PC when movement is detected?
Post Edited (jakjr) : 8/15/2004 9:04:40 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
I would not have got even my·simple test app to work if I did not use the Mircochip USB development board (PICDEM USB) and just some simple modifications to existing example code. Plus I have available multiple programmers for PICs that work with MPLAB.
If that is Greek to you, you have a very steep curve to walk up to use these parts. I'd definately suggest go with·Jon Williams suggestion of something like the FTDI serial to USB converter.
Even with the FDTI converter you can expect a steep learning curve.
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office