Modifying the AT91SAM7S256-EK to support three UARTs
The AT91SAM7S ARM MCUs provide two full featured USARTs (I'll just call
them UARTs for the rest of this page) and a DEBUG serial port which has
similar features without synchronous capability and is comparable to a
UART in most other MCUs. I wanted to be able to use all three
serial ports on the AT91SAM7S256-EK, but they only bring out two of the
three to connectors. The two they bring out to connectors are
UART0 and the DEBUG serial port. The Debug port is the one that
is used by SAM-BA to load code into the Flash of an unprogrammed
part. I really wanted all three ports so I decided to add it to
the Debug port connector. Here is how I did it. Please read all instructions carefully before starting the work. This will require blind drilling a via which can be difficult. Please evaluate your skills before starting.
Looking at the schematic I saw that there are two RS-232 converter
chips to work with the two ports. Each chip has two drivers and
two receivers. The chip supporting UART0 uses one pair for serial
data and another pair for the handshake lines. The DEBUG serial
port has an unused driver and receiver since there are no handshake
signals. It seemed a simple matter to wire the unused pair to the
UART1 serial data pins and bring the RS-232 side to unused pins on the
DEBUG serial port connector.
Here is the component side of the board after the modifications.
The connections to the RS-232 transceiver chip are on the top side of
the board and the connections to the AT91SAM7S256 and the DEBUG serial
port connector are on the bottom.
Figure 1 - Component Side Full Board
The top side wires are shown in more detail here. Two go to the
DEBUG serial port connector and two go to the expander connector which
connects to the AT91SAM7S256 MCU.
Figure 2 - Component Side Wires
The unused sections of the transceiver chip have their inputs grounded,
so the grounds have to be cut. One is at pin 9 on IC2 and can be
cut with a knife, but the other is pin 12 which connects to a via
that must be drilled out. Worse the via is under the chip so it
has to be done without drilling through the chip. This is not too
hard to do if you have a small drill press, but otherwise will take
some care to do by hand. Note that the schematic counts the pins
on IC1 and IC2 as 18 pin chips. I assume they did this to be able
to use some chip that has a compatible pinout, but in an 18 pin
package. So since these chips have 16 pins, count the first pin
on the chip as pin 2.
Here is what the back side of the board looks like with the wires and
the drilled via. The drilled via is roughly centered left-right
and is about a quarter way down from the top.
Figure 3 - Back Side Wires and Drilled Via
Here is a closeup of the drilled via. I used an 0.032" drill
after finding out that an 0.018" drill was not large enough. Both
drills were very hard to center over the via since this requires a
steady hand and a good eye. I also had a drill press with a dial
gauge mounted so I could accurately measure the depth. The PCB is
0.062" with another 0.010" or so clearance below the IC on the other
side. If you don't have a drill press you can carefully measure
0.070" up from the tip of your drill and wrap a piece of masking
tape. Then drill down until the tape is touching the board.
As you can see below, the hole is a bit hard to get centered, I had to
drill it three times before it was disconnected fully. The only
trace in the area is the IC pad on the top side. So you can use a
larger drill, say 0.050", but be careful not to drill the chip or the
chip lead on the other side of the board. You can check to make
sure you have disconnected the trace from the ground plane by checking
with an ohm meter.
Figure 4 - Drilled Via Closeup
You have to cut the trace between ground and pin 9. That can be
done on the top side with a sharp knife or a razor blade. I used
the drill press since it was handy. You do not need to drill
through the board for this one, so I just drilled enough to cut the
trace. This trace also grounds another part, so be careful to cut
it just next to the pad for pin 9. Otherwise you will cut the
ground trace to a capacitor which may make the RS-232 driver stop
working. The trace is largely covered by the white silkscreen but
you can see where it leaves the via and turns toward the
capacitor. Do not cut that trace, only cut it where it turns
toward pin 9 of IC2.
Figure 5 - Ground to Pin 9 Cut
I think that is it for the board modifications. Now you need the
info on a cable to bring out both the Debug UART and the standard UART1
from the DB-9 connector. I put the extra signals for UART1 on
different pins than are used for the handshaking on the connector for
UART0. This way I can use the same cable on either connector if I
want. Here is a picture of the cable.
Figure 6 - Cable
The cable uses female connectors on all three ends. The
AT91SAM7S256-EK uses male connectors as does a standard PC. The
cable is wired as a null modem so it can be used without a null modem
cable or with just a standard male-female extension cable if
needed. The schematics for the cable and for the modified board
are shown here.
Figure 7 - Modified AT91SAM7S256-EK
Figure 8 - Cable
I think this is pretty clear and complete. If I have left
anything out or anything is not clear, please let me know and I will
try to improve it. The photos are fairly high resolution at about
200 kB or more each. If this is inconvenient for users on dialup,
I can provide this page with images that have smaller file sizes.
gnuarm dot 2006 at arius dot com