Author Topic: USB vs HID USB (USB-Serial)  (Read 8633 times)

0 Members and 1 Guest are viewing this topic.

Offline nathonTopic starter

  • Contributor
  • Posts: 37
  • Country: us
    • Blog
USB vs HID USB (USB-Serial)
« on: August 19, 2015, 03:07:56 pm »
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=info

I'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!
Nathon Dalton
 

Offline eilize

  • Contributor
  • Posts: 25
  • Country: be
Re: USB vs HID USB (USB-Serial)
« Reply #1 on: August 19, 2015, 03:50:04 pm »
"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 chipset

i 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
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4198
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: USB vs HID USB (USB-Serial)
« Reply #2 on: August 19, 2015, 07:40:20 pm »
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.
 

Offline Kintekobo

  • Regular Contributor
  • *
  • Posts: 64
  • Country: gb
  • Avatar by the fabulous 'Space Coyote'
    • A Load of Old Bollox
Re: USB vs HID USB (USB-Serial)
« Reply #3 on: August 19, 2015, 07:44:34 pm »
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.
You can call me anything you like. Just don't call me late for lunch.
 

Offline eilize

  • Contributor
  • Posts: 25
  • Country: be
Re: USB vs HID USB (USB-Serial)
« Reply #4 on: August 19, 2015, 08:18:20 pm »
Quote
Requiring custom libraries or special drivers, throwing away the driverless part. It definitely brings you closer to usb.

not really,

you can use only the lib, made by microsoft , inside windows
and 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 portable

Quote
However, hid is more difficult to use on the windows side.
it can be really simple, there are some generic skeleton where you just need to change the id to begin to communicate on the usb
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4198
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: USB vs HID USB (USB-Serial)
« Reply #5 on: August 19, 2015, 08:42:05 pm »
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?
 

Offline nathonTopic starter

  • Contributor
  • Posts: 37
  • Country: us
    • Blog
Re: USB vs HID USB (USB-Serial)
« Reply #6 on: August 19, 2015, 09:16:14 pm »
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!
Nathon Dalton
 

Offline eilize

  • Contributor
  • Posts: 25
  • Country: be
Re: USB vs HID USB (USB-Serial)
« Reply #7 on: August 19, 2015, 10:12:28 pm »
"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.dll

i find it quickly
http://helmpcb.com/software/usb-hid-template-for-visual-basic-2005

it's always more difficult to do the same on vc++  ^^

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf