[PD] controllers besides midi

Christian Klippel ck at mamalala.de
Wed Apr 13 11:52:36 CEST 2005


hello,

Am Mittwoch 13 April 2005 06:24 schrieb Hans-Christoph Steiner:
[...]
>
> I was just starting to think about how to make [hid] work with
> microcontrollers.  This sounds like the perfect way.  Do you have more
> info on the HID stuff?  I couldn't find it on your site.
>

first, the two sources of info i have used :

almost all i know about hid development i got from the official usb-hid pages 
at http://www.usb.org/developers/hidpage/

the only other piece of info i used is the stuff for the 16c765 
microcontroller from the microchip-website 
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1335&dDocName=en010172

now to using hid in general :

altough hid makes it somewhat easier for the computer to talk to the device, 
it can certainly drive you nuts. for one, each thing you send wants its own 
report descriptor. now, if you are going to have a lots of i/o, it may happen
that you hit the bounds of your os, regarding to the number of i/o possible.
for example, to use my box _fully_ with hid on linux, one would need to tweak 
the event system modules to allow for that much. for example, in linux's 
input.h there is only max. 0x3f (=63) for absolute events. not enough for up 
to 88 as i offer. same for led's, for example.

another thing is the _sending_ of values to the microcontroller via hid.
before you wonder, yes, hid should be able to send stuff to the device as 
well. just look at your keyboard led's, that are just hid-defined led's and 
that get toggled by the driver if you press caps-lock or the like ...

unfortunatly, linux-event doesnt allow for sending absolute values, for 
example. so, that has to be tweaked in the kernel driver as well.
of course, this anly applies if you want to send such values to the device....

on the microcontroller side you may have fun as well. mainly, because the 
descrpitors eat a lot of space. in my box, i sodomized the original firmware 
so that it just iterates n times over the same descriptor, to save codespace.
without that, i couldnt even fit the descriptors alone in the controller....

anyways, it is a good idea to not only offer hid. my firmware also supports a 
second, non-hid config. this is implemented in the firmware and selected with 
a usb "select config" command to the device.

and again, i want to ask all the other people that are working on such devices 
that we communicate about the stuff a little, to make them at least "message 
compatible" to each other. as it seem, there are serveral solutions comming 
up, and im afraid that they all would cook their own soup...... since we are 
designing these things ground-up, let us make them at least compatible in 
that way. think about patch sharing .... one makes a patch using such a 
device, and gives it away. the other person uses a different device, but can 
directly use it because it speaks "the same language".....

hope that helped a little bit, if you have more questions about the hid stuff, 
just ask....

> .hc
>

greets,

chris





More information about the Pd-list mailing list