Author Topic: Why are there USB-to-Serial converters if USB is Serial?  (Read 13305 times)

0 Members and 1 Guest are viewing this topic.

Offline zdelarosa00Topic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: mx
  • Manipulate your machine, you're a Technomancer...
Why are there USB-to-Serial converters if USB is Serial?
« on: April 19, 2015, 02:43:10 am »
My question is, if the USB standard is serial communication, why there are USB to serial shields and little boards for microcontrollers? ... If you know or have the answer. Im sure im missing something regarding to UARTs  :-//
Space landfill waste consultants say: "If you think you can or if you think you can't you're right" - Always on my way to be a better electronic wizard
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #1 on: April 19, 2015, 03:06:43 am »
Because old-school RS232 is VERY SIMPLE, just the data stream with a few protocol "characters". And USB is a REMARKABLY COMPLEX packet-based protocol which requires extensive hand-shaking and negotiation between the master and slave.

Comparing RS232 to USB is like comparing 1890's Morse code to SMS texting in 2015.

The reason for those "FTDI" (et.al.) boards is to make themselves look like a modern USB device to the computer, while looking like a vintage, simple RS232 port at the other end.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3024
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #2 on: April 19, 2015, 04:36:06 am »
The reason for those "FTDI" (et.al.) boards is to make themselves look like a modern USB device to the computer, while looking like a vintage, simple RS232 port at the other end.

Careful now, rs232 is not the same thing as uart.  Most usb-serial are usb-uart not usb-rs232.  You don't want to be connecting your average mcu directly to rs232 :-)
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #3 on: April 19, 2015, 05:00:07 am »
Careful now, rs232 is not the same thing as uart.  Most usb-serial are usb-uart not usb-rs232.  You don't want to be connecting your average mcu directly to rs232 :-)

YES, right you are!   :palm: 
"UART" implies the serial "bitstream", typically at logic voltages (0-5V, etc)  but not the RS232 voltages (+ and - 15V)
I guess I'm showing my vintage to automatically think of "serial" as RS232.  Please replace any mention of "RS232" with UART.
Thanks, sleemanj
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #4 on: April 19, 2015, 06:41:58 am »
Read through the first few chapters of this and the differences should be clear: USB in a Nutshell

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #5 on: April 19, 2015, 08:43:28 am »
Formally, "serial" refers to a class of connections that send data sequentially on a single wire, as opposed to parallel.

But informally "serial" is often used to mean the traditional serial port on a PC, which was originally RS232. There was (occasionally still is) a "serial" port and a "parallel" port.

While RS232 defines certain voltage levels, the same signalling can be used with difference voltages e.g. TTL for MCUs.

USB goes a lot further than defining voltage levels and byte framing, it includes a lot of higher level protocols.
Bob
"All you said is just a bunch of opinions."
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #6 on: April 19, 2015, 03:09:59 pm »
My question is, if the USB standard is serial communication, why there are USB to serial shields and little boards for microcontrollers? ... If you know or have the answer. Im sure im missing something regarding to UARTs  :-//
USB Virtual Com is a simplification layer on USB host and device side. Often found in of-the-shelf ICs such as FTDI or Silicon Labs. They are Plug&Play on all platforms, and are easy to use on both sides of the line.
And they are not limited by standard baudrates anymore. You can easily get any baudrate and most FTDI's go up to 3Mbaud.

Is makes USB way more accessible to the developers who are not able to or do not want to spend time or money on USB.
Much better than a world where you need USB - RS232 converters with non-plug&play drivers and that enormous db9 plug without power delivery.

One level up will be USB-HID, which is driverless and works with small data packets. But requires effort in both sides. Especially with Windows applications.

« Last Edit: April 19, 2015, 03:12:30 pm by Jeroen3 »
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #7 on: April 19, 2015, 05:05:09 pm »
"Serial" is a very general term for a bus which sends data serially on a single wire.  It's similar to the word "vehicle".  Just like there are hundreds of different vehicles - cars, trucks, motorcycles, buses, boats, planes, helicopters - there are also many different serial protocols - USB, RS232, RS422, RS485, UART, SPI, I2C, etc.

I think the reason you're confused is because "USB to Serial" is a stupid name for that product.  It's not precise at all and doesn't tell you what it's actually doing.  Chances are it's a USB to RS232 or USB to UART converter, simply converting between two different serial protocols, but you'd have to check the details to be sure.
 

Offline zdelarosa00Topic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: mx
  • Manipulate your machine, you're a Technomancer...
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #8 on: April 19, 2015, 06:18:20 pm »
Space landfill waste consultants say: "If you think you can or if you think you can't you're right" - Always on my way to be a better electronic wizard
 

Online zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #9 on: April 19, 2015, 06:26:57 pm »
Make sure to match the voltage level, 5V vs 3.3V, to your MCU.
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #10 on: April 19, 2015, 08:13:08 pm »
I see, I viewed products like these... Im gonna use them for a project  :-/O :-/O

https://www.sparkfun.com/products/11814

http://www.arduino.cc/en/Main/USBSerial

https://www.sparkfun.com/products/9716

Those are all USB to UART, all you have to do is pay attention to the voltage level.
 

Offline zdelarosa00Topic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: mx
  • Manipulate your machine, you're a Technomancer...
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #11 on: April 19, 2015, 08:30:35 pm »
I see, I viewed products like these... Im gonna use them for a project  :-/O :-/O

https://www.sparkfun.com/products/11814

http://www.arduino.cc/en/Main/USBSerial

