Rss

  • youtube
  • linkedin
  • google

Arduino IDE and upload with avrdude to Trainerboard (AVRISP2)

beagleboard trainerboard 1024x768 Arduino IDE and upload with avrdude to Trainerboard (AVRISP2)

I’m using jumper on TrainerBoard (rev. A) in position 3.3V and i got an Atmel AVRISP2 (P/N@ AVAVRISP2).

SO is Ubuntu 10.10, avrdude is 5.10 and Arduino IDE is version 22.

Trainerboard get onboard an ATMEGA328 with 8Mhz crystal so i put the relative bootloader in it with this command:

sudo avrdude -c avrisp2 -p atmega328p -P usb -B 3 -e -u -U lock:w:0x3f:m -U efuse:w:0x05:m -U hfuse:w:0xda:m -U lfuse:w:0xff:m
cd hardware/arduino/bootloaders/atmega
sudo avrdude -c avrisp2 -p atmega328p -P usb -U flash:w:ATmegaBOOT_168_atmega328_pro_8MHz.hex -U lock:w:0x0f:m

I modify in “dimmer example” ¬†(4.Communication | Arduino IDE) in order to get PWM output on D9 (const int ledPin = 9;)

compile with SHIFT+Verify so you can see the tmp path where HEX file is

The code can be uploaded on the BeagleBoard TrainerBoar using avrdude, so:

  • compile sketch with arduino ide: press SHIFT + click VERIFY
  • so in verbose mode check out the temp dir and then copy hex file
sudo avrdude -V -F -c avrisp2 -p m328p -P usb -U flash:w:main.hex

Use minicom to send commands to /dev/ttyS1 at 9600 baud

 

 

Leave a Reply