I'd like to send/receive data over a USB port to a device (from my vista pc). Is there a free/cheap library out there that can do this , and how involved would this project be (not taking into account what's being sent or recieved) ?
You don't specify what's going on here. Does the device already exist? Is it already a USB device?
If you already have a USB device, then the manufacturer should be able to help.
If you are building the device, then you might want to look at something like a USB to serial adapter (which generally require no special drivers at all) or something from FTDI - they make a number of easy-to-use USB chips that generally don't need, or come with appropriate drivers under windows. I've worked with their chips on a couple of occasions and they've never given me any trouble.
This article in Code project may be a good start for you. At first you need to build your device. You can either use a micro-controller with a USB port or you can use a serial-to-USB chipset (like the already suggested FTDI).
You should avoid writing your own USB library-driver. The article in the CodeProject uses the HDI driver, which is already present in your device. It uses a PIC micro-controller, but my personal favourite is AVR. With AVR you have the following options:
- AVR-USB: Implements USB stack in firmware. Drivers, examples for all platforms. Any AVR micro can be used. You may need to build the hardware yourself.
- Atmel's USB family. These are microcontrollers with USB port. Drivers and ready to buy kits are available. Other manufacturers (like Microchip's PIC family) have similar solutions.