uracoli logo Home - Downloads - Docs - Hardware - Source - News - Blog tiny230 photo

[span.] el faro - [engl.] beacon - [ger.] der Leuchtturm

Radiofaro is an Arduino footprint compatible board with the Atmel single chip transceiver ATmega128RFA1. It replaces the original AVR ATmega328P, thus enabling wireless communication in a IEEE802.15.4 network. All special function pins of the original AVR are translated to the new controller which makes it possible to use existing shields without changing the enviroment.



Radiofaro PIN Assignment
             |              |   |  |
             |              +---+  |
             |              PD2/3  o AREF
             |              UART1  o GND
             |                     o D13  PB1/SCK
             |                 J3  o D12  PB3/MISO
         RST o                     o D11  PB2/MOSI
         3V3 o                     o D10  PB0/SS
         5V  o  J4                 o D9   PB5/OC1A (PWM)
         GND o                     o D8   PB4/OC2A (PWM)
         GND o                     |
         VIN o                     o D7   PE3/AIN1 (PWM)
             |     +--------+      o D6   PE2/AIN0
PF0/ADC0  A0 o     |   d    |      o D5   PE7
PF1/ADC1  A1 o     |   e    |      o D4   PE6
PF4/ADC4  A2 o  J2 |   r    |  J1  o D3   PE5/OC3C/INT5 (PWM)
PF5/ADC5  A3 o     |   f    |      o D2   PE4/OC3B/INT4 (PWM)
PF6/ADC6  A4 o     |   a    |      o D1   PE1/TXD0
PF7/ADC7  A5 o     |   1    |      o D0   PE0/RXD0
             +-+   |        |   +--+

Most of the components can be ordered from the german distributor reichelt elektronik GmbH & Co. KG . This is the link to the public shopping cart.

The ATmega128RFA1 radio modules are available from dresden elektronik ingenieurtechnik gmbh. Per default the module deRFmega128-22C00 with the ceramic chip antenna is used. Optionally it can be replaced with the U.FL variant deRFmega128-22C02.

Arduino Software Setup

How the Arduino-IDE package gets installed is basically described here. The AVR tool chain that comes with the Arduino-IDE is from the year 2008 and does not support modern MCUs like the ATmega128RFA1 - therefore it needs an upgrade before Radiofaro can be used.

After the tool chain upgrade, the support package uracoli-arduino-[version].zip is required for Radiofaro support in the Arduino-IDE. It can be downloaded from http://download.savannah.nongnu.org/releases/uracoli/.


This article describes on method to upgrade the tool chain inside the Arduino-IDE Arduino Full Memory: upgrade to the last ATMEL Toolchain version


For MacOS a short description of the tool chain update can be found here: http://lists.nongnu.org/archive/html/uracoli-devel/2010-10/msg00002.html. This update is based on the CrossPack for AVR Development.

Linux - Ubuntu 12.04

Install original Arduino-IDE
# tar -C /opt/avr -xvzf Downloads/arduino-1.0.3-linux64.tgz
# cd /opt/avr
# mv arduino-1.0.3 arduino-1.0.3-linux_x86_64
Install and update the Arduino toolchain

Normally the standard packages of the Linux distribution are sufficient. You can install them with:

# sudo apt-get install gcc-avr avr-libc avrdude
# cd arduino-1.0.3-linux_x86_64/hardware/tools/
# --> the next step moves the old toolchain out of the way:
# mv avr avr.orig

Since we move the standard Arduino toolchain out of the way, Arduino searches the tools in $PATH.

Alternatively you can use a dedicated toolchain, e.g. the latest and greatest AVR toolchain (after registration at www.atmel.com), you have to do the following steps:

# tar -C /opt/avr -xvzf Downloads/avr8-gnu-toolchain-
# cd arduino-1.0.3-linux_x86_64/hardware/tools/
# mv avr avr.orig
# ln -sfv /opt/avr/avr8-gnu-toolchain-linux_x86_64 avr
Install uracoli support package
# cd /opt/avr/arduino-1.0.3-linux_x86_64
# unzip  Downloads/uracoli-arduino-[version].zip

Alternatively you can use the steps described in How to update the AVR toolchain to the last 3.4.1 (Linux).

Run the Arduino-IDE
# cd /opt/avr/arduino-1.0.3-linux_x86_64
# ./arduino

If the Arduino-IDE does not start with the error java not found, you need to run:

# sudo apt-get install openjdk-7-jre

Initial Firmware Setup


For the initial firmware installation, an external ISP or JTAG programmer like AVR-ISP, Atmel Dragon or Atmel JTAG-ICE MkII is needed.

# cd /opt/avr/arduino-1.0.3-linux_x86_64
# make -C  hardware/uracoli/bootloaders/radiofaro/
# avrdude -P usb -c jtag2 -p m128rfa1 \
          -U hardware/uracoli/bootloaders/radiofaro/ATmegaBOOT_radiofaro.hex
# avrdude -P usb -c jtag2 -p m128rfa1 \
          -U lf:w:0xe2:m -U hf:w:0x1a:m -U ef:w:0xfe:m

This fuse settings set the bootloader size to 2kByte and the clock to 8MHz internal RC oscillator. After a reset, the MCU executes the code in the bootloader section and proceeds with execution of the application programm if within a timeout no programmer command is sent via the serial line.

Test Bootloader

After connecting the Radiofaro board via USB, the assigned serial port name must be found. Under Linux the following command will show, that /dev/ttyUSB0 is assigned to the connected board:

# dmesg | grep ttyUSB
[    3.160957] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0

The correct function of the bootloader can be checked either via the Arduino-IDE when flashing a sketch or with the following command.

# avrdude -b 38400 -P /dev/ttyUSB0 -c arduino -p m128rfa1
avrdude: AVR device initialized and ready to accept instructions
avrdude done.  Thank you.

more topics

Last modified: 2013-05-07 Visitor Counter