Alright. i'm hoping someone out there knows the answer to my question and is willing to help.

I'm intrested in building my own periphial, and then writing a program to control it.

The actual hardware part is easy enough once i figure out how to get my computer to communicate with it. but there in lies the problem... I have NO clue how to program to use I/O ports. I'm going to try to write it using a USB port, because USB seems to be the way of the future. But i'm willing to use a serial port if USB is impossible for VB.net

anyway, I'd like to do it in VB.net because, well, embarisingly enough, it's the only language i know how to make a GUI in. :o

Please let me know if you know how to do this. Any help is much appriciated!

-Chris

P.S. - if any of you know how to "Read" the sounds your computer is playing (the waves) and keep track of the Bass, vocal, etc spikes. so that i could single out certain aspects of the song playing, that would be much appriciated as well (it's something i want to do with my hardware... it's just a fun peice of hardware)

thanks so much again!

Hi,

For USB case you most likely need to write your device driver which is impossible in VB.Net yet you might acquire a handle to the unknown USB device (that's what Win will call your device if you don't upload driver) or event beter we might find some generic USB driver which is a stub for raw data access. In serial (COMx:) port sens it is a little bit more easier you need to use Win32 API through P/Invoke but there are already free components for .Net allowing access to COM ports AFAIK. The last part is recording the playing sound and analyzing it. If you have a full duplex sound card (almost all of them are f.d. since 2000) you can easily record/capture the sound currently processed. Yet for the detection of beats and bass, treble activity you need some solid Math on FFT (or find such a package).
What is your HW anyway a huge equalizer display with large LEDs or something ?

Loren Soth

oh, i'm sorry.. is this board only for homework help?

this isn't homework... this is more... personal learning.

and yeah, you almost hit hte nail on teh head. Right now i just want to have certain color LED's flash when there is activity on certain audio frequencies (treble, bass, etc). I know it's gonna need a lot of math, but i'm up for the challange.


Okay, the important bit:

I have no clue what you just said about the USB bit. It's impossible to control a USB port in VB? What langauge would you suggest i do this in then?

thanks!
-Chris

Hi,

With HW I ment hardware but you are right HW is the acronyme for homework ^_^;
Using "purely" VB.Net or any .Net language it is impossible as .Net framework doesn't containt hardware manipulation classes. But using P/Invoke (calling native code from other dll's including Win32 API) and some other 3rd party classes/drivers it is possible. The first relevent result from my googling is http://blogs.msdn.com/brad_mccabe/archive/2005/04/07/406227.aspx where the author complains from the same thing.
Yet if you are going to design/build the hardware you will need a USB controller chip on your PCB. Keep me updated.

Loren Soth

would you happen to know HOW to do this? and where could i get said USB controller chip? And for my first attempt, i just want to send voltage over the port, i didn't want to sedn any inputs back. just outputs, would i still need the controller chip?

thanks for all your help!

Hi,

I was busy lately, if all you need is +5V regulated power (which I don't think so because there are easier ways) you don't need the controller, even if you need one way communication you will need USB slave controller chip atleast. You can install LibUSB http://libusb-win32.sourceforge.net/ and use #UsbLib http://www.icsharpcode.net/opensource/sharpusblib/ for VB.Net access. In all cases of usb you will also need some sort of cheap and efficent microcontroller on your PCB like PIC 16F84A from http://www.microchip.com
You might head to normal serial (COMX:) communication w/ PIC to avoid USB controller chip or go Parallel Port (LPTX:) with which you will need only some LM78XXs. (Caution don't short circuit or power surge or burn in anyway your COM, LPT, USB ports.)

Loren Soth

thanks very much!

i'm still looking into this... The reason i want to use USB and not paralel is that USB, to me, is the way of the future. I dont see much using any other port nowadays. I want to learn what will help me in the future, you know?

any more info would be great, like, once i buy those chips and stuff, how do i program them?

thanks again!

Hi,

Once you get your USB slave chip there will be a hard PCB design process waiting you. Ooops, now I googled and I remembered things that I used to know there are a whole lot of PIC variants with different options embeded ike ADC,DAC,RF,RFID and eventually USB. Check http://www.microchip.com and also those below (first one uses an external chip for USB connection) :

http://www.maxim-ic.com/appnotes.cfm/appnote_number/3025
http://www.alanmacek.com/usb/

Loren Soth

Hi,

Once you get your USB slave chip there will be a hard PCB design process waiting you. Ooops, now I googled and I remembered things that I used to know there are a whole lot of PIC variants with different options embeded ike ADC,DAC,RF,RFID and eventually USB. Check http://www.microchip.com and also those below (first one uses an external chip for USB connection) :

http://www.maxim-ic.com/appnotes.cfm/appnote_number/3025
http://www.alanmacek.com/usb/

Loren Soth

Thanks again, you've been sooo much help!

for now, im going to focus on teh software development part of this adventure. but i'll need help in the future.

PM me with an alternate way of contacting you, so i dont clutter the forums up. Thank you very much for your continued support!

if you, or anyone else, happens to know how to disect a sound file... haha. (seperate out the different frequencies) using Vb.net. that would help greatly too.

Thank you ALL so VERY much! i'm so glad i stumbled upon this site. i love it here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.