Programming The RFD900 Custom Board From Borealis Labs
Programming The RFD900 Custom Board From Borealis Labs
1
Forword:....................................................................................................................................................... 3
Parts: ............................................................................................................................................................ 3
Setting up the Arduino Uno: ........................................................................................................................ 3
Installing IDE Library................................................................................................................................. 3
Uploading The Programmer Code ............................................................................................................ 3
Burning the Bootloader:............................................................................................................................... 4
Editing Board Config File .......................................................................................................................... 4
Configuring ............................................................................................................................................... 6
Burning ..................................................................................................................................................... 6
Programming: .............................................................................................................................................. 6
Installing Libraries .................................................................................................................................... 6
Editing config files .................................................................................................................................... 6
Uploading ................................................................................................................................................. 7
2
Forword:
The following instructions are very much aided by documentation made by Silicon14 on
Instructables.com (https://www.instructables.com/ATMEGA2560-Standalone-Using-Arduino-UNO/);
however, I found the instructions insufficient for this specific use case of the ATMega2560 and is
therefore the reason for this document.
Parts:
Firstly, you will need a few parts.
https://mcudude.github.io/MegaCore/package_MCUdude_MegaCore_index.json
into the Additional Boards Manager URLs. Now we can install the library, which will be under tools -->
board --> boards manager. From there you can search for MegaCore and install the library.
3
From here you will want to disconnect the Arduino Uno and connect the RFD900 Board to the Uno with
the following pinout:
10 -> reset
11 -> MOSI
12 -> MISO
13 -> CLK
5v -> 5V
Open it with a text editor [as administrator] (I used Notepad++) and locate to the ATMEGA2560 section.
Find the line "mega.menu.cpu.atmega2560.bootloader.high_fuses=0xD8"
We have to replace the value of "0xD8" with "0xD9". This is so, because in stand-alone ATMEGA2560
chips, if the BOOTRST fuse is not set, the chip will be correctly programmed, but the programs will never
run. So the line could look like this (we can keep the original line commented as I did.)
4
"mega.menu.cpu.atmega2560.bootloader.high_fuses=0xD9".
5
Configuring
Now we can get all of our options out of the way. In boards we will want to go into the newly added
MegaCore boards and select ATmega2560. Then we’ll set the following under tools:
Port --> whatever port the Arduino Uno is on (At this point you can plug the Arduino Uno back in)
Burning
Now we can go up to tools --> Burn Bootloader
Programming:
Installing Libraries
Assuming that you are using the default software to collect data with the board, you will need to install
a few libraries for the default code to work. All these libraries can be searched for, and installed, by
going to sketch--> include libraries --> manage libraries. Those libraries are:
MS5xxx
Adafruit_LSM303_Accel
Adafruit_LIS2MDL
Original code
6
Edited code
Uploading
Finally, we can now upload our code. To do so, please have your code ready and do Sketch --> Upload
Using Programmer. You must upload using programmer, otherwise it will not upload the program
correctly to the board. Once uploaded there should be two LEDs that begin to blink every few seconds
that are labeled on the PCB to be D12 and D13. If these are blinking, we know that it is collecting data
and storing it to the SD card. We can also check for a file on the SD card named PAYLOAD