terça-feira, 5 de abril de 2016

Burning ATmega328P with 8MHz Internal Crystal

(this is a private POST just for me remember what are the FUSES that I used)

To burn the ATmega328P to run with 8MHz internal clock I'm using the ARDUINO PRO MINI bootloader.

Just changing the FUSE of the oscilator:

  • Low Fuse: E2
  • High Fuse: DA
  • Ext Fuse: 05
I'm using JTAGICE mkII-CN as programmer.

AVRDUDE command line:
  • /media/juliano/arduino-1.6.5-r5/hardware/tools/avr/bin/avrdude -C/media/juliano/arduino-1.6.5-r5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cjtag2isp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xE2:m
  • /media/juliano/arduino-1.6.5-r5/hardware/tools/avr/bin/avrdude -C/media/juliano/arduino-1.6.5-r5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cjtag2isp -Pusb -Uflash:w:/media/juliano/arduino-1.6.5-r5/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex:i -Ulock:w:0x0F:m

segunda-feira, 4 de abril de 2016

Resolving the Error: avrdude: usbdev_open(): did not find any USB device "usb"

I was trying to burn a Atmega328P with a JTAGICE mkII-CN programmer and AVRDUDE.
After give all permissions to the JTAGICE mkII (click here to learn how) I was receiving the follow error:

avrdude: usbdev_open(): did not find any USB device "usb"

The error was because I was using the wrong programmer on AVRDUDE. I replaced the programmer for "jtag2isp" and worked like a charm.

The final AVRDUDE command line still like this:

avrdude -C/media/Linux/arduino-1.6.5-r5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cjtag2isp -Pusb -Uflash:w:/media/Linux/arduino-1.6.5-r5/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex:i -Ulock:w:0x0F:m