How to Add Multiple UART Connections to your Custom Arduino Board

or What Those 1k Resistors Do.

"A friend of mine is working on his own custom Arduino powered LCD backpack and asked me to look at his design. I noticed it had a header for the all to familiar FTDI board to program the Arduino and a separate header for power and data connection. Both headers had the ATMega’s UART pins broken out. The problem with this design is it then requires the user to disconnect whatever they have connected to the second set of UART pins whenever they want to attach the FTDI board to upload a new sketch. With a few more passive parts, he could eliminate that need. This is a quick tutorial for beginners looking to roll their own Ardunio boards and may have missed this very easy and time saving design trick."

This trick is how the regular Arduino board allows you to access with ATMega’s UART pins without fighting the onboard FTDI chip. Let’s take a look at it’s schematic:
<snippet of Uno and Duemilanove schematic with D0/D1>
There you see the ‘prioritizing’ resistors on the UART lines between the FTDI (or it’s replacement) and the main ATMega. This mean if anything is plugged into the UART pins (digital pins 0 and 1) it will ‘override’ whatever the FTDI is transmitting.

So there you have it. Two resistors in your design can make it easier and safer to upload new code.

"if anything is plugged into the UART pins (digital pins 0 and 1) it will ‘override’ whatever the FTDI is transmitting"

There's the problem tho - if Rx is an input from another device, if that device is driving low while the FTDI is trying to supply data to the Rx pin, it gets overwritten - requiring the other device to be unplugged. If the other device is another serial device it will hold Rx low when it is not transmitting.

I don't see how your explanation solves anything.

Explain your example a little better; I don't understand it.

You could tie both pins of the second UART's header to either GND or VCC and the FTDI would still be able to flash the AVR.

Wait, I think you are getting confused.

The beginning of the tutorial is how to wire it up so the removable FTDI get's priority.

The plain Arduino schematic is showing how it's wired so whatever is plugged into DP 0-1 get priority over the onboard FTDI chip.

This:

here's the problem tho - if Rx is an input from another device, if that device is driving low while the FTDI is trying to supply data to the Rx pin, it gets overwritten - requiring the other device to be unplugged.

is true for a regular Arduino.

In my design example it's reversed. The FTDI needs to be removed before the other UART header will work.

And I'd appreciate it if questions where asked on my blog so others who visit not from this forum could see the questions and answers as well.