Subject: Re: Please advice for USB interaction
To: Marco Ferra <mferra@gmail.com>
From: Jachym Holecek <freza@dspfpga.com>
List: tech-misc
Date: 04/13/2006 00:33:41
# Marco Ferra 2006-04-12:
> I'm an engineering student trying to build a "data aquisition module"
> using USB and Unix (netbsd in particular) but I'm a bit lost.
> 
> Imagine this:  I have an analog signal (for example this signal varies
> between 0 and 3v) and I need to record in the PC the voltage of the
> signal every 2 seconds (or every 2 ms). Then record this information,
> for example, in a simple text file. I would like to use netbsd and the
> USB port for this.  Is there any directions that you may give to me on
> how to achive this task ?

It's not quite clear what your situation looks like.

Do you have (a) an USB device that you want to connect to a NetBSD
peecee, or (b) do you have an embedded NetBSD system which you want
to connect to a peecee via USB?

 (a) Write USB device driver, export captured data via a character
     device node.

 (b) Write USB slave driver (there's no generic support for this on
     NetBSD -- nothing like "USB gadget API" on Linux), emulate a
     standard USB interface on top of it (serial port might be just
     fine for your needs), read data off an ADC and pass it to that
     device, capture the data at peecee end of the USB cable.

You may want to provide more detailed information for more detailed
advice. Oh, at such a low sampling rate, anything like USB and Unix
sounds like terrible overkill.

	-- Jachym