The BITalino (r)evolution firmware is available in source code and in a prebuilt image ready to be programmed in a device.
To program the firmware on the BITalino (r)evolution device, you will need an AVR ISP programmer like the Atmel AVRISP mkII. The 6-pin ISP interface shall be connected to BITalino through the pins with the same name: VCC, GND, RESET, SCK, MISO and MOSI.
The prebuilt image is the main.hex file provided.
- Atmel Studio must be installed;
- connect the ISP programmer to your computer and wait for the its drivers to be installed (first time only);
- connect the programmer to the BITalino (r)evolution device;
- on Atmel Studio, open the Device Programming dialog;
- select the programmer in the Tool field;
- select the ATmega328P in the Device field;
- select ISP in the Interface field;
- click on the Apply button;
- on Flash section of the Memories tab, select the main.hex file;
- click on the Program button of the Flash section and check if the operation succeeded;
- on the Fuses tab, enter the following values to the fuse registers: Extended = 0xFD, High = 0xDF, Low = 0xFF;
- click on the Program button and check if the operation succeeded.
- package
avrdude
must be installed (in Linux, you can enter the commandsudo apt-get install avrdude
and in Mac OS X you can usefink
, entering the commandsudo fink install avrdude
); - connect the ISP programmer to your computer;
- connect the programmer to the BITalino (r)evolution device;
- on the same directory as the provided main.hex file, enter the command
avrdude -P usb -p m328p -c avrispmkii -B 5 -U flash:w:main.hex -U lfuse:w:0xFF:m -U hfuse:w:0xDF:m -U efuse:w:0x05:m
(change the -c option if your programmer is not an AVRISP mkII) and check if the operation succeeded.
You may want to compile the firmware from the source code instead of using the provided firmware image. The firmware source code is written in C. You can use and modify the firmware source code under the terms of the firmware licence (GPL).
- Atmel Studio must be installed;
- on Atmel Studio, create a GCC C Executable Project;
- select the ATmega328P device for the new project;
- remove the .c file automatically created for the new project;
- add the firmware source files to the project;
- on the Build tab of the project properties, select "Use External Makefile" and select the firmware makefile;
- build the solution;
- to program the device, follow the instructions on the Programming on Windows section above, but using the main.hex file created on the
build
directory instead of the provided firmware image file.
- packages
make
,gcc-avr
,avr-libc
,binutils-avr
andavrdude
must be installed (you can useapt-get
orsynaptic
to install them); - on the same directory as the source files, enter the command
make
to build the firmware; - on the same directory, enter the command
make send
to program the BITalino (r)evolution device usingavrdude
.
- packages
avr-gcc
,avr-libc
,avr-binutils
andavrdude
must be installed (you can usefink
to install them); - on the same directory as the source files, enter the command
make
to build the firmware; - on the same directory, enter the command
make send
to program the BITalino (r)evolution device usingavrdude
.