[sdiy] USB info wanted
Philippe Derenne
derennep at brutele.be
Wed Nov 9 02:10:54 CET 2005
As this is pure DIY, and could be usefull in synths world... ( imagine a
usb-pc-controlled-one-cable-only-patch-panel ;^D )
Well the USB communication si not as easy as usual serial communication
(RS-232)...
I choose another way to experiment USB : I use a Motorola microcontroler,
the 68HC908.
It's close to the well-known 68HC11, and it has a USB module on-board.
Talking about enumeration, the steps are :
- electrical detection of the device (when it's just connected)
- reset of the device, going in a "standard status"
- ask to the device to identify (give its descriptor)
- search descriptors into the registry
- if descriptor found, that's it
- if not, ask for a driver and write descriptor into the registry
After that, he device can comunicate.
The descriptor must be written into the ROM of the USB device. This is a
well definded data structure.
There are two important numbers into this structure : the VendorID (VID),
and the ProductID (PID).
The VID/PID couple gives the "uniqueness" of a USB device. Of course, you
must pay to get a VID (see www.usb.org).
Any USB device has one or more input or output EndPoints, which are like
"communication ports" for the device.
The 68HC908 uses special registers as EndPoints.
The 68HC908 is programmed using "CodeWarrior", in C language.
Visual Basic can be used to make PC applications comunicating with the
68HC908.
I wanted to use WinDev (a french software development tool), but I had to
write a Visual Basic activeX first, and the use this activeX in a WinDev
window.
It's a bit intricated in the beginning, hand I've been working for hours on
that project : making a programmer for the 68HC908, then an "experiment
board", and then all the programming.
I've found a helpfull book about USB, but it's a french book. Anyway, if you
can read french, it's called "L'USB pour tous" (USB for everyone), by
Vincent Le Mieux (I could translate this name by "Vince The Best"... just
kidding ;^)
For now I'm only playing with digital I/Os, but "analog" is only DAC or ADC
away...
I'd like to use this to make a failure simulator for a training automated
system (my main job is training people on Siemens and Allen-Bradley PLCs),
but that's another story...
Phil.
----- Original Message -----
From: "Karl Ekdahl" <elektrodwarf at yahoo.se>
To: "Philippe Derenne" <derennep at brutele.be>
Sent: Tuesday, November 08, 2005 11:26 PM
Subject: SV: Re: [sdiy] USB info wanted
> Well, currently i'm basically just trying to make
> enumeration work. I'm a little confused as to what i'm
> supposed to do at the "reset" command (which i am also
> confused about where/how it's coming from) except for
> setting up future buffers and clearing the address! I
> might have been mistaken when i though doing USB in
> assembler on a PIC would be a great way of learning
> USB in quite a depth... What i get so far is a couple
> of resets, idle, activations and then nothing. It
> never seems to go to any transaction so i guess i'm
> missing something on the way. Unfortunley, it might
> just be so that i don't even know what i'm talking
> about :) good step-by-step USB documentation seems
> extremely scarce...
>
> thanks
>
> Karl
>Whoops.. it seems i started to shove all my sorrows on
>you now instead of actually answering your question!
>What i want to do is a basic I/O platform with a PIC.
>Just a base enabling me to develop anything useful
>(midi, cv, audio, o-scope)...
More information about the Synth-diy
mailing list