Tuesday, August 13, 2013

USBasp + Arduino(Mega)2560 bootloading in Linux Arduino IDE (ACEduino2560)


Just recently,we've been trough the use of an open-source  applications and patronizing its community development ; surprisingly   enthusiasts all over the globe are   very much overwhelmed in participating  the  continuous evolutions of an open-source technology.And we are not far from the said expectations , our electronic stores are now tapping-up the distributions of these materials to the cheapest cost that local geeks and enthusiasts are able to afford of.Gone are those days when we are under the verdict of proprietary vendors such as Zilog,PIC,Renessas and other microchip distributors. I want to mention the following e-stores in the city: Alexan ,e-Gizmo and other on-line stores (tipidPC,  sulit.com ,ayos dito) are vendors where we can buy the  series of MCUs especially Arduino with reasonable price.

Well, our concerns are embedded kits ;yes, the Arduino things and other assorted gadgets ,this rebranded MCU is having the domination in the global e-store.We have noticed that Arduino sheilds' package is the included Atmel microchips , and became an open hardware and software  that completely sets the requirement of starting and advancing the learning curve of an embedded system design.This is the main reason that  enticed our local e-hobbyists to avail the Arduino MCUs  which had given all their resources completely  open and free  for modifications i,e: DIY,documents,source code and innovations. Perhaps Arduino unravel the "Mt. everest" of complex embedded system into the level of laymen's know-how. E-hobbyists are introduced to their  limitless creativity and ingenuity-we could be one of them.

So, this techno blog is all about giving you the idea on how to work on Arduinos using pure Linux for its compiler and IDE.And the purpose is to reload  and  upgrade default firmware  to its new release versions  that will be published in the Arduino web site(http://arduino.cc/en/Main/Software). This time,I will give you the how-tos  of firmware upgrading or bootloading the  ACEduino Mega 2560 with USBasp programmer which can be purchased in Alexan and e-Gizmo respectively.So folks please have a try.. :)

arduino IDE version 1.5X
USBasp   http://www.e-gizmo.com/KIT/usbasp.html
Arduino Mega 2560  http://www.alexan.com.ph/index.php/training-modules/227-aceduino-mega-2560

To solve  USBasp programmer usb setting in Linux
To use USBasp programmer in Arduino IDE


I) Installations
root@locahost# yum install arduino*
root@localhost# yum install gcc-*
root@localhost# yum install avrdude*

2) Testing avrdude
root@localhost# lsusb
root@localhost# avrdude

3) Bootloading using avrdude
root@localhost# cd /usr/share/arduino/hardware/arduino/bootloaders/stk500v2/
root@localhost# avrdude -c usbasp -p m2560 -u -U flash:w:stk500boot_v2_mega2560.hex

4) Using Arduino IDE
root@localhost# arduino

5) Bootloading using Arduino IDE
5.1) Tools-> Programmer->USBasp
5.2) Tools->Board->Arduino Mega 2560
5.3) Tools->Bootloader
5.4)  Note!
      Check bootloading process and if see trouble shooting if there are errors

6) New Sketch-> Basic->Digital->Blink
6.1)  Compile the program
6.2)  Load the program
6.3) Note!
     ..A LED on pin # 13  must be blinking


1) ACEduino 2560 from Alexan Store

2) USBasp clone from e-gizmo

3) ICSP pin settings of Arduino Mega2560 and USBasp clone

4) Connecting ACEduino2560 and USBasp programmer

5) Setting usb driver in udev rules

6)Successful loading firmware/bootloader in CLI avrdue

7) Firmware bootloading using arduino 1.5 IDE

(8) Sample blinking program in Arduino Mega2560


avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc

root@localhost# cd /etc/udev/rules.d/
root@localhost# vim 77-coballes.rules
copy and paste this texts:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="plugdev", MODE="0667"

root@localhost# chmod 777 77-coballes.rules
root@locahost# chown -R "user"."group"  77-coballes.rules
root@localhost# /etc/init.d/udev restart

Then try methodology no. 6

2) Trouble:
no avrdude:

root@localhost# which avardude
root@localhost# yum install avr*

Solved : Loading bootloader in Arduino Mega 2560 using USBasp in Linux :)

No comments:

Post a Comment