Loading...
Pages: [1]   Go Down
Author Topic: Uploading bootloader WITHOUT Arduino  (Read 268 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 31
Life is art is life.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I recently fried my Arduino UNO. It isn't detected when I connect it to PC.
For troubleshooting, I want to upload the bootloader on a new Atmega328 chip using USBtinyISP programmer and replace the fried Arduino chip.
Almost everywhere, including ladyada's site, it mentions how to upload with the blank chip inserted in the arduino board(which might also be fried) using a programmer.
Is there a simple way of uploading bootloader using only a breadboard with USBtinyISP?
Also, if it doesn't work out, how do I remove the bootloader?

-Antzy
« Last Edit: November 06, 2012, 02:16:51 am by Antzy » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 16455
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure, put the chip on a solderless breadboard with the needed support components.
If it doesn't work out, just reprogram it again. They're made to be flexible like that smiley

See 3rd picture here
http://www.dipmicro.com/store/CPU-ARD328P
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

Offline Offline
Newbie
*
Karma: 0
Posts: 31
Life is art is life.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks CrossRoads.

I found this link which provides bootloader hex file locations with fuse settings(table at bottom of page):
http://www.estechnical.co.uk/case-studies/50-embedded-devices-and-software/90-atmega-fuses-and-arduino-bootloaders

Planning to flash ATmega328P with Optiboot with following settings provided in the page:
Clock Speed   Unlock bits   Lock bits   Low Fuse   High Fuse   Extended fuse   Bootloader
  16MHz               0x3F           0x0F           0xFF             0xDE              0x05            optiboot/optiboot_atmega328.hex
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 16455
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Those values seem to agree with the settings used for an Uno in boards.txt
Code:
uno.name=Arduino Uno
uno.upload.protocol=arduino
uno.upload.maximum_size=32256
uno.upload.speed=115200
uno.bootloader.low_fuses=0xff
uno.bootloader.high_fuses=0xde
uno.bootloader.extended_fuses=0x05
uno.bootloader.path=optiboot
uno.bootloader.file=optiboot_atmega328.hex
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
uno.build.mcu=atmega328p
uno.build.f_cpu=16000000L
uno.build.core=arduino
uno.build.variant=standard
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

SF Bay Area (USA)
Offline Offline
Faraday Member
**
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And also with the optiboot makefile:
Code:
atmega328_isp: atmega328
atmega328_isp: TARGET = atmega328
atmega328_isp: MCU_TARGET = atmega328p
# 512 byte boot, SPIEN
atmega328_isp: HFUSE = DE
# Low power xtal (16MHz) 16KCK/14CK+65ms
atmega328_isp: LFUSE = FF
# 2.7V brownout
atmega328_isp: EFUSE = FD
atmega328_isp: isp
(EFUSE == 0xFD is the same as 5, depending on whether the "unused" bits are set to 1 or 0.)
Logged

Pages: [1]   Go Up
Print
 
Jump to: