Author Topic: USB Explenation (PLEASE!)  (Read 4670 times)

0 Members and 1 Guest are viewing this topic.

Offline TopherTheMETopic starter

  • Regular Contributor
  • *
  • Posts: 196
USB Explenation (PLEASE!)
« on: July 28, 2010, 09:34:17 pm »
If it wasn't for FTDI chips, I would never be able to link my computer to a microcontroller. Since you can't really find a PC with a RS-232 port on it you're basically forced into using USB communication for projects these days (unless you use a converter). However, I have a really hard time understanding what exactly USB is and how it works. Yes, I've read the wiki article and read about to learn about handshake packets and token packets and data packets and blah blah blah but it still seems like a big mystery to me. And now they have uCs that have USB on board and other features like USB "On-The-Go" (PIC32, AVR32, etc) to confuse me even more. Is there anyway that you can spell it out for a newbie such as myself and maybe cover some of these USB-on-chip features and how to use them in a future blog?
Don't blame me. I'm the mechanical engineer.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13927
  • Country: gb
    • Mike's Electric Stuff
Re: USB Explenation (PLEASE!)
« Reply #1 on: July 28, 2010, 11:10:57 pm »
USB is not simple, so there is no simple explanation, but fortunately there are enough chips and code libraries out there that you don't really need to understand it in detail to be able to use it.
I'm told that the definitive book is "USB Complete" by Jan Axelson.
Of course you could also read the USB spec, which is at usb.org, but I suspect it's rather heavy going...
 
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline DavidDLC

  • Frequent Contributor
  • **
  • Posts: 755
  • Country: us
Re: USB Explenation (PLEASE!)
« Reply #2 on: July 28, 2010, 11:11:13 pm »
There are other ICs with USB embedded like the PIC18F4550 family. It's not FTDI chips only.

This book may help you understand USB:

http://www.lvr.com/usbc.htm

You can buy it at Amazon using Dave's link and both will get a benefit.
 

Offline migsantiago

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: 00
    • MigSantiago's Web Site
Re: USB Explenation (PLEASE!)
« Reply #3 on: July 29, 2010, 12:51:40 am »
USB is not simple, so there is no simple explanation, but fortunately there are enough chips and code libraries out there that you don't really need to understand it in detail to be able to use it.
I'm told that the definitive book is "USB Complete" by Jan Axelson.
Of course you could also read the USB spec, which is at usb.org, but I suspect it's rather heavy going...
 

I have that book and it's definitely the USB Bible. Be sure to get the 4th edition which includes data about USB 3.0.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11703
  • Country: my
  • reassessing directives...
Re: USB Explenation (PLEASE!)
« Reply #4 on: July 29, 2010, 12:41:43 pm »
i got a zipped pdf's file that contains comprehensive USB spec, forgot where i got it, but its from internet, google for "usb_20.zip" or "USB specification" its 9MB++. when i was reading some materials inside, i just simply stop reading the rest. too much beyond my comprehension :D i ended up just simply using it for granted :P
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline migsantiago

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: 00
    • MigSantiago's Web Site
Re: USB Explenation (PLEASE!)
« Reply #5 on: July 29, 2010, 02:59:59 pm »
i got a zipped pdf's file that contains comprehensive USB spec, forgot where i got it, but its from internet, google for "usb_20.zip" or "USB specification" its 9MB++. when i was reading some materials inside, i just simply stop reading the rest. too much beyond my comprehension :D i ended up just simply using it for granted :P


At usb.org you can download the full USB standards but trust me... they are that complete that you'll never finish reading them. The USB Complete book recommended above has a very friendly way to explain all the USB stuff you need as a developer. Once that you've read the book you can start reading the USB standards and they'll be easier to understand.
« Last Edit: July 29, 2010, 03:04:08 pm by migsantiago »
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11703
  • Country: my
  • reassessing directives...
Re: USB Explenation (PLEASE!)
« Reply #6 on: July 29, 2010, 03:40:34 pm »
well... the complexity of it, complicated it is! but for my easy answer is. its a serial communication protocol designed as such its capable at a very high speed and some cascading of client equipments/devices or some sort. you are going to need the detailed spec if you are into designing such FTDI chip or a very specialized USB device.

but as you said, you are using the FTDI chip, then you dont have to know all that except download all the doc stuffs from FTDI on how to make it efficient to your application. the detail have been hidden from you. all you need to care about is the serial UART or parallel port that comes out of it on the another side of USB pins.


and one of my major concern (last time) is the way USB is polled, not interrupt driven, so we'll have a delay during (or after) polling before the data reach to the other end.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline johnboxall

  • Supporter
  • ****
  • Posts: 662
  • Country: au
  • You do nothing, you get nothing.
    • Books, services and more:
Re: USB Explenation (PLEASE!)
« Reply #7 on: August 07, 2010, 04:54:00 pm »
Since you can't really find a PC with a RS-232 port on it you're basically forced into using USB communication for projects these days (unless you use a converter).

Not necessarily... most new motherboards will still have an RS232 header socket, you just need to get the backplane socket and cable... $10 from ebay.

Offline migsantiago

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: 00
    • MigSantiago's Web Site
Re: USB Explenation (PLEASE!)
« Reply #8 on: August 07, 2010, 05:52:58 pm »
Since you can't really find a PC with a RS-232 port on it you're basically forced into using USB communication for projects these days (unless you use a converter).

Not necessarily... most new motherboards will still have an RS232 header socket, you just need to get the backplane socket and cable... $10 from ebay.

Yeah, and some MoBos have an external rs232 port and an additional internal header socket, 2 rs232 ports.  ;D
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17989
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: USB Explenation (PLEASE!)
« Reply #9 on: August 07, 2010, 06:32:35 pm »
my fairly modern pc has RS232, I think the parallel port is being ditched but serial will remain for quite a bit as it's a legacy and often a get out of jail last resort. The Rigol scopes have serial ports, basically you could control them from almost any MCU but not all MCU's have usb
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf