Electronic – Do I need MAX232 when using USB-to-Serial cable

atmegars232

I am willing to build an AVR JTAG debugger (I grabbed from here: http://aquaticus.info/jtag) but the circuit uses COM port and it has MAX232 transceiver. My Laptop does not have COM port, so I need a USB-to-Serial cable.
My question is, do I have to add the MAX232 circuit if I'm going to use USB-to-Serial cable?

I have done some search and found that some cables are implemented with RS232 transceiver, on the box of my cable they say it supports the RS232 interface… is it the same? (http://www.unitek-products.com/en/product_detail.php?id=12)

If I didn't have to add the MAX232, is it necessary to invert the signals going to MCU? If it is, why?

I am sorry for the long questions, but it is my first time to deal with the RS232. Thank you very much in advance.

Best Answer

The asynchronous serial protocol can use different voltage levels and polarities.

RS232 refers to a specific set of voltage levels, inverted polarity, and (nowadays) a DB9 connector.

A USB-to-serial chip (like the FT232) outputs asynchronous serial at 3V or 5V level, not inverted. A MAX232 or similar chip is used to convert this to RS232 level.

The serial pins of a microcontroller use asynchronous serial at the 3V or 5V level. A max232 chip can be added to bring the signals to RS232 level.

Most USB-to-serial cables (including the on you refer to) include both the usb-to-serial chip AND the max232, with no possibility to access the in-between level.

So, for a successful asynchronous serial PC-to-microcontroller connection there are two possibilities(FT232 can be swapped for an equivalent chip from another vendor):

  • PC-FT232-microcontroller: this is the easy way, often used for a PCB with the microcontroller and the FT232 chip.

  • PC-usb_to_serial_cable-max232-microcontroller: this might seem a bit convoluted, because the signals are first converted from 3V or 5V to RS232 (inside the usb_to_serial cable), and then converted back by the max232 to the level that the microntroller can handle. But usb_to_serial cables are so common and check that this is often the aeasy option.

(A third option is to use a microcontroller that is itself USB-capable.)

Your debug board has a max232 and a DB9 connector, so you should use an off-the-shelve usb_to_serial converter cable, like the one you link to.