+ Reply to Thread
Results 1 to 10 of 10

Thread: ??about USB to TTL converters ?

  1. #1
    pwotoole Newbie
    Join Date
    May 2007
    Posts
    32

    Default ??about USB to TTL converters ?

    I see them advertised as USB to TTL converters, but then when I read more about them, I find that they are USB to RS232 converters.
    Isn't there a difference between TTL and RS232 voltages?

    Wouldn't the output from a microcontroller need to be converted to RS232 first, before one of those advertised USB converters could be used?

    Is there a way to directly convert from a microcontroller output to USB?

    Thank you
    Pat


  2. #2
    3v0
    3v0 is offline
    3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent 3v0 Excellent
    Join Date
    Jul 2006
    Location
    USA
    Posts
    6,464
    Blog Entries
    11

    Default

    TTL and RS232 are voltage to bit mappings, they do no say anything about how the data bits are arranged. USB is a communication protocol.

    You can easily google TTL, RS232, and USB. In short TTL is 0 and 5 volts. RS232 is +12 and -12. A regular USB port has four pins: two for 5V DC power (with a tolerance of 5%) and ground, and two for data. The maximum current available is 500mA.

    There are chips designed to work with microcontrollers that convert their TTL level output to USB. But it is easier to use a microcontroler that suppprts USB directly like the 18F2550. Take a look at the USB Bitwacker link in my signature for an example.

    3v0

    Quote Originally Posted by pwotoole View Post
    I see them advertised as USB to TTL converters, but then when I read more about them, I find that they are USB to RS232 converters.
    Isn't there a difference between TTL and RS232 voltages?

    Wouldn't the output from a microcontroller need to be converted to RS232 first, before one of those advertised USB converters could be used?

    Is there a way to directly convert from a microcontroller output to USB?

    Thank you
    Pat
    Please post questions to the forums. PM's are for personal communication.

    BCHS/3v0's Tutorials
    Junebug USB PIC programmer kit., USB Bit Whacker,
    The 15 Minute Printed Circuit Board! (+drill time)

  3. #3
    shingadaddy Newbie
    Join Date
    Jan 2009
    Location
    Central USA
    Posts
    88

    Default

    Yep- Definately a few differences in voltage levels of TRUE RS232 and TTL level RS232. You can see up to +/- 10 or 12 volts on a standard RS232 line. Right at the back of your PC.

    Microcontroller UART connections typically have TTL level or 3.3 volt level output/inputs and to get to TRUE RS232 levels, they typically run the TTL or 3.3 volt signals of the microcontroller through a converter chip like the MAX series of converters.

    The Vinculum device by FTDI lets you take microcontroller UART levels and produce USB. It also lets you do SPI to USB.

    Some of the more muscular controllers have USB built in. You just hook up the connections to the HOST type A connector or the DEVICE type B connector.

    ALso I don't believe Pic makes any devices that can act as a USB HOST. They only do DEVICE (SLAVE) device types.
    The most popular Engineering test phrase... WHAT WAS THAT!!!

  4. #4
    Leftyretro Excellent Leftyretro Excellent Leftyretro Excellent Leftyretro Excellent
    Join Date
    Mar 2007
    Location
    Hercules, California
    Posts
    1,420

    Default

    Quote Originally Posted by pwotoole View Post
    I see them advertised as USB to TTL converters, but then when I read more about them, I find that they are USB to RS232 converters.
    Isn't there a difference between TTL and RS232 voltages?

    Wouldn't the output from a microcontroller need to be converted to RS232 first, before one of those advertised USB converters could be used?

    Is there a way to directly convert from a microcontroller output to USB?

    Thank you
    Pat
    There are two different types of USB serial convertors. One type converts USB serial data to RS-232 voltage levels, the other type converts USB serial data to TTL voltage levels. The kinds that have complete DB9 pin connector on one end are designed for RS-232 voltages, the modular USB convertors are generally of the TTL variaty and handle the voltage conversion and data invertion needed for direct connection to 5volt or 3.3volt for most micro-controllers, but not the standard Picaxe which does the inversion in software and handles the voltage translation with resistors.

    A picaxe serial input circuit is expecting RS-232 voltages even though the PIC chip is a TTL type device, confusing isn't it? That's because the Picaxe team came up with a clever resistor network that accepts RS-232 voltages directly to the PIC chip without any damage and handles the data inversion in it's bootloader software. The advantage of that is the lowest possible cost to communicate with legacy PC serial ports. Now that USB serial convertors are a popular choice special attention needs to be made be sure it's compatable with the Picaxe's hardware interface and bootloader software. It's best to buy one that someone has proven to work with a Picaxe.

    Here are a few commerical examples from Sparkfun:

    for RS-232 voltage level: SparkFun Electronics - USB to RS232 Converter

    for TTL voltage level:
    SparkFun Electronics - Breakout Board for FT232RL USB to Serial

    Hope that's not all too confusing but it's has been an evolving subject especially now that true PC serial ports are getting scarce and most want or need to use their USB ports for serial communication needs.

    Lefty
    Last edited by Leftyretro; 27th January 2009 at 10:23 PM.
    Measurement changes behavior

  5. #5
    pwotoole Newbie
    Join Date
    May 2007
    Posts
    32

    Default

    Thanks everybody.

    If I wanted to take data from an Atmega168 board, with its own power supply, and communicate with a PC via USB is that the type that converts USB serial data to TTL voltage levels? At what voltage level would the Atmega168 need to operate at? Is 5v too high?
    I see that Sparkfun has an FTDI Basic Breakout, which can connect directly to Arduino's mini Pro, is that a type that converts USB serial data to TTL ?

    Patrick

  6. #6
    shingadaddy Newbie
    Join Date
    Jan 2009
    Location
    Central USA
    Posts
    88

    Default

    Might copy us some links to the exact locations you are using for reference instead of me poking around and possibly finding the wrong data. Might be tomorrow before I get to it though.
    Looking here:
    http://www.atmel.com/dyn/resources/p...ts/doc2545.pdf

    Seems like the device has a single USART. This will be chip level voltages I imagine. So you could use and FTDI FT232RL and feed the serial lines from the USART into this device and take the USB output from the FT232RL to a B type SLAVE USB connector. Then cable that to your PC. The PC will recognize the FT232RL as a virtual comm port and serial data can be exchanged that way. Hopefully the atmel USART has CTS and RTS flow control because it sure makes data transmissions a lot more reliable with hardware flow control. You can always code up virtual RTS and CTS lines but thats just an extra PITA...

    You speak of a BOARD and I am unaware of what board you speak of so I can't really get anything more specific than chip level.
    Last edited by shingadaddy; 28th January 2009 at 03:43 AM.
    The most popular Engineering test phrase... WHAT WAS THAT!!!

  7. #7
    Leftyretro Excellent Leftyretro Excellent Leftyretro Excellent Leftyretro Excellent
    Join Date
    Mar 2007
    Location
    Hercules, California
    Posts
    1,420

    Default

    Quote Originally Posted by pwotoole View Post
    Thanks everybody.

    If I wanted to take data from an Atmega168 board, with its own power supply, and communicate with a PC via USB is that the type that converts USB serial data to TTL voltage levels? At what voltage level would the Atmega168 need to operate at? Is 5v too high?
    I see that Sparkfun has an FTDI Basic Breakout, which can connect directly to Arduino's mini Pro, is that a type that converts USB serial data to TTL ?

    Patrick
    Yes, that one will work. Sparkfun sells Arduino compatable boards that some run on 3.3volts power and interface (at 8mhz speed) or 5 volts power and interface that run at 16mhz speed.

    The 'standard' Arduino board uses 5volt power and logic. To run the ATmega168 at the 'standard' Arduino 16mhz clock speed then it needs to be run at 5 volts.

    The USB serial breakout modules that are based on the FT232RL chip have an input pin that will allow it to be used with either 3.3 or 5 volt signal levels depending on the voltage you strap to that input pin.

    Lefty
    Last edited by Leftyretro; 28th January 2009 at 03:53 AM.
    Measurement changes behavior

  8. #8
    tkbits Newbie
    Join Date
    Aug 2005
    Location
    US
    Posts
    88

    Default

    Quote Originally Posted by shingadaddy View Post
    ALso I don't believe Pic makes any devices that can act as a USB HOST. They only do DEVICE (SLAVE) device types.
    I have been playing with one of the PIC32 chips that does have USB hosting capability. The one I'm using comes on the PIC32 Starter Kit.

  9. #9
    pwotoole Newbie
    Join Date
    May 2007
    Posts
    32

    Default

    Thanks to everybody for all the information.
    pwotoole

  10. #10
    shingadaddy Newbie
    Join Date
    Jan 2009
    Location
    Central USA
    Posts
    88

    Default

    Yeah I did a little digging and found a few PIC offerings. They're getting their feet wet in the USB host arena now. Hows the stack software look? Support for several profiles?


    Quote Originally Posted by tkbits View Post
    I have been playing with one of the PIC32 chips that does have USB hosting capability. The one I'm using comes on the PIC32 Starter Kit.
    The most popular Engineering test phrase... WHAT WAS THAT!!!

+ Reply to Thread

Similar Threads

  1. DC to DC converters
    By adnanaftab in forum Electronic Projects Design/Ideas/Reviews
    Replies: 4
    Latest: 31st July 2008, 06:28 PM
  2. converters
    By 4electros in forum General Electronics Chat
    Replies: 3
    Latest: 17th December 2006, 10:46 PM
  3. dc to ac converters
    By mshemyalnisar in forum Electronic Projects Design/Ideas/Reviews
    Replies: 6
    Latest: 11th August 2006, 09:01 PM
  4. ac/dc converters
    By ALEXfromBrazil in forum General Electronics Chat
    Replies: 4
    Latest: 21st July 2004, 11:47 PM
  5. V-I converters
    By stzarov in forum Electronic Projects Design/Ideas/Reviews
    Replies: 6
    Latest: 13th June 2004, 05:07 PM

Tags for this Thread