USB vs HID USB (USB-Serial) - Page 1
Forum section: electronics / projects

author: nathon
author_rank: Contributor
timestamp: August 19, 2015, 03:07:56 pm
content: I am trying to narrow down which chipset to use for adding USB support to an ATMEGA based board I'm working on. I'm currently looking at SILabs chips (CP21xx). There are the typical USB to UART chips, but also some listed as HID USB to UART.http://www.silabs.com/products/interface/usbtouart/Pages/usb-to-uart-bridge.aspx?tab=infoI'm assuming the HID in HID USB stands for Human Interface Device, but I can't find any information about it to be sure. What design considerations would I need to take into account in choosing an HID USB chipset over a standard USB? I'm assuming the drivers are different.My application is pretty simple. It's just a basic ATMEGA328-PU based board that will be used as a base for various flavors I'm going to use at home for automation. For example one will contain relays and transistors for power hungry applications like driving motors. Another will simply determine if contacts are closed or open (window sensors). Another will have an array of sensors (e.g. motion, gas, etc.).Thanks for the help!

author: eilize
author_rank: Contributor
timestamp: August 19, 2015, 03:50:04 pm
content: "What design considerations would I need to take into account in choosing an HID USB chipset over a standard USB? I'm assuming the drivers are different."you don't need driver for a hid usb device, but it has limited speed(64 kbyte/s)chipset use descriptor to explain what he'll send to the pc.you can use some lib on windows to communicate more easily with the chipseti don't find how to make your own report descriptor on the chip's datasheet, so i guess, you can send and get 8bit packet

author: Jeroen3
author_rank: Super Contributor
timestamp: August 19, 2015, 07:40:20 pm
content: Hid is driverless and easy on the micro. Just write a variable size packet in one piece. Max 64k, every 100ms iirc.Not as a stream as with serial.However, hid is more difficult to use on the windows side. Requiring custom libraries or special drivers, throwing away the driverless part. It definitely brings you closer to usb.For ease of use, hid. For ease of development, serial. If you put a few minutes of thinking into your communications, using ascii for example,, you can achieve the same with better portability over various platforms.

author: Kintekobo
author_rank: Regular Contributor
timestamp: August 19, 2015, 07:44:34 pm
content: Check out the design for the Arduino Leonardo. The USB interface can be re-programmed on the fly to be a HID. Likewise the Arduino UNO has an ATmega chip as the USB interface and it can be re-programmed via the ICP to be a HID. I have re-programmed a couple to be MIDI devices and it is remarkably straightforward, although you do need a separate programmer.

author: eilize
author_rank: Contributor
timestamp: August 19, 2015, 08:18:20 pm
content: Quotenot really,you can use only the lib, made by microsoft , inside windowsand you can let the custom lib (ex: mchid) on the root directory of your program.you don't need to install a driver like a new printer or an old scanner, your software is portableQuoteit can be really simple, there are some generic skeleton where you just need to change the id to begin to communicate on the usb

author: Jeroen3
author_rank: Super Contributor
timestamp: August 19, 2015, 08:42:05 pm
content: It was three years ago since I last used HID using Visual Studio C++. Not very easy to do with a cross platform application.Therefore my suggestion to use serial. Since every application framework understands that natively.Are there any new developments on USB HID I've missed?

author: nathon
author_rank: Contributor
timestamp: August 19, 2015, 09:16:14 pm
content: Thanks everyone! I think I'm going to go with the CP2103. It's a straight-forward USB to serial chipset and has a typical 3.3V regulator. I appreciate all the input!

author: eilize
author_rank: Contributor
timestamp: August 19, 2015, 10:12:28 pm
content: "It was three years ago since I last used HID using Visual Studio C++. Not very easy to do with a cross platform application.Therefore my suggestion to use serial. Since every application framework understands that natively.Are there any new developments on USB HID I've missed?"idk if it's so new.i 've get requirement for one of my project last year- to do it on vb.net-use mchid.dlli find it quicklyhttp://helmpcb.com/software/usb-hid-template-for-visual-basic-2005it's always more difficult to do the same on vc++ ^^