mega16/32/64/128 default bootloader?

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi - do the mega16/32/64/128's come with a default bootloader? If not, could someone clarify how ISP programs the uC without a bootloader?

 

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Only USB AVRs come with a bootloader.

 

All other chips need to be programmed first.   normally by SPI (ISP).    For which you need a $3 USBASP or a $34 Atmel AVRISP-2    

Else by PDI, JTAG, TPI, HVPP, HVSP.

 

If you own an Arduino ,   you can program (ISP) most Mega and Tiny AVRs.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

Only USB AVRs come with a bootloader.

 

All other chips need to be programmed first.   normally by SPI (ISP).    For which you need a $3 USBASP or a $34 Atmel AVRISP-2    

Else by PDI, JTAG, TPI, HVPP, HVSP.

 

If you own an Arduino ,   you can program (ISP) most Mega and Tiny AVRs.

 

David.

 

Atmel installs a bootloder in USB AVRs?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes "DFU". You use "Flip" on the PC to send code to it. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How does isp program the chip without a bootloader? Atmel really doesn't tell us much about this. We could presume it is a hardware state machine.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So when programming via JTAG/ISP/SPI/Parallel - it is all done in hardware, there is no code anywhere in Flash that is been executed to do this? I guess what I'm really getting at is can all the Flash be used if I don't have a need for a custom bootloader, and still be able to program it...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes.   You can use all 32kB of a Mega32 for programs if you don't have a bootloader.    And 31.5kB if you use the Optiboot bootloader.

A 32kB Xmega has a separate bootloader area.   So you actually get the whole 32kB for your program.

 

No,   I have no idea how the SPI commands are decoded into the electronics that performs the physical read/write of flash memory.    I just accept that the black box works.     Likewise with JTAG,   PDI,  ...

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are just starting out with AVRs are you sure mega16/32/64/128 are a good place to start anyway? Those are about 15 years old. There are lots of more modern models which have more features so if just starting out I'm not suer I'd limit myself to such old chips.

 

(having said that, mega16 is my "goto" chip of choice).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I actually teach microcontrollers and embedded systems at university in NZ, this is actually an internal debate between lecturers! We are trying to get to the bottom of whether a bootloader is required to program the microcontroller - i.e. is the programming process via ISP done in software (a bootloader)+hardware, or purely hardware?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As the ISP was in the very first AVRs, even the nearly brain-dead AT90S1200, I'd speculate that there is >>not<< a little hidden program in there.

 

It might be interesting to visit the "teardown" site where they dissect chips including AVRs.  Hmmm; gotta find it..

 

 

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is (or was) "Flylogic".  Link in old thread https://www.avrfreaks.net/forum/a... now takes me to

http://blog.ioactive.com/

 

http://blog.ioactive.com/2008/01...

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

is the programming process via ISP done in software (a bootloader)+hardware, or purely hardware?

IF software is involved, it is software that does not occupy any of the user-visible address space, and is not documented as being in any way accessible.

Atmel would be "within spec" to replace a HW-only implementation with a SW-only implementation, as long as it worked the same, and you'd never be able to tell.

 

Optiboot (the arduino bootloader) was made to run on ATmega32 some time ago, and would presumably work on the other chips in the family as well, with a little modification.

https://code.google.com/p/optiboot/