1
\$\begingroup\$

First of all I want to mention that this question is related to my last question about USB connection. ( please note that this question is about a specific topic that my last question is not about, but it belongs to it )

I am searching for a way to do a USB / Serial convertion without an FTDI chip or so.

So is it possible to build a simple circuit that does what the FTDI is doing ? And if so, how can I make it and does it pay the work ? And last but not least, what exactly does the FTDI chip ?

How does it converts the signal from Serial to USB and what are the diferences between those ?

( For more information about the project that is going to use this "selfmade" USB / Serial Converter, please check out my question that is linked abow )

Thanks for all of your answers.

\$\endgroup\$

closed as too broad by Passerby, Nick Alexeev, PeterJ, Gustavo Litovsky, Dave Tweed Oct 10 '13 at 0:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ Why not just use a AVR that has a U(S)ART? \$\endgroup\$ – Ignacio Vazquez-Abrams Oct 8 '13 at 19:25
  • \$\begingroup\$ It ius possible to do a board that will do what the FTDI is doing, but not cheaper unless you're willing to give up speed. \$\endgroup\$ – Gustavo Litovsky Oct 8 '13 at 19:57
  • \$\begingroup\$ @IgnacioVazquez-Abrams for this project I need to use an ATtiny45. It has no build in USB ( hardware ). \$\endgroup\$ – Ace Oct 8 '13 at 20:26
  • \$\begingroup\$ Do you need to use it for the converter as well? \$\endgroup\$ – Ignacio Vazquez-Abrams Oct 8 '13 at 20:27
  • \$\begingroup\$ @GustavoLitovsky what exactly does the FTDI ? how is the serial signal and how it is turned to USB signal ? and why can't i just emulate the convertion with e.g. the arduino code using arduino software ( arduino as ISP... pls check the linked question ) \$\endgroup\$ – Ace Oct 8 '13 at 20:28
2
\$\begingroup\$

Yes you can make a native USB device without the FTDI IC.

Some ICs from Atmel (ATtiny2313) an Microchip (PIC18F2550) has the USB ports native. So its just plug and play.

This site has some good examples to use ATtiny, and this one with PICs.

All of them use the V USB to comunicate with computer, emulating a Serial port on it.

\$\endgroup\$
  • \$\begingroup\$ thank you for that reply. did you take a look to my question i've linked ? I'm using attiny45 with VUSB but I'm not sure how to wire it up...if you can, could you make an answer on my last question ? \$\endgroup\$ – Ace Oct 8 '13 at 20:22
  • \$\begingroup\$ I wouldn't call it plug and play. Unless you're satisfied with exactly what the example descriptors do, you're going to be writing descriptors and defining endpoints. It's not particularly difficult, but debugging these things, especially without pro tools, can get downright tedious. \$\endgroup\$ – Scott Seidman Oct 8 '13 at 21:43
  • \$\begingroup\$ @ScottSeidman: Do you know of any open source or inexpensive pre-made solutions for interfacing an arbitrary serial device using HID rather than communications class (assuming purpose-written software on the PC side)? HID can't manage speeds quite as good as the communications class, but its drivers are automatically installed with every version of windows and are less annoying than any of the communications-class drivers I've ever used. \$\endgroup\$ – supercat Oct 8 '13 at 22:17
  • \$\begingroup\$ The old Keyspan USA-19HS usb-serial dongles take this approach: they are built around an 8081 variant microcontroller instead of a dedicated USB-serial chip. (They are also a pain in the ass, requiring OS drivers that upload proprietary firmware). \$\endgroup\$ – Kaz Oct 8 '13 at 23:08
  • \$\begingroup\$ @supercat, not for generic serial, but plenty of little doohickeys can almost do it. u-hid.com/home/uhid_nano.php for example \$\endgroup\$ – Scott Seidman Oct 9 '13 at 0:06
2
\$\begingroup\$

So is it possible to build a simple circuit that does what the FTDI is doing ?

In short: it's not possible to build a simple circuit to do that.

You could build a not-so-simple circuit, which would involve either an application-specific integrated circuit, like the FT232 or his cousins (MCP2200, PL2303, CH341, etc), or a microcontroller with a hardware USB-interface integrated. These two are pretty much the same, within an FT232 you would most probably find a microcontroller with a hardware USB-interface. What you gain by using an application-specific IC is that you don't have to write the firmware for the IC yourself. What you gain by using a microcontroller is that you have much more freedom, as you're not bound by the limitations of the hardcoded firmware. Also, given the large offer of microcontrollers on the market, you can probably find a solution with a microcontroller with a lower price tag.

However, in most of the cases, there is usually no sane reason to use a dumb microcontroller for your computing needs (an Attiny45, for example), and put another (more equipped) microcontroller in front of the other to provide the USB interface. You could merge the two, and select a kind of a microcontroller for your needs which also happens to handle the USB interface as well, there are plenty of such microcontrollers.

Of course, sometimes there are legitimate reasons to separate the two functions. Usually a legitimate reason is galvanic separation: putting a pair of optocouplers is easy if you have a pair of serial lines, and much harder if you have a USB line.

\$\endgroup\$
  • \$\begingroup\$ In the case of the MCP2200, its exactly the same. It's literally just a rebranded PIC18F14K50. \$\endgroup\$ – Passerby Oct 9 '13 at 8:45
  • \$\begingroup\$ Exactly. And the price is also about the same. \$\endgroup\$ – Laszlo Valko Oct 9 '13 at 8:52
  • \$\begingroup\$ Actually, there's another very good reason for using two chips: isolating the software tasks. If the USB interface has to time-share with the application code, any flaw in the application code - or use of a debugger - may well break the USB session. One quickly learns that any integrated-USB project should also have test points or headers for a serial channel which can be used with an external converter during initial or challenging phases of development. \$\endgroup\$ – Chris Stratton Oct 9 '13 at 15:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.