create new tag
, view all tags
Installation of required software:
  • GCC-AVR is required to compile the code, this can be obtained by opening the terminal and typing:
    sudo apt-get install gcc-avr
  • A program called dfu-programmer is required to flash the code in .hex format onto the microcontroller. This can be installed by opening the terminal and typing:
    sudo apt-get install dfu-programmer

Compiling the code:
  • Extract the SPR Project to a directory of your choice.
  • Use your favourite text editor to edit the project as desired.
  • If any new files have been added, be sure to update the makefile included in the project.
  • Navigate to the projects directory in terminal and make the project.

Programming the microcontroller

After making the project, the .hex file should have been generated and saved to the project directory. Now it needs to be flashed to the microcontroller, which is accomplished using dfu-programmer and following the steps provided:

  • Hold the reset button on the Smart Packet Radio. Whilst the reset button is held down, hold the HWB button simultaneously. Let go of the reset button, followed by the HWB. This places the microcontroller into DFU mode and allows it to be programmed via USB. NOTE: No fuses on the microcontroller can be changed via USB.
  • Once in DFU mode, open the terminal and type:
    sudo dfu-programmer at90usb1286 erase
  • As long as the previous operation was performed successfully, the microcontroller can now be programmed by typing:
    sudo dfu-programmer at90usb1286 flash SPR.hex
  • After this has been done the device needs to be reset. This can be accomplished by pressing the reset button or by using the dfu-programmer by typing:
    sudo dfu-programmer at90usb1286 reset
-- XiaohongWu - 2012-01-30
Topic revision: r3 - 2012-01-31 - XiaohongWu
This site is powered by the TWiki collaboration platformCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback