ATmega128RFA1 Dev Board Hookup Guide
This Tutorial is Retired!
This tutorial covers concepts or technologies that are no longer current. It's still here for you to read and enjoy, but may not be as useful as our newest tutorials.
How To Program
Below, we’ll explain the two interfaces available for programming the ATmega128RFA1. There is a serial bootloader pre-programmed onto the board, or you can use the standard AVR 6-pin ISP header. In either case, you’ll probably need to solder headers onto the programming port pins to connect a programmer.
ATmegaBOOT Serial Bootloader
Bootloaders are small programs loaded onto a chip, which make uploading compiled code easier. Instead of requiring a specialized (often expensive) piece of hardware – a programmer – a more generalized tool can be used to upload to the board.
The ATmega128RFA1 Development Board ships with a pre-programmed serial bootloader. Either an (archaic) serial port can be used to upload code to the board, or a more common USB-to-Serial converter can be used. We recommend the 3.3V FTDI Basic board, which interfaces directly to the 6-pin serial header of the dev board.
A 3.3V FTDI Basic Board connected to the development board’s serial programming header. Right-angle headers were previously soldered to the header. As a bonus, the FTDI basic can also power the dev board.
The bootloader on the ATmega128RFA1 Dev Board is a variation of the ATmegaBOOT serial bootloader, which was used on older Arduinos like the Duemilanove. This bootloader uses the UART0 of the ATmega128RFA1, and expects uploaded code at a baud rate of 57600.
If you’re familiar with avrdude, a command like the one below should upload a compiled piece of code.
avrdude -p atmega128rfa1 -c arduino -P \\.\COM## -b 57600 -D -V -U flash:w:test-sketch.hex:i
Or, skip avrdude, and use the Arduino IDE with the bootloader, as we’ll explain in the following pages.
If you’ve got an AVR programmer and would rather skip working with the bootloader, the standard AVR 2x3 pin programming header is broken out on the board. Pin 1 of the programming port is marked with a silk-screened dash.
An AVR Pocket Programmer connected to the development board’s ISP header. Straight headers were previously soldered to the header to allow for the connection.
If you don’t have an AVR programmer but would still prefer using this method for uploading code, we’d recommend the USB Pocket AVR Programmer. Using that, an avrdude command like below can be used to upload a program:
avrdude -p atmega128rfa1 -c usbtiny -P usb -D -V -U flash:w:test-sketch.hex:i
If you have an Arduino, that can work as an alternative to the AVR programmer – check out the the ArduinoISP sketch under the examples menu.