Over the past couple of weeks I have been working on a new USB stack for chipKIT boards.

This is intended, eventually, to replace the USB support in the core, but for now whilst testing and enhancing it with more devices it is in the form of a standard library you can drop into your favourite IDE.

The new stack gives you easy access to a number of USB device mode profiles which you can mix and match at will:

USB Serial Port (CDC/ACM)

Keyboard

Mouse

Joystick

MIDI Interface

Raw HID

Not all the interfaces to these devices have been fully finalised yet.

As I mentioned you can mix and match them at will. In any combination, and with any quantities, up to the limit of the number of available USB endpoints (15). Note that the USB Serial Port uses 2 endpoints for each instance, but all the others use just one.

At the moment it only supports PIC32MX based boards, but my next task is to work on a PIC32MZ driver for it.

So feel free to have a play and break it. Report bugs back to me either here or on the Github issues page for the repository.

One word of warning: that's not the real data throughput speed - that's the speed the computer can throw the data at the chip - the chip is most likely discarding most of it since it can't fit in the serial RX buffer and it's not reading fast enough.

I am about to see if I can set a larger buffer, give it a high-water mark trigger of 1 endpoint packet less than full, and "stall" the endpoint until there is room for at least 1 more full packet. That should give us a more realistic idea of t he real speed of communication. Maybe. If it works.