Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Other PIC USB stacks?

Status
Not open for further replies.

toodles

New Member
I won't lie; USB is some complicated stuff that I still haven't gotten my head all of the way around. If it helps any, the ONLY part of it I'm interested in is HID devices; gamepads/joysticks to be exact.

The Microchip written USB code is good and doing the trick, but my god is it convoluted and huge. I seriously don't have a clue what is going on in it, and every time I try to work my way through it, I get horribly lost.

I'm curious if anyone knows of other alternate USB code available for the USB enabled PIC18's, specifically the 4550 and others in that family. I have seen the CCS code, but it is only for PICC, not the C18 compiler. I'll still look through it, but I wanted to know if anyone knew of an alternate USB code, in C18 or PIC assembly, that might be easiler for me to read through and understand.
 
You missed the point. Whether there is a need or not, I want to understand. If you don't know of any other USB code available, that's cool. But the need to understand it is my call.
 
toodles said:
You missed the point. Whether there is a need or not, I want to understand. If you don't know of any other USB code available, that's cool. But the need to understand it is my call.

Then study the MicroChip code - that's obviously the best example, as it's from the manufacturer of the chip.
 
You could also look at the examples for the 16C745. These are in asm and the chips don't have the double ported ram to complicate things. Personally, I'd just use it. I tried to follow it and, like you, got hopelessly lost. I think it was somewhere around chapter 9 that I got lost. :D

Good luck,

Mike.
 
Pommie said:
You could also look at the examples for the 16C745. These are in asm and the chips don't have the double ported ram to complicate things. Personally, I'd just use it. I tried to follow it and, like you, got hopelessly lost. I think it was somewhere around chapter 9 that I got lost. :D

I got a 16C745JW (UV eraseable version) as a free sample from MicroChip (they later stopped providing JW's as samples) - I've never got round to actually using it, like you I found the USB code VERY complicated. BTW, the actual purpose of the sample was to add it to WinPicProg, and this I did.
 
I feel your grief. But if you truely want to understand it you need to understand USB. Yes, that means, on a regular bases, reading the USB 1.1 or 2.0 protocal spec sheet. Try to focus on only what you need to get done.

I have chosen not to post my disgust of this rediculus, resource wasting, cash sucking, main code intrusive protocal known as USB. :)
 
Although it won't help you to understand USB, this is my favorite quick solution to USB:

https://www.sparkfun.com/commerce/product_info.php?products_id=787

Incredibly easy to use - just strobe your bytes to/from the 8-bit interface. It's handled as a serial data stream on the PC side, so you just set up your own custom packet routine with a header/footer designation and go from there. Win32, .net, even mac software examples are available on their corporate website too.
 
rackley said:
Although it won't help you to understand USB, this is my favorite quick solution to USB:

https://www.sparkfun.com/commerce/product_info.php?products_id=787

Incredibly easy to use - just strobe your bytes to/from the 8-bit interface. It's handled as a serial data stream on the PC side, so you just set up your own custom packet routine with a header/footer designation and go from there. Win32, .net, even mac software examples are available on their corporate website too.
Appreciated, but won't help for my goals. I'm trying get enough understand of the USB stack inside a pic so I can imitate as close as possible a legit PlayStation 3 and Xbox controller. Possibly Xbox360 is anyone figures a way around the protection they used. The PS3 and Xbox are USB devices, but they differ in some minor ways, and I need to understand the USB implementations on the PICs so I can duplicate their behavior.
 
A while ago, I was looking for a simple ASM solution to Microchip's USB stack for just implementing a few basic usb functions and found these:

http://www.alanmacek.com/usb/
**broken link removed**

Also see this microchip forum article which discusses the USB code and links to code developed by Prof. Brad Minch :
**broken link removed**

I have not yet tried using any of the above code, but it looks interesting as an alternative to just using the Microchip code.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top