Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

??about USB to TTL converters ?

Status
Not open for further replies.

pwotoole

New Member
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
 
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

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
 
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.
 
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:
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
 
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:
https://www.electro-tech-online.com/custompdfs/2009/01/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:
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:
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.
 
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?


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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top