USB

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys, I'm preparing to start USB development.  Can I use the CDC class for things like keyboards and mass storage?

I'm waiting on a book called "Embedded USB".

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

asdf

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

Last Edited: Mon. Jun 24, 2019 - 08:19 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

you might enjoy this monster:

 

Lightweight USB Framework for AVRs (LUFA)

http://fab.cba.mit.edu/classes/863.14/people/andrew_mao/week11/

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fianawarrior wrote:
Can I use the CDC class for things like keyboards and mass storage?
If I were you I'd start at Wikipedia then move on to the USB 1.1 standard (start simple and work up from there: USB 2.0 standard)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jesus clawson, you don't expect me to read all that specification?

need a drink now.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I gave you a link to a very good reference. You’ve not read it yet?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fianawarrior wrote:
Jesus clawson, you don't expect me to read all that specification?
A bit like saying "so you want me to read that entire operator's manual before I attempt to fly this Jumbo Jet?". Err, yes. No one ever said USB was simple/easy. Equally I have often said that programming is about 30-40% about reading. Just think of an AVR even: before you used a timer to flash an LED and a pot on the ADC to vary the speed exactly how much of the datasheet did you have to read before you could do all that? People who don't want to read aren't cut out to be programmers.

 

PS ah sorry, I guess there is of course the "millennial exemption rule" to be applied: The internet always delivers on the "I want it and I want it now" promise as we all know cheeky (this usually involves someone else reading the manual out to you!)

 

PPS and you still probably can't beat the books by Jan Axelson as a "primer" for USB.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use WinUSB.  It was written by someone with an IQ above zero.   The problem with WinUSB, or the portable LibUSB is the host interface.  It's easy to hook up to a serial port, which is how you use CDC.  There ought to be an easy way to hook up to WinUSB but I'm not sure there is.  I wrote my own which works with my own GUI program, and Jan Axelson has one that is imbedded in a .net program using C sharp.

 

My biggest problem with CDC is there is no way for the host to tell the device where the end of message is when the host sends one to the device.  In my mind, that's stupider than stupid.  Also when you reboot the device, you need to disconnect the host program from the fake serial port before it will work again.  With Windows 7 it's even worse.  I think you have to disconnect it before you reboot the device.  You also need to install a driver for CDC.  Winusb's driver gets installed automatically. 

 

With Winusb, you can assign a GUID to each device, actually to each interface of the device.  The host program can search for those.  The VID and PID are not used.  There are a lot more GUIDs than VIDs and PIDs.  GUIDs are much cheaper too.

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you haven't read these yet :-

 

http://www.usbmadesimple.co.uk/

https://www.beyondlogic.org/usbn...

 

Then the USB 2.0 spec.

Some chapters are quite readable, particularly if you ignore the chapters on USB hub, and ignore High Speed stuff.