chipKIT® Development Platform

Inspired by Arduino™

Microchip USB library

Created Wed, 06 Jul 2011 11:00:16 +0000 by svofski


svofski

Wed, 06 Jul 2011 11:00:16 +0000

I know about HardwareSerial_usb, but I want to see what else is out there and possibly add my own HID, or explore other transfer modes. So last night I tried Microchip USB library. To make it easier on myself, I took the CDC Serial example. It didn't work. After some investigation, I noticed that they do not enable pullups (those that should indicate presence of a device to the host?). That is, they kinda do, but the constant that should have enable bits is defined as 0x00.. After I changed this to the values found in HardwareSerial_usb, this the host began expressing some interest to my device, but still can't enumerate it. I guess the next step is the interrupt handler.

Did anyone try this yet? I'm sure I miss something obvious, even though I don't see how 0x00 could enable pullups...


Mark

Thu, 07 Jul 2011 01:46:12 +0000

The microchip USB library is being worked on to make a usable library within Arduino. The current plan is to have it ready when the ethernet/usb shield is released later this month.

Mark


svofski

Thu, 07 Jul 2011 08:52:24 +0000

Thanks for the info.

Meanwhile I got my device enumerated, so it's not all that bad.


svofski

Thu, 07 Jul 2011 19:07:45 +0000

$ unzip -l PIC32_ESK_USB_Device_CDC_Basic_Demo_042611.zip 
Archive:  PIC32_ESK_USB_Device_CDC_Basic_Demo_042611.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
  3245343  04-27-11 14:29   PIC32_ESK_USB_Device_CDC_Basic_Demo_042611.exe
 --------                   -------
  3245343                   1 file

Sigh. Just how badly one must be wrong in the head to do atrocities like this? This is a crime against common sense and everything on Microchip site is packaged like this.


Mark

Fri, 08 Jul 2011 02:48:55 +0000

I have brought this to their attention. They are aware of it and are working on it. There new release of MPLAB-X, which is cross platform, is forcing them to re-do this for EVERYTHING.

Mark


svofski

Fri, 08 Jul 2011 09:06:24 +0000

Cool, so they're listening, nice! In that case, maybe they would also re-think the ideas that make them package a bunch of embedded source code files as an installer, like they did with the USB library? This is unnecessary and unnoying, even though they were kind enough to "port" some of these packages to OS X and Linux.