Sending and receiving data over USB port

后端 未结 4 1419
旧时难觅i
旧时难觅i 2021-01-03 08:02

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

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-03 08:19

    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.

提交回复
热议问题