2
\$\begingroup\$

I use an NXP micro-controller, P89V51RD2, and use a RS232 to USB converter to program it. I'd like to communicate with the computer to send data but without using the RS232 adapter and convert serial data from micro-controller to USB compatible form without the RS232 element.

Current stituation :

uC(serial) --> MAX232 --> RS232/USB adapter --> PC(USB)

Required stituation:

uC(serial) --> [some small circuit] --> PC(USB)

What can I do so that the new circuit is small enough to be burned on a PCB with the controller and directly interfaced with a USB?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ A USB to TTL UART device requires only the connector to connect to the uC's UART. This only requires room for inline header pins. ftdichip.com/Products/Cables/USBTTLSerial.htm \$\endgroup\$
    – kenny
    Commented Mar 4, 2013 at 12:27

1 Answer 1

11
\$\begingroup\$

You seem to want to interface to an USB port, so you will need some form of USB interface.

  1. The easiest route is an off-the-shelve usb-serial converter, then a max232 or the like, then the UART of your microcontroller. You apparently want to step beyond this.

  2. A next step is to use an usb-serial converter chip, without the extra stage of going to RS232 levels (and back). The FT232RL is often used for this purpose, there are others. These chips interface directly between USB and the UART pins of your microcontroler. The FT232RL is a small SMD chip, it uses little PCB area but is somewhat more difficult to use than a DIP chip. If you don't want to do you own PCb there are various break-cout PCBs, and the manufacturer (FTDIchip) sells cables that have the chip built into the USB connector.

  3. A next step could be to use a microcontroller that has a USB interface on the chip. For instance various PICs, AVRs and ARM chips have this feature. But this means that your micocontroller application will have to use the USB hardware. of the chip. This is doable (often with the aid of libraries provided by the chip manufacturer, or from thirds parties), but considerably more difficult than using a UART.

  4. For the real die-hards there are libraries that implement USB on an AVR without using AVR USB hardware. The resulting device is probably NOT acceptable as an official USB device, but they seem to be working.

A problem with 3 and 4 (and sometimes even with 1) is that you need an USBstack on the host side, and in my experience all host stacks except for the ones FTDI offer suck (the ones for prolific-based usb-serial converters seem to suck less than most others).

\$\endgroup\$
3
  • 2
    \$\begingroup\$ One widely known (more or less) implementation of a USB interface on an AVR without built-in USB is the IgorPlug. While that is a totally different MCU, it should be possible to do the same on almost any other microcontroller. \$\endgroup\$
    – Christoph
    Commented Mar 4, 2013 at 14:12
  • \$\begingroup\$ There are some off-the-shelf cables available with a molded USB connector at one end that contains a USB-to-async chip, and then typically either a 6-pin connector or six color-coded wires at the other end with logic-level RX/TX/RTS/CTS. \$\endgroup\$
    – supercat
    Commented Mar 4, 2013 at 17:16
  • \$\begingroup\$ The biggest issue with #4 is that there is little time for anything given that the USB timing is quite tight. \$\endgroup\$ Commented Mar 4, 2013 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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