https://www.sparkfun.com/products/9716

Those are all USB to UART, all you have to do is pay attention to the voltage level.


USB standard is 5v am I right..?, At this point I expect a "not always"
Space landfill waste consultants say: "If you think you can or if you think you can't you're right" - Always on my way to be a better electronic wizard
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #12 on: April 19, 2015, 08:32:14 pm »
No - the USB power supply voltage is 5V. The data lines are not. They're actually a bit complex, they have multiple modes - none of which are 5V.

The voltage level you have to pay attention to is the one on the other side of the converter. If you feed 5V signals into a 3V3 microcontroller you can damage it, and if you feed 3V3 signals into a 5V microcontroller, they might not be interpreted correctly.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline zdelarosa00Topic starter

  • Regular Contributor
  • *
  • Posts: 73
  • Country: mx
  • Manipulate your machine, you're a Technomancer...
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #13 on: April 19, 2015, 08:42:13 pm »
No - the USB power supply voltage is 5V. The data lines are not. They're actually a bit complex, they have multiple modes - none of which are 5V.

The voltage level you have to pay attention to is the one on the other side of the converter. If you feed 5V signals into a 3V3 microcontroller you can damage it, and if you feed 3V3 signals into a 5V microcontroller, they might not be interpreted correctly.

Very interesting, I'm approaching to the goal
Space landfill waste consultants say: "If you think you can or if you think you can't you're right" - Always on my way to be a better electronic wizard
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #14 on: April 19, 2015, 08:44:02 pm »
USB standard is 5v am I right..?, At this point I expect a "not always"
That is not even the right question. USB power is ALWAYS 5V by definition.
No choice. No options. No settings. No variations.

What you need to be concerned about is the OTHER END (the UART side).
You have not revealed what you are using this converter for.
If your mystery device is 3.3V, then setting the converter for 5V on the UART side will damage your device.
And setting the converter for 3.3V when your device is 5V will result in unreliable (or non-functional) communication.
 

Offline timb

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Pretentiously Posting Polysyllabic Prose
    • timb.us
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #15 on: April 20, 2015, 08:40:35 am »
Most FTDI cables can't be set as they come hard wired for a particular voltage. This is generally true with the bargain basement stuff you find on eBay, but even a lot of the higher end units (SparkFun, Adafruit) are like this as well.

SparkFun sells 3.3V, 5V, semi-switchable and switchable adapters, so make sure you read the description throughly.

Some adapters will physically have a switch on them for selecting the voltage. Some will have a set of pads you have to bridge with solder.

Finally, most of the time a 3v3 UART adapter will work just fine on a 5V device, so long as you aren't powering the device from the cable (I.e. Only have TX, RX and GND connected). [High is generally 2.8V max, which a 3.3V UART will have no trouble reaching.]


Sent from my Tablet
Any sufficiently advanced technology is indistinguishable from magic; e.g., Cheez Whiz, Hot Dogs and RF.
 

Online zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #16 on: April 20, 2015, 10:04:44 pm »
IIRC the college setting controls also the voltage regulator output, not just the signal lines. Useful for low power applications.
 

Offline Zbig

  • Frequent Contributor
  • **
  • Posts: 927
  • Country: pl
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #17 on: April 20, 2015, 10:22:27 pm »
Most FTDI cables can't be set as they come hard wired for a particular voltage. This is generally true with the bargain basement stuff you find on eBay, but even a lot of the higher end units (SparkFun, Adafruit) are like this as well.

This fella: http://www.adafruit.com/product/284 begs to differ.
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #18 on: April 20, 2015, 10:58:41 pm »
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #19 on: April 21, 2015, 08:02:11 am »
And for $3 you can get one of these with jumper selectable 3.3 or 5 V interface.

And how do you know if you don't need to replace the ftdi chip?
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #20 on: April 21, 2015, 06:12:35 pm »
And for $3 you can get one of these with jumper selectable 3.3 or 5 V interface.

And how do you know if you don't need to replace the ftdi chip?

How do you know any device has a real FTDI chip? All i can say is, no issues with the one i bought. But that's ebay, you pay your $3 and ya take your chances. It is only $3 after all...
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #21 on: April 21, 2015, 06:15:21 pm »
How do you know any device has a real FTDI chip? All i can say is, no issues with the one i bought. But that's ebay, you pay your $3 and ya take your chances. It is only $3 after all...

Or buy something like this: http://www.ebay.com/itm/311013143260
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #22 on: April 21, 2015, 06:18:31 pm »
How do you know any device has a real FTDI chip?

Not buying it on ebay is a damn good start...
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #23 on: April 21, 2015, 06:20:38 pm »
How do you know any device has a real FTDI chip? All i can say is, no issues with the one i bought. But that's ebay, you pay your $3 and ya take your chances. It is only $3 after all...
Which, at the end of the epic discussion, was the fatal flaw in the whole FTDI mess.  There really is no way of knowing whether you as the customer are getting a genuine FTDI chip without testing each one yourself.  Even "authorized dealers" were victims of counterfeit chips, and if you are having boards made over on the other side of the planet, you have no control or assurance of anything.  IMHO, FTDI fouled their own nest and made it more attractive to use some other USB-to-serial solution and just avoid the whole FTDI fiasco.
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Why are there USB-to-Serial converters if USB is Serial?
« Reply #24 on: April 21, 2015, 06:43:30 pm »
All good points. My only reason for posting it was in response to a previous post stating that the cheap eBay converters were fixed at 3.3 or 5 V. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf