Created by: gwideman, Mar 26, 2014 2:03 am
Revised by: gwideman, Apr 7, 2015 9:20 pm (4 revisions)

Overview

This page collects notes on the USB-to-serial interfaces that are commonly used so that a USB-equipped host computer can talk to the UART I/O on an Arduino or AVR. This is the customary way for a host to talk to the Arduino or AVR's bootloader software, and also to carry on host-AVR serial communications in general.
When communicating with AVR/Arduino bootloader software, in addition to the transmit and receive signals, the host software also manipulates the DTR line, which is expected to activate the AVR chip's Reset line.

Representative USB-to-serial wiring and connectors

Arduino typical internal connections

Numerous Arduinos were made with a USB-to-serial interface implemented using an FTDI chip, such as FT232RL. Typical connections:
FT232 func
Direction
ATmega func
Comment
TXD
-->
RXD/PD0
Shield D0
RXD
<--
TXD/PD1
Shield D1
DTR#
-->
Capacitor to Reset

RTS#
-->?
Resistor to Reset
RTS direction should match DTR
Other Arduinos implement the USB-to-serial interface with a second USB-capable AVR.
USB-to-serial AVR func
Direction
Main ATmega func
Comment
TXD
-->
RXD/PD0
Shield D0
RXD
<--
TXD/PD1
Shield D1
DTR#
-->
Capacitor to Reset

Adafruit/FTDI USB-to-TTL232 cable

AKA "Virtual COM port", or "Serial over USB"
Adafruit Product FTDI TTL-232R 3.3
FTDI product doc
Description claims that the 3.3V model works fine with 5V or 3.3V targets
Pin
Function
Descr
1
Gnd

2
CTS#
Handshake in
3
VCC

4
TXD
Out
5
RXD
In
6
RTS#
Handshake out
USB Driver:

Adafruit FTDI friend

Product Docs
Same pinouts as FTDI cable. Uses same FTDI TTL-232R chip:
  • Signal and power can be switched between 3.3V and 5V using jumper pads.
  • Description says the default 3.3V setting worked fine with either.
  • There are jumper pads to assign pin 6 to DTR instead of RTS. Alternatively, a wire can be soldered to the DTR pad to bring it out separately.
Docs

Boarduino input

What does Boarduino-DC expect on its serial input connector?
Pin
Function
Descr
1
Gnd
Gnd?
2
Gnd
Handshake in
3
VCC

4
Rx
In
5
Tx
Out
6
RTS#

Pololu AVR Programmer

Product Pinout
It's not clear which end of the row of pins (hole) is pin 1. I chose the +5V end
Pin
Function
Descr
1
+5V

2
Gnd

3
Rx
In
4
Tx
Out
5
A

6
B

A and B can be configured as various handshake inputs and outputs, including DTR and CTS
Anyhow, pin order not compatible with standard-ish FTDI cable, but obviously could be fixed in the connecting cable.

Hot-wiring an Arduino to hijack its USB-Serial capability

It should be possible to hijack the USB-serial chip in Arduinos that have them.
  • Tx and Rx appear as D0 and D1 on the shield connectors
  • DTR-reset signal appears as Reset on the ICSP connector
The main problems:
  • While we're hijacking the donor Arduino's serial functionality, we don't want the donor's AVR to respond to serial activity. Especially if the serial activity is to load a program to some target AVR.
    • On an Arduino with a socketed main AVR, obviously we could remove it. Otherwise...
    • We could cut traces
    • We could ISP-program a "do nothing" "boot" program into the donor AVR. Then Tx, Rx and DTR/Reset can be used freely, I think
      • Not sure if this is possible, since the ISP sequence of hardware signals presumably initiates programming regardless of previously-programmed code. Hmmm.
      • Perhaps a variant bootloader that immediately while booting reads a jumper that selects between "inert" and "normal bootloader" behavior.
      • Better yet, the modified bootloader could include code that monitors Rx and Tx activity, and shows some LED activity
  • Not clear whether the driver that knows how to operate the FTDI (in some Arduinos) or USB-serial AVR (in other Arduinos) would be happy if the donor's serial chip is talking to some other AVR type.
    • The hope would be that with the donor AVR knocked out, the serial chip would just look to the driver like any "FTDI cable".