USB question

Mar 18, 2009 9 Replies

Suppose I have 3 microphones 8 feet apart at the vertices of an equilateral triangle. The microphones pick up the shock wave from a bullet. I wire them in parallel to the input of an ADC. The ADC outputs go into a Multiplexer and from there into the USB port of a computer.



I estimate the minimum peak-to-peak of the signals from the microphones to be 10kHz conservatively.



If I use Microsoft Visual C++, where do I find the commands to write the code to process the input from the USB port? It's a serial stream. Can anyone point me in the right direction?


printf("I'd better find another way to make a living \\n");

That should about cover it.

Bob Stephens

Look at the documentation that came with the ADC/digital I/O board you're using. Unless those ADCs present themselves as a sound card, there's no standardized inteface provided within Windows to talk to data converter card, so you absolutely need documentation from the hardware vendor to proceed.

How many times and in how many different ways are you going to ask the same thing?

You probably should not be using an ADC with a multiplexer for this type of high speed application unless you would to take the timing delay into account in any subsequent calculations. Then make sure you record the channel sampling order and get the spec from the ADC for the channel switching delay.

You didn't say which version of MVC++ you are using, but check out the codeproject.com page below for example code.

formatting link
Or the MSDN for a serial IO class
formatting link

Since your application is transient, you won't have a huge amount of data even if you are sampling quickly, so you can probably just use a large buffer size and won't have to worry so much about processing the data stream quickly.

No, I should have your job since you are obviously too incompetent to answer my question. Maybe I will.

I suggest you write a program to return coordinates of a mouse.

Thank you for your links. This gives me a place to start.

To make life easier.

formatting link

There are some chips that got from USB to bitbang. Done.

Alas, embedded is correct. The mouse itself does not have coordinates, only deltas. The on screen cursor has coordinates. That you do not understand the difference speaks volumes. .

He doesn't appear to understand much of anything... There are so many errors and misconceptions in his OP that it doesn't even bear talking about. Probably a troll.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required