im new in the world of pic and i need a little help. recently a made a basic USB HID whit my 18f4550 (2led on/off) and now i would like to make a host. I know my 4550 cant make host and I see that some pic24 can do. I try to read about it but am lost. I have MikroC and I get the lib USB HOST. I try to understand the 2 exemple that it give but they are complex and not so commented. My goal is to take data from my xbox 360 controler (usb) and read the value of the stick or button on a LCD. I would like to have some starting point or tutorial or code exemple more basic.
Sorry about my englis im canadian french and i do my best.
What you want mean ? I know that the controler have 14 output and 0 input. And if i tcheck whith the usb terminal on mikroc i can see some byte scroll.
it's true that USB is very difficult for beginners, so i want to ask you a few questions...
- why do you want a gamepad in your project? if it's for generic input I suggest you a simpler shift register like the SNES gamepad or a SPI interface for a Playstation dual shock 2 (you can even get the analog values! and vibrate the controller!!!, but not the PS3 controller, that one is USB-bluetooth and it's harder than your xbox controller)
-how much do you know about microcontrollers and USB? would it suffice a USB to UART-TTL converter?? if yes, I suggest you to look at the vinculum VNC I used one of the modules and configured to send the endpoint data constantly via the UART... so your 14 bytes could get via the USART port...
If you want to learn to make a USB Host, I suggest you to read a lot the USB specification, and the implementation in your compiler (it seems there is a USB Host Library in MikroC for dsPIC, PIC24 and PIC32 so you need at least some knowledge about these new pics...) I finally suggest you to get a HID keyboard example working first... then changing to your gamepad should be breeze...
My goal in this is to take the data from my controler in my PIC and analyse them to send the info in the NRF24L01. I whant to make a RF controler whit my xbox controler. So yes a Ps2 controler can be an option but i prefere the xbox controler (its my opinion). I will try to make an HID on pc first for practice. And yes a will need luck and patience but i will have it.