How to use USART on the Atmel AT90USBKEY / AT90USB1287

When programming the Atmel AT90USB1287 it is very helpful to have a UART connection for debugging purposes. To avoid reinventing the wheel, I will use Peter Fleury’s uartlibrary. Additional documentation an sample code can be found here.

First, we will wire some standard jumpercables to the AT90USBKEY. According to the datasheet of the AT90USB1287 and the datasheet of the AT90USBKEY the pins are available at the connector J4, more specifically:

USART1 Transmit Pin = PD3 = AT90USBKEY -> J4 Pin 7 -> White
USART1 Receive Pin = PD2 = AT90USBKEY -> J4 Pin 8 -> Green
Ground = AT90USBKEY -> J4 Pin 2 -> Black

AT90USBKEY2 J4

My UART to USB Cable has the following wiring:

RX -> Green
TX -> White
GND -> Black
VCC -> Red

Now its time for a little sample program:

Build it and flash it to your AT90USBKEY. Remember that you must bring your AT90USBKEY into DFU mode for programming with FLIP.

Now you can start a terminal:

Now you can press the RST button to actually run the program on the microcontroller and should see a nice Hello World greeting.

UART on Pandaboard

List your users group with:

Add the user to the dialout group if necessary, to fix permission issues:

Now you can access all your uart devices:

for example UART4 on expansion connector A: