Pages: 1 [2]   Go Down
Author Topic: What Are The Pros And Cons Of Not Using The Arduino Bootloader  (Read 2887 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
people don't read the datasheet and rely too heavily on the arduino library.

And then come here asking questions about the things that are in the datasheets*  smiley-razz

Seriously, though, the beauty of Arduino is it doesn't prevent you from diving into direct port and register manipulation, but it doesn't force you to learn that stuff unless you feel you need it or want to learn it.


* I might be one of those smiley-razz
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the beauty of Arduino is...

Absolutely. that optionality is quite valuable and that's why you pay more for an arduino than a bare chip.
Logged

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

Well, yeah.  It depends on how much you know and how much you're willing to figure out.
If you've been using AVRStudio for years and are only looking at Arduino because it's a cheap and easy-to-get eval board, then there's no particular advantage to using the bootloader.
If you're expecting to get your external programmer working with no bootloader by reading the one-sentence description of "use shift-upload to upload your sketch using an external programmer", then perhaps you should reconsider using the bootloader after all.

The number of people who have tried to bootloader programmer to work with long wires leading to their protoboard avr with only half its power pins connected and no bypass caps and no clock circuitry and no tools has been a bit ... impressive.  You want to say things like "you can probably connect an external clock signal and reprogram the fuses to unbrick your chip", and you realize that that's just not going to help any without step-by-step pictures or video or something.  And that's OK, because this is the target audience for Arduino, and some of those people go on to create project of jaw-droppingly clever beauty.

But to say that "there are no cons to not using the bootloader" is just ... wrong.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
"you can probably connect an external clock signal and reprogram the fuses to unbrick your chip"

I would have said "put your fingers on the oscillator pins ...", smiley

Agree with you. There are two sides to any coin.

And the finger on the oscillator pins trick does work.
Logged

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

Quote
And the finger on the oscillator pins trick does work.
Really?  Regardless of the SPI frequency of the programmer?
Logged

Down Under (Australia), SA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 88
Newbie is an understatement
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks for the information guys/gals. it looks like i will stick with the bootloader.
i already have a shield for programing attinys so i can add a spot for the atmega328 and burn the bootloader my self. that will save me a couple of $$
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5522
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I picked up one of those USB-ASP jobbies off ebay for a couple of dollars, and been using it to program ATMEGA8's.  Since I chose to use the chip config which utilizes the internal oscillator instead of a crystal, that also reduces the cost and complexity of the build to the chip plus two caps.

Me too. I just got a TLC5940 hooked up to an ATtiny85. No problem.

PS: Two caps? What's the other one for? I heard a pull-up resistor on the reset was a good idea, although they have one built in so I'm a bit confused.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 146
Posts: 5522
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You're telling me - I was recently tempted by an auction of ATmega8's on eBay that was on the close order of a buck a chip delivered.  That's cheaper than I'm getting ATtiny85's!  More GPIO, same flash and memory, same basic level of avr-gcc support, the only thing that stopped me was my overflowing bin of parts I've accumulated.

I was looking on Farnell last week and ATtiny84s are 94 Eurocents each in quantities of ten.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6619
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To bootload or to not bootload.... that is the question

The bootloader is great when you are developing on a real Arduino. You can use the same USB cable for loading the program and for the serial monitor.

However, when I take a design I have prototyped on the Arduino and build it on a dedicated board, I always include a 6-pin ICSP header on the board so that I can program it directly, and I don't program a bootloader into the mcu.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27114
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I heard a pull-up resistor on the reset was a good idea, although they have one built in so I'm a bit confused.
See pages 4 & 5

* AtmelAVR042 AVR Design Considerations.pdf (236.19 KB - downloaded 16 times.)
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.
Arduino for Teens available at Amazon.com.

Pages: 1 [2]   Go Up
Jump to